@checksum-ai/runtime 1.1.3 → 1.1.4

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.
package/checksumlib.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! For license information please see main.dc7f8934.js.LICENSE.txt */
2
- !function(){var e={603:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});var r={queryParams:void 0},i=function(){return r.queryParams||(r.queryParams=Object.fromEntries(new URLSearchParams(window.location.search).entries())),r.queryParams}},7750:function(e,t,n){"use strict";n.d(t,{k:function(){return c}});var r=n(2982),i=n(5671),o=n(3144),a=n(573),s=n(7873),u=new(function(){function e(){(0,i.Z)(this,e),this.weightsSum=0,this.config={attributes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},classes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},tagName:{decisionWeight:this.makeWeight(.6)},style:{inlineWeight:.6,computedWeight:.4,decisionWeight:this.makeWeight(.4)},innerText:{decisionWeight:this.makeWeight(.6),qualification:{exactMatchMax:20,containsMatchMax:10,maxLength:256,minLength:1},ignoreSimilarityScoreBelow:.6},innerFeatures:{decisionWeight:this.makeWeight(.8)},visualVicinity:{decisionWeight:this.makeWeight(.2)},structuralVicinity:{decisionWeight:this.makeWeight(.2)}}}return(0,o.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"get",value:function(){return this.config}},{key:"weight",value:function(e){return e/this.weightsSum}}]),e}()),c=function(){function e(t){var n=this;(0,i.Z)(this,e),this.targetElementESRAMetadata=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.unqualifiedClasses=[],this.qualifiedInnerText=void 0,this.visualVicinityComparable=[],this.structuralVicinityComparable=[],this.innerFeaturesComparable=[],this.rank=function(e){if(n.isDealBreaker(e))return{score:0,scores:{}};var t=n.tagSimilarity(e),r=n.attributesSimilarity(e),i=n.classSimilarity(e),o=n.styleSimilarity(e),a=n.innerTextSimilarity(e),s=n.innerFeaturesSimilarity(e),c=n.visualVicinitySimilarity(e),l=n.structuralVicinitySimilarity(e),d={tagScore:t,attributesScore:r,classesScore:i,styleScore:o,innerTextScore:a,innerFeaturesScore:s,visualVicinityScore:c,structuralVicinityScore:l,svgsScore:n.svgsSimilarity(e)},f={tagScore:u.weight(u.get().tagName.decisionWeight)*t,attributesScore:u.weight(u.get().attributes.decisionWeight)*r,classesScore:u.weight(u.get().classes.decisionWeight)*i,innerTextScore:u.weight(u.get().innerText.decisionWeight)*a,innerFeaturesScore:u.weight(u.get().innerFeatures.decisionWeight)*s,styleScore:u.weight(u.get().style.decisionWeight)*o,visualVicinityScore:u.weight(u.get().visualVicinity.decisionWeight)*c,structuralVicinityScore:u.weight(u.get().structuralVicinity.decisionWeight)*l};return{score:Object.values(f).reduce((function(e,t){return e+t}),0),scores:d}},this.targetElementESRAMetadata=t,this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}return(0,o.Z)(e,[{key:"getQualifiedAttributes",value:function(){return this.qualifiedAttributes}},{key:"getQualifiedClasses",value:function(){return this.qualifiedClasses}},{key:"getQualifiedInnerText",value:function(){return this.qualifiedInnerText}},{key:"setQualifiedAttributes",value:function(){var e=this.targetElementESRAMetadata.attributes,t=this.makeQualifiedAttributes(e),n=t.qualifiedAttributes,r=t.qualifiedAttributesMap;this.qualifiedAttributes=n,this.qualifiedAttributesMap=r}},{key:"makeQualifiedAttributes",value:function(e,t){var n=Object.keys(e).filter((function(n){if("input"===t)if("value"===n)return!1;var r=e[n];for(var i in r)i.endsWith("Uniqenuess")&&(r[i.replace("Uniqenuess","Uniqueness")]=r[i]);return r.globalUniqueness>u.get().attributes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.get().attributes.qualification.tagUniquenessThreshold})),r=n.reduce((function(t,n){return t[n]=e[n].value,t}),{});return{qualifiedAttributes:n,qualifiedAttributesMap:r}}},{key:"setQualifiedClasses",value:function(){var e=this;this.qualifiedClasses=this.makeQualifiedClasses(this.targetElementESRAMetadata.classes),this.unqualifiedClasses=Object.keys(this.targetElementESRAMetadata.classes).filter((function(t){return!e.qualifiedClasses.includes(t)}))}},{key:"isValidClass",value:function(e){return/^[A-Za-z_-][0-9A-Za-z_-]*$/.test(e)}},{key:"makeQualifiedClasses",value:function(e){var t=this;return Object.keys(e).filter((function(n){var r=e[n];return!!t.isValidClass(n)&&(!n.startsWith("jss")&&!n.startsWith("css-")&&":hover"!==n&&(r.globalUniqueness>u.get().classes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.get().classes.qualification.tagUniquenessThreshold))}))}},{key:"setQualifiedInnerText",value:function(){this.qualifiedInnerText=this.makeQualifiedInnerText(this.targetElementESRAMetadata.innerText)}},{key:"makeQualifiedInnerText",value:function(e){var t,n;return e&&(null===(t=e.content)||void 0===t?void 0:t.length)<=u.get().innerText.qualification.maxLength&&(null===(n=e.content)||void 0===n?void 0:n.length)>=u.get().innerText.qualification.minLength?e:null}},{key:"makeBasicElementPropertiesComparable",value:function(e){var t=this;return e.reduce((function(e,n){var i=n.position?"".concat(n.tag,".").concat(n.position.slice(0,2).join(",")):n.tag,o="".concat(i,"+").concat(n.relativePosition),a=t.makeQualifiedClasses(n.classes).map((function(e){return"".concat(i,".").concat(e)})),u=[];t.makeQualifiedAttributes(n.attributes).qualifiedAttributes.forEach((function(e){u.push("".concat(i,"[").concat(e,"]")),u.push("".concat(i,"[").concat(e,"]=").concat(n.attributes[e].value))}));var c=n.feature?t.makeInnerFeaturesComparable([n.feature],{customTag:i,includeTag:!1,featureTypeWhiteList:[s.EI.SVG]}):[],l=[].concat((0,r.Z)(e),[i,o],(0,r.Z)(a),u,(0,r.Z)(c));return n.text&&(l.push("".concat(i,"<>")),l.push("".concat(i,"<").concat(n.text,">"))),n.distance&&(l.push("".concat(i,"->").concat(n.distance)),l.push("".concat(i,"->[]").concat(t.getDistanceRange(n.distance)))),l}),[])}},{key:"getDistanceRange",value:function(e){for(var t=[10,20,30,40,50,60,70,80,90,100],n=0,r=t;n<r.length;n++){var i=r[n];if(e<i)return i}return t[t.length-1]}},{key:"setVisualVicinityComparable",value:function(){this.visualVicinityComparable=this.makeVisualVicinityComparable(this.targetElementESRAMetadata.visualVicinity)}},{key:"makeVisualVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"setStructuralVicinityComparable",value:function(){this.structuralVicinityComparable=this.makeStructuralVicinityComparable(this.targetElementESRAMetadata.structuralVicinity)}},{key:"makeStructuralVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"makeInnerFeaturesComparable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.customTag,i=void 0===n?void 0:n,o=t.includeTag,a=void 0===o||o,u=t.featureTypeWhiteList,c=void 0===u?void 0:u;return e.reduce((function(e,t){if(c&&!c.includes(t.type)||t.isHidden)return e;var n=null!==i&&void 0!==i?i:t.tag,o=a?[].concat((0,r.Z)(e),[n]):e;switch(t.type){case s.EI.Button:o.push("".concat(n,"[type=").concat(t.buttonType,"]"));break;case s.EI.Input:t.inputType&&o.push("".concat(n,"[type=").concat(t.inputType,"]")),t.placeholder&&o.push("".concat(n,"[placeholder=").concat(t.placeholder,"]"));break;case s.EI.SVG:t.components.forEach((function(e){var t=[];for(var r in e.attributes)t.push("[".concat(r,"=").concat(e.attributes[r],"]"));o.push("".concat(n).concat(t.join("")))}))}return"text"in t&&t.text&&(o.push("".concat(n,"<>")),o.push("".concat(n,"<").concat(t.text,">"))),o}),[])}},{key:"setInnerFeaturesComparable",value:function(){this.innerFeaturesComparable=this.makeInnerFeaturesComparable(this.targetElementESRAMetadata.innerFeatures)}},{key:"isDealBreaker",value:function(e){if("input"===this.targetElementESRAMetadata.tag&&"input"===e.tag){var t=function(e){return e.type?e.type.value:"text"};if(t(this.targetElementESRAMetadata.attributes)!==t(e.attributes))return!0}return!1}},{key:"tagSimilarity",value:function(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}},{key:"attributesSimilarity",value:function(e){var t=this,n=function(e){return[].concat((0,r.Z)(t.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},i=this.makeQualifiedAttributes(e.attributes).qualifiedAttributesMap;return this.jaccard(n(this.qualifiedAttributesMap),n(i))}},{key:"indicativeAttributesSimilarity",value:function(e){return this.qualifiedAttributesMap.placehoder&&e.attributes.placehoder&&this.qualifiedAttributesMap.placehoder===e.attributes.placehoder.value?1:0}},{key:"classSimilarity",value:function(e){return this.jaccard(this.qualifiedClasses,this.makeQualifiedClasses(e.classes))}},{key:"innerTextSimilarity",value:function(e){var t=this;if(!this.targetElementESRAMetadata.innerText&&!e.innerText)return 1;var n=this.makeQualifiedInnerText(e.innerText);if(!this.qualifiedInnerText||!n)return 0;if(this.qualifiedInnerText.content===n.content)return 1;Object.values({email:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,url:/^(http|https):\/\/[^ "]+$/}).forEach((function(e){if(e.test(t.qualifiedInnerText.content)&&e.test(n.content))return.5}));try{return new Date(this.qualifiedInnerText.content),new Date(n.content),.5}catch(i){}var r=function(e){return e.replace(/\d/g,"d").replace(/[a-zA-Z]/g,"s")};return r(this.qualifiedInnerText.content)===r(n.content)?.5:0}},{key:"innerFeaturesSimilarity",value:function(e){return this.jaccard(this.innerFeaturesComparable,this.makeInnerFeaturesComparable(e.innerFeatures))}},{key:"visualVicinitySimilarity",value:function(e){return this.jaccard(this.visualVicinityComparable,this.makeVisualVicinityComparable(e.visualVicinity))}},{key:"structuralVicinitySimilarity",value:function(e){return this.jaccard(this.structuralVicinityComparable,this.makeStructuralVicinityComparable(e.structuralVicinity))}},{key:"styleSimilarity",value:function(e){var t,n,i,o,a=this,s=function(e){return[].concat((0,r.Z)(a.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},c=this.jaccard(s(null!==(t=this.targetElementESRAMetadata.style.inline)&&void 0!==t?t:{}),s(null!==(n=e.style.inline)&&void 0!==n?n:{})),l=this.jaccard(s(null!==(i=this.targetElementESRAMetadata.style.computed)&&void 0!==i?i:{}),s(null!==(o=e.style.computed)&&void 0!==o?o:{}));return c*u.get().style.inlineWeight+l*u.get().style.computedWeight}},{key:"svgsSimilarity",value:function(e){return this.targetElementESRAMetadata.svgs||e.svgs?this.targetElementESRAMetadata.svgs&&e.svgs&&JSON.stringify(this.targetElementESRAMetadata.svgs)===JSON.stringify(e.svgs)?1:0:1}},{key:"keyValueObjectToArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"=",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return Object.keys(e).map((function(r){return"".concat(r).concat(t).concat(function(t){return n?n(e,t):e[t]}(r))}))}},{key:"jaccard",value:function(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,a.$m)(e,t)}}]),e}()},7873:function(e,t,n){"use strict";n.d(t,{BM:function(){return o},EI:function(){return r},Qy:function(){return a},i7:function(){return i}});var r=function(e){return e[e.Media=0]="Media",e[e.NoData=1]="NoData",e[e.Anchor=2]="Anchor",e[e.Button=3]="Button",e[e.Input=4]="Input",e[e.Text=5]="Text",e[e.SVG=6]="SVG",e}({}),i=function(e){return e.Element="element",e.Parent="parent",e.Child="child",e.LeftSibling="left-sibling",e.RightSibling="right-sibling",e}({}),o=function(e){return e.Center="center",e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right",e.TopRight="top-right",e.TopLeft="top-left",e.BottomRight="bottom-right",e.BottomLeft="bottom-left",e}({}),a=function(e){return e[e.Query=0]="Query",e[e.Intersection=1]="Intersection",e[e.Interactables=2]="Interactables",e[e.All=3]="All",e}({})},1855:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});var r=function(e){return e.Click="click",e.DoubleClick="double_click",e.DragAndDrop="drag_and_drop",e.Input="input",e.ClickAndType="click_and_type",e.ClearAndType="clear_and_type",e.Check="check",e.UnCheck="uncheck",e.Hover="hover",e.Navigation="navigation",e.Keystroke="keystroke",e.SelectOption="selectoption",e.UploadFiles="upload_files",e.GetMoreItems="get_more_items",e.Wait="wait",e.SwitchTab="switch_tab",e.CustomCode="custom_code",e}({})},9478:function(e,t,n){"use strict";n.d(t,{De:function(){return o},hj:function(){return i},pR:function(){return r}});var r=function(e){return e.Script="script",e.App="app",e}({}),i=function(e){return e.TodoListApp="todo",e.ReplayerApp="replayer",e.SessionGraphApp="sessiongraph",e}({}),o={appType:"script",testAppName:"sessiongraph"}},1209:function(e,t,n){"use strict";n.d(t,{J:function(){return s}});var r=n(1413),i=n(5671),o=n(3144),a=n(458),s=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.target,o=void 0===r?document:r,a=n.disabled,s=void 0!==a&&a,u=n.log,c=void 0===u||u,l=n.name,d=n.monitorInput,f=void 0!==d&&d;(0,i.Z)(this,e),this.target=void 0,this.name=void 0,this.disabled=void 0,this.logActivity=void 0,this.monitorInput=void 0,this.cache=void 0,this.observer=void 0,this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid"],this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"],this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"],this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(","),this.shouldIgnoreMutationRecord=function(e){try{if("attributes"===e.type&&t.ignoreMutationsWithAttributes.includes(e.attributeName))return!0;if("attributes"===e.type&&t.ignoreMutationsWithAttributeRegexPatterns.some((function(t){return new RegExp("^"+t+"$").test(e.attributeName)})))return!0;if("attributes"===e.type&&"class"===e.attributeName){var n=function(e){return e.split(" ").filter((function(e){return![":hover","rrweb-paused"].includes(e)})).sort().join(" ")};return n(e.oldValue)===n(e.target.className)}var r=function(e){return t.ignoreElementsWithClasses.some((function(t){return e.classList.contains(t)}))};if("childList"===e.type&&Array.from(e.addedNodes).every((function(e){return r(e)}))&&Array.from(e.removedNodes).every((function(e){return r(e)})))return!0}catch(i){}return!1},this.monitoredTextElements=[],this.monitorInputEnabledElement=function(e){e.addEventListener("input",(function(e){t.invalidate()}))},this.target=o,this.name=l,this.disabled=s,this.logActivity=c,this.monitorInput=f,this.startObserver()}return(0,o.Z)(e,[{key:"startObserver",value:function(){var e=this;this.observer=new MutationObserver((function(t){t.every(e.shouldIgnoreMutationRecord)||(e.invalidate(),e.monitorInput&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE){var n=t;n.matches(e.inputEnabledSelectors)||n.isContentEditable?e.monitorInputEnabledElement(n):Array.from(n.querySelectorAll("*")).filter((function(t){return t.matches&&t.matches(e.inputEnabledSelectors)||t.isContentEditable})).forEach(e.monitorInputEnabledElement)}}))})))})),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.monitorInput&&this.startInputMonitoring()}},{key:"startInputMonitoring",value:function(){this.monitoredTextElements=(0,a.RA)(this.inputEnabledSelectors),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}},{key:"get",value:function(){return this.log("get","has cache:",!!this.cache),this.cache}},{key:"set",value:function(e){this.disabled||(this.cache=e)}},{key:"hasCache",value:function(){return this.log("hasCache",!!this.cache),!!this.cache}},{key:"invalidate",value:function(){this.set(void 0)}},{key:"log",value:function(){var e;if(this.logActivity){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).log.apply(e,["[DOMMutationDependentCache] ".concat(this.name?"[".concat(this.name,"]"):"",":")].concat(n))}}}],[{key:"getInstance",value:function(t,n){var i,o=this.makeNameForCache(t,null===n||void 0===n?void 0:n.flags);e.instances[o]||(e.instances[o]=new e((0,r.Z)((0,r.Z)({},n),{},{name:null!==(i=null===n||void 0===n?void 0:n.name)&&void 0!==i?i:t})),null!==n&&void 0!==n&&n.initialValue&&e.instances[o].set(null===n||void 0===n?void 0:n.initialValue));var a=e.instances[o];return null!==n&&void 0!==n&&n.invalidate&&a.invalidate(),a}},{key:"invalidateAll",value:function(){Object.values(e.instances).forEach((function(e){return e.invalidate()}))}},{key:"makeNameForCache",value:function(e,t){return"".concat(e).concat(t?JSON.stringify(t):"")}}]),e}();s.instances={}},458:function(e,t,n){"use strict";n.d(t,{$s:function(){return R},C0:function(){return w},Du:function(){return y},Ey:function(){return c},GF:function(){return T},GU:function(){return C},MX:function(){return l},PZ:function(){return x},QI:function(){return m},RA:function(){return b},ZH:function(){return E},ZS:function(){return O},Zl:function(){return I},_N:function(){return L},ko:function(){return _},m7:function(){return D},mn:function(){return k},nq:function(){return S},w1:function(){return v}});var r=n(7762),i=n(885),o=n(1413),a=n(2982),s=n(5034),u=n(1209);window.DOMMutationDependentCache=u.J;var c=function(e){},l=function(e){},d=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]',"label[for]"],f=["pointer","grab","text","vertical-text","zoom-in","zoom-out","help"],h=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle","onMouseEnter"],p=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle","onmouseenter"],v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.allowDisabled,i=void 0!==r&&r,o=n.useDataVisibleAttributes,s=void 0===o||o,v=n.excludeCrossOriginIframes,g=void 0!==v&&v,y=u.J.getInstance("getAllInteractableHTMLElements",{target:e,log:!1}),w=Date.now(),k=function(e){var t=e.reduce((function(e,t){return!i&&t.state.disabled?e:[].concat((0,a.Z)(e),[t.element])}),[]);return console.log("[getAllInteractableHTMLElements] done, took",Date.now()-w,"ms"),t};if(y.hasCache())return k(y.get());var E=b("*",e,{excludeCrossOriginIframes:g});c("[getAllInteractableHTMLElements] items");var S=E.reduce((function(e,n){var r,i="disabled"in n&&n.disabled;return n.matches(d.concat(t.appSpecificInteractableElementsSelectors||[]).filter((function(e){return!!e})).join(","))||f.includes(window.getComputedStyle(n).cursor)||n.isContentEditable&&!(null!==(r=n.parentElement)&&void 0!==r&&r.isContentEditable)||!t.ignoreEventListenersWhenDeterminingInteractability&&(p.some((function(e){return n[e]}))||function(e){if(e._checksum_eventListenerList){var t=e._checksum_eventListenerList;if(p.some((function(e){return t[e.slice(2)]})))return!0}var n=Object.keys(e).find((function(e){return e.startsWith("__reactFiber")})),r=n?e[n]:void 0;return!(!r||!r.memoizedProps)&&h.some((function(e){return r.memoizedProps[e]}))}(n))?[].concat((0,a.Z)(e),[{element:n,disabled:i}]):e}),[]);l("[getAllInteractableHTMLElements] items"),c("[getAllInteractableHTMLElements] getCompoundInteractableRootElement");var x=S.reduce((function(e,n){var r=m(n.element,t.appSpecificInteractableElementsSelectors||[]),i=e.find((function(e){return e.element===r}));return i?!n.disabled&&i.state.disabled&&(i.state.disabled=!1):e.push({element:r,state:{disabled:n.disabled}}),e}),[]);l("[getAllInteractableHTMLElements] getCompoundInteractableRootElement"),c("[getAllInteractableHTMLElements] isElementHidden");var I=x.filter((function(e){var t=e.element;if(s){if(!t)return!1;var n=t.getAttribute("checksum-data-visible");if(n){var r="true"===n,i="true"===t.getAttribute("checksum-data-visible-under-transparent-element"),o="true"===t.getAttribute("checksum-data-transparently-visible");return r&&!i||o}}return!T(t,{markTransparentElementsAsHidden:!1}).isHidden}));return l("[getAllInteractableHTMLElements] isElementHidden"),y.set(I),k(I)},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return e;var n=window.getComputedStyle(e).cursor,r=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!1},r=e;r;){var i=r.parentElement;if(!i||i.nodeType!==Node.ELEMENT_NODE)return r;if(t(i))break;if(window.getComputedStyle(i).cursor!==n)return r;r=i}};try{if("isContentEditable"in e&&e.isContentEditable)return e;if("closest"in e){var i=y(e,d.concat(t).filter((function(e){return!!e})).join(","));if(i&&function(e){try{if(e.matches("label[for]")&&!e.matches(d.concat(t).filter((function(e){return!!e&&"label[for]"!==e})).join(","))){var n=e.getAttribute("for"),r=document.getElementById(n);return!!r&&"input"===r.tagName.toLowerCase()&&["checkbox","radio"].includes(r.getAttribute("type"))}}catch(i){console.error("interactableParentIsValid",e,i)}return!0}(i)){if(i===e)return e;var o=r(e,(function(e){return e===i}));return o||i}}if(["auto","default","context-menu","help","progress","wait"].includes(n))return e;var a=r(e);return a||e}catch(s){return console.error("getCompoundInteractableRootElement",e,s),e}};function g(e){if(!e.src)return!0;var t=window.location.origin;try{return t!==new URL(e.src).origin}catch(n){return!1}}var y=function e(t,n){if(t.matches(n))return t;var r=t.slot;if(r){for(var i=t.parentElement;i;){if(i.shadowRoot){var o=i.shadowRoot.querySelector('slot[name="'.concat(r,'"]'));if(o)return e(o,n)}i=i.parentElement}return null}var a=t.closest(n);if(a)return a;var s=t.getRootNode();return s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e(s.host,n):null},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.excludeCrossOriginIframes,i=void 0!==r&&r,o=n.includeHTML,a=void 0!==o&&o,s=[];return function t(n){!function(t){t.querySelectorAll(e).forEach((function(e){return s.push(e)}))}(n);var r=[];!function e(t){t.shadowRoot&&r.push(t.shadowRoot),t.childNodes.forEach((function(t){return e(t)}))}(n),r.forEach((function(e){return t(e)})),n.querySelectorAll("iframe").forEach((function(e){if(!i||!g(e))try{var n=e.contentDocument;n&&t(n)}catch(r){return}}))}(t),a&&t instanceof Document&&t.documentElement.matches(e)&&s.push(t.documentElement),s};function w(e){var t=e.getRootNode();return t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?function(e,t){var n=e.querySelectorAll("slot");if(!n.length)return e.innerText;var r=e.cloneNode(!0),i=r.querySelectorAll("slot");return n.forEach((function(e,t){var n=e.assignedNodes();i[t].innerText=n.map((function(e){switch(e.nodeType){case Node.TEXT_NODE:return e.textContent;case Node.ELEMENT_NODE:return e.innerText}})).filter((function(e){return!!e})).join("\n")})),r.innerText.trim()}(e):e.innerText}var k=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).flattenShadowRootChildren,n=void 0!==t&&t,r=Array.from(e.childNodes);if(e.nodeType===Node.ELEMENT_NODE){var i,o=e;if(o.shadowRoot&&(r=r.filter((function(e){return!e.assignedSlot})),n?r=r.concat(Array.from(o.shadowRoot.childNodes)):r.push(o.shadowRoot)),"slot"===o.tagName.toLowerCase())(i=r).push.apply(i,(0,a.Z)(o.assignedNodes()))}return r},E=function(e){var t,n,r=Array.from(e.children);e.shadowRoot&&(t=r=r.filter((function(e){return!e.assignedSlot}))).push.apply(t,(0,a.Z)(Array.from(e.shadowRoot.children)));"slot"===e.tagName.toLowerCase()&&(n=r).push.apply(n,(0,a.Z)(e.assignedElements()));return r},S=function(e){var t=e.parentElement;if(t)return t;switch(e.nodeType){case Node.ELEMENT_NODE:var n=e;if(n.assignedSlot)return n.assignedSlot;break;case Node.DOCUMENT_FRAGMENT_NODE:return e.host}var r=e.parentNode;if(r)switch(r.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return r.host;case Node.DOCUMENT_NODE:if(window.document===r)return null;var i=Array.from(window.document.querySelectorAll("iframe")).find((function(e){return e.contentDocument===r}));if(i)return i}return null};function x(e){if(!e)return!1;var t=e.getBoundingClientRect();return t.top<=window.innerHeight&&t.left<=window.innerWidth&&t.bottom>=0&&t.right>=0}function I(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=window.getComputedStyle(e),r="0"===n.opacity;return{visible:"hidden"!==n.visibility&&"none"!==n.display&&(!t||!r),isTransparent:r}}function C(e,t){var n,r;return null!==(n=null!==t&&void 0!==t?t:null===e||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)&&void 0!==n?n:window}function T(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.markTransparentElementsAsHidden,u=void 0===a||a,c=n.markElementsHiddenByTransparentElementAsVisible,l=void 0!==c&&c,d=n.scrollIntoView,f=void 0===d||d,h=n.useCache,p=void 0!==h&&h;if(p){var v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=M(t);return n.has(e)?n.get(e):void 0}(e,{markTransparentElementsAsHidden:u,markElementsHiddenByTransparentElementAsVisible:l,scrollIntoView:f});if(v)return v}var m={isHidden:!0},g=function(n){return(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t&&t.restore(),p&&N(e,n,{markTransparentElementsAsHidden:u,markElementsHiddenByTransparentElementAsVisible:l}),(0,o.Z)((0,o.Z)({},m),n)};if(!e)return g({isHidden:!0});var y=I(e="OPTION"===e.tagName&&(e.closest("select")||e.closest("datalist"))||e,u),w=y.visible,k=y.isTransparent;if(m.isTransparent=k,!w)return g({isHidden:!0});if(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.scrollIntoView,i=void 0===r||r,o=e.parentElement,a=window.getComputedStyle(e);if("absolute"===a.position||"fixed"===a.position)return!1;i&&(t=new s.t(e).scrollIntoView());var u=function(e){return t&&t.restore(),e};for(;o;){if(!(o instanceof C(e).Element))return u(!1);var c=window.getComputedStyle(o);if("absolute"===c.position||"fixed"===c.position)return u(!1);var l="hidden"===c.overflowX,d="hidden"===c.overflowY;if((l||d)&&!A(o,e,l,d))return u(!0);o=o.parentElement}return u(!1)}(e,{scrollIntoView:f}))return g({isHidden:!0});try{var E;f&&(t=new s.t(e).scrollIntoView());var x=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView,r=e.ownerDocument,i={top:0,left:0,right:n.innerWidth||r.documentElement.clientWidth,bottom:n.innerHeight||r.documentElement.clientHeight},o={top:Math.max(t.top,i.top),left:Math.max(t.left,i.left),right:Math.min(t.right,i.right),bottom:Math.min(t.bottom,i.bottom)};return o.width=o.right-o.left,o.height=o.bottom-o.top,o.width>0&&o.height>0?o:null}(e);if(!x)return g({isHidden:!0});var _,D=[[x.width/2,x.height/2,!0],[Math.max(.01*x.width,1),Math.max(.01*x.height,1)],[Math.min(.99*x.width,x.width-1),Math.max(.01*x.height,1)],[Math.max(.01*x.width,1),Math.min(.99*x.height,x.height-1)],[Math.min(.99*x.width,x.width-1),Math.min(.99*x.height,x.height-1)]],R=null!==(E=function(e){for(var t=e;t;){if(11===t.nodeType)return[t,t.ownerDocument.defaultView];t=t.parentNode}}(e))&&void 0!==E?E:[e.ownerDocument,e.ownerDocument.defaultView],O=(0,i.Z)(R,2),L=O[0],Z=O[1];if(e instanceof C(e).HTMLInputElement&&e.id&&e.type&&["checkbox","radio"].includes(e.type)){var F=b('label[for="'.concat(e.id,'"]'),L);F.length&&(_=F[0])}for(var P=0,V=D;P<V.length;P++){var B=(0,i.Z)(V[P],3),j=B[0],H=B[1],U=B[2],W=x.left+j>=0&&x.left+j<=Z.innerWidth?x.left+j:j,q=x.top+H>=0&&x.top+H<=Z.innerHeight?x.top+H:H,G=L.elementFromPoint(W,q);if(G===e)return g({isHidden:!1,clickOffset:U?void 0:{x:j,y:H}});if(G){if(!0===U&&G.shadowRoot)return g(T(G,n));for(var z=G;z;){if(z===e||_&&_===z)return g({isHidden:!1,clickOffset:U?void 0:{x:j,y:H}});z=S(z)}if(l)try{var $,Y=L.elementsFromPoint(W,q),Q=(0,r.Z)(Y);try{for(Q.s();!($=Q.n()).done;){var X=$.value;if(X===e)return g({isHidden:!1,clickOffset:U?void 0:{x:j,y:H},isBehindTransparentElement:!0});var K=Z.getComputedStyle(X),J=X.getBoundingClientRect();if("0"!==K.opacity&&"hidden"!==K.visibility&&!/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(K.backgroundColor)||J.width>1.2*x.width||J.height>1.2*x.height)break}}catch(ee){Q.e(ee)}finally{Q.f()}}catch(te){console.error("Error while checking transparent elements over interactable",te)}}}return t&&(t.restore(),t=void 0),_?T(_,n):g({isHidden:!0})}catch(te){throw te}}var M=function(e){var t=u.J.getInstance("isElementHidden",{log:!1,flags:e}),n=t.get();return n||(n=new Map,t.set(n)),n};var N=function(e,t){M(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).set(e,t)};function A(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=e.getBoundingClientRect(),o=t.getBoundingClientRect(),a=i.left<o.right&&i.right>o.left,s=i.top<o.bottom&&i.bottom>o.top;return(!n||a)&&(!r||s)}function _(e,t,n){return e?e.replace(new RegExp(t,"g"),n):e}function D(e,t){try{var n=e.ownerDocument.defaultView;return e instanceof n[t]||e instanceof n.top[t]}catch(r){}return!1}!function(){for(var e=[],t=1;t<=20;t++){var n=t/20;e.push(n)}e.push(0)}();function R(e){try{return"fixed"===getComputedStyle(e).position||!(!e.parentElement||e.parentElement===document.body)&&R(e.parentElement)}catch(t){return console.error("isAncestorOrSelfFixed",t),!1}}function O(e){var t=e.getBoundingClientRect().top;return t<0?-t:0}function L(e){var t=e.getBoundingClientRect().bottom,n=window.innerHeight;return t>n?t-n:0}},8739:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(5671),i=n(3144),o=function(){function e(){(0,r.Z)(this,e)}return(0,i.Z)(e,[{key:"skipEvents",value:function(e){}},{key:"preCastEvent",value:function(e){}},{key:"preEvent",value:function(e){}},{key:"postEvent",value:function(e,t){return t}},{key:"handleMeta",value:function(e,t){}},{key:"handleViewportResize",value:function(e){}},{key:"handleMutation",value:function(e,t){}},{key:"handleInput",value:function(e,t){}},{key:"handleClick",value:function(e,t){}},{key:"handleDblClick",value:function(e,t){}},{key:"handleMouseDown",value:function(e,t){}},{key:"handleMouseUp",value:function(e,t){}},{key:"handleMouseMove",value:function(e,t){}},{key:"handleFocus",value:function(e,t){}},{key:"handleBlur",value:function(e,t){}},{key:"handleContentEditableInput",value:function(e,t){}},{key:"handleKeyStroke",value:function(e,t){}},{key:"handleURLChange",value:function(e,t){}}]),e}()},7666:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r=n(4165),i=n(5861),o=n(5671),a=n(3144),s=n(1414),u=n(4228),c=function(){function e(t){var n=this,a=t.eventHandlers;(0,o.Z)(this,e),this.handlers=void 0,this.preCastEvent=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.handlers.preCastEvent(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.processEvent=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){var i,o,a,s=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!(s.length>1&&void 0!==s[1])||s[1],n.handlers.preEvent(t),!i){e.next=8;break}return e.next=5,n.handleEvent(t);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=void 0;case 9:return o=e.t0,e.next=12,n.handlers.postEvent(t,o);case 12:return a=e.sent,e.abrupt("return",n.handlers.controlledReturn?n.handlers.getReturnValue():a);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.skipEvents=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.handlers.skipEvents(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.handlers=a}return(0,a.Z)(e,[{key:"setHandlers",value:function(e){this.handlers=e}},{key:"handleEvent",value:function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===s.tw.Meta?3:e.t0===s.tw.IncrementalSnapshot?4:e.t0===s.tw.Custom?14:21;break;case 3:return e.abrupt("return",this.handlers.handleMeta(t.data,t));case 4:e.t1=t.data.source,e.next=e.t1===s.yh.ViewportResize?7:e.t1===s.yh.Mutation?8:e.t1===s.yh.Input?9:e.t1===s.yh.MouseInteraction?10:e.t1===s.yh.MouseMove?11:12;break;case 7:return e.abrupt("return",this.handlers.handleViewportResize(t.data,t));case 8:return e.abrupt("return",this.handlers.handleMutation(t.data,t));case 9:return e.abrupt("return",this.handlers.handleInput(t.data,t));case 10:return e.abrupt("return",this.handleMouseInteraction(t.data,t));case 11:return e.abrupt("return",this.handlers.handleMouseMove(t.data,t));case 12:return e.abrupt("break",13);case 13:case 20:case 21:return e.abrupt("break",22);case 14:e.t2=t.data.tag,e.next=e.t2===u.N.ContentEditableInput?17:e.t2===u.N.KeyStroke?18:e.t2===u.N.URLChange?19:20;break;case 17:return e.abrupt("return",this.handlers.handleContentEditableInput(t.data.payload,t));case 18:return e.abrupt("return",this.handlers.handleKeyStroke(t.data.payload,t));case 19:return e.abrupt("return",this.handlers.handleURLChange(t.data.payload,t));case 22:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseInteraction",value:function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t,n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===s.Y2.Click?3:e.t0===s.Y2.DblClick?4:e.t0===s.Y2.MouseDown?5:e.t0===s.Y2.MouseUp?6:e.t0===s.Y2.Focus?7:e.t0===s.Y2.Blur?8:9;break;case 3:return e.abrupt("return",this.handlers.handleClick(t,n));case 4:return e.abrupt("return",this.handlers.handleDblClick(t,n));case 5:return e.abrupt("return",this.handlers.handleMouseDown(t,n));case 6:return e.abrupt("return",this.handlers.handleMouseUp(t,n));case 7:return e.abrupt("return",this.handlers.handleFocus(t,n));case 8:return e.abrupt("return",this.handlers.handleBlur(t,n));case 9:return e.abrupt("break",10);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}()},5034:function(e,t,n){"use strict";n.d(t,{t:function(){return s}});var r=n(7762),i=n(5671),o=n(3144),a=n(458),s=function(){function e(t){(0,i.Z)(this,e),this.element=void 0,this.elRect=void 0,this.initialScrollPositions=void 0,this.element=t,this.elRect=this.element.getBoundingClientRect()}return(0,o.Z)(e,[{key:"scrollIntoView",value:function(){if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!(0,a.PZ)(this.element)){var e,t=(0,r.Z)(this.initialScrollPositions);try{for(t.s();!(e=t.n()).done;){var n=e.value,i=n.element.getBoundingClientRect();if(this.elRect.top<i.top||this.elRect.bottom>i.bottom){var o=this.elRect.top-i.top+n.element.scrollTop;n.element.scrollTop=o}}}catch(s){t.e(s)}finally{t.f()}}return this}},{key:"restore",value:function(){this.initialScrollPositions.forEach((function(e){var t=e.element,n=e.top,r=e.left;try{t.scroll(r,n)}catch(i){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:t,top:n,left:r},i)}}))}},{key:"getScrollableParentsPositions",value:function(){this.initialScrollPositions=[];for(var e=(0,a.nq)(this.element);null!=e;)(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&this.initialScrollPositions.push({element:e,top:e.scrollTop,left:e.scrollLeft}),e=(0,a.nq)(e)}}]),e}()},408:function(e,t,n){"use strict";n.d(t,{L:function(){return he}});var r=n(7762),i=n(3144),o=n(5671),a=n(5512),s=n(885),u=n(2982),c=n(1737),l=n(1414);function d(e){return"__ln"in e}var f,h=function(){function e(){(0,o.Z)(this,e),this.length=0,this.head=null,this.tail=null}return(0,i.Z)(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null===t||void 0===t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&d(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&d(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),e}(),p=function(e,t){return"".concat(e,"@").concat(t)},v=function(){function e(){var t=this;(0,o.Z)(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],n=new Set,i=new h,o=function(e){for(var n=e,r=a.zi;r===a.zi;)r=(n=n&&n.nextSibling)&&t.mirror.getId(n);return r},s=function(r){if(r.parentNode&&(0,c._f)(r)&&"TEXTAREA"!==r.parentNode.tagName){var s=(0,a.Zq)(r.parentNode)?t.mirror.getId((0,c.jB)(r)):t.mirror.getId(r.parentNode),u=o(r);if(-1===s||-1===u)return i.addNode(r);var l=(0,a.eD)(r,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){(0,c.Cj)(e,t.mirror)&&t.iframeManager.addIframe(e),(0,c.qs)(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),(0,c.He)(r)&&t.shadowDomManager.addShadowRoot(r.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});l&&(e.push({parentId:s,nextId:u,node:l}),n.add(l.id))}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());var u,l=(0,r.Z)(t.movedSet);try{for(l.s();!(u=l.n()).done;){var d=u.value;g(t.removes,d,t.mirror)&&!t.movedSet.has(d.parentNode)||s(d)}}catch(M){l.e(M)}finally{l.f()}var f,p=(0,r.Z)(t.addedSet);try{for(p.s();!(f=p.n()).done;){var v=f.value;b(t.droppedSet,v)||g(t.removes,v,t.mirror)?b(t.movedSet,v)?s(v):t.droppedSet.add(v):s(v)}}catch(M){p.e(M)}finally{p.f()}for(var m=null;i.length;){var y=null;if(m){var w=t.mirror.getId(m.value.parentNode),k=o(m.value);-1!==w&&-1!==k&&(y=m)}if(!y)for(var E=i.tail;E;){var S=E;if(E=E.previous,S){var x=t.mirror.getId(S.value.parentNode);if(-1===o(S.value))continue;if(-1!==x){y=S;break}var I=S.value;if(I.parentNode&&I.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var C=I.parentNode.host;if(-1!==t.mirror.getId(C)){y=S;break}}}}if(!y){for(;i.head;)i.removeNode(i.head.value);break}m=y.previous,i.removeNode(y.value),s(y.value)}var T={texts:t.texts.map((function(e){var n=e.node;return n.parentNode&&"TEXTAREA"===n.parentNode.tagName&&t.genTextAreaValueMutation(n.parentNode),{id:t.mirror.getId(n),value:e.value}})).filter((function(e){return!n.has(e.id)})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){var n=e.attributes;if("string"===typeof n.style){var r=JSON.stringify(e.styleDiff),i=JSON.stringify(e._unchangedStyles);r.length<n.style.length&&(r+i).split("var(").length===n.style.split("var(").length&&(n.style=e.styleDiff)}return{id:t.mirror.getId(e.node),attributes:n}})).filter((function(e){return!n.has(e.id)})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};(T.texts.length||T.attributes.length||T.removes.length||T.adds.length)&&(t.texts=[],t.attributes=[],t.attributeMap=new WeakMap,t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(T))}},this.genTextAreaValueMutation=function(e){var n=t.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(n),t.attributeMap.set(e,n)),n.attributes.value=Array.from(e.childNodes,(function(e){return e.textContent||""})).join("")},this.processMutation=function(e){if(!(0,c.WU)(e.target,t.mirror))switch(e.type){case"characterData":var n=e.target.textContent;(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||n===e.oldValue||t.texts.push({value:(0,a.IG)(e.target,t.maskTextClass,t.maskTextSelector,!0)&&n?t.maskTextFn?t.maskTextFn(n,(0,c.rU)(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break;case"attributes":var r=e.target,i=e.attributeName,o=e.target.getAttribute(i);if("value"===i){var s=(0,a.kv)(r);o=(0,a.wR)({element:r,maskInputOptions:t.maskInputOptions,tagName:r.tagName,type:s,value:o,maskInputFn:t.maskInputFn})}if((0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||o===e.oldValue)return;var u=t.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===i&&!t.keepIframeSrcFn(o)){if(r.contentDocument)return;i="rr_src"}if(u||(u={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(u),t.attributeMap.set(e.target,u)),"type"===i&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!(0,a.P8)(r.tagName,i)&&(u.attributes[i]=(0,a.We)(t.doc,(0,a.UR)(r.tagName),(0,a.UR)(i),o),"style"===i)){if(!t.unattachedDoc)try{t.unattachedDoc=document.implementation.createHTMLDocument()}catch(k){t.unattachedDoc=t.doc}var l=t.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(var d=0,f=Array.from(r.style);d<f.length;d++){var h=f[d],v=r.style.getPropertyValue(h),g=r.style.getPropertyPriority(h);v!==l.style.getPropertyValue(h)||g!==l.style.getPropertyPriority(h)?u.styleDiff[h]=""===g?v:[v,g]:u._unchangedStyles[h]=[v,g]}for(var y=0,b=Array.from(l.style);y<b.length;y++){var w=b[y];""===r.style.getPropertyValue(w)&&(u.styleDiff[w]=!1)}}break;case"childList":if((0,c.IT)(e.target,t.blockClass,t.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void t.genTextAreaValueMutation(e.target);e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(n){var r=t.mirror.getId(n),i=(0,a.Zq)(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||(0,c.WU)(n,t.mirror)||!(0,c.nF)(n,t.mirror)||(t.addedSet.has(n)?(m(t.addedSet,n),t.droppedSet.add(n)):t.addedSet.has(e.target)&&-1===r||(0,c.y5)(e.target,t.mirror)||(t.movedSet.has(n)&&t.movedMap[p(r,i)]?m(t.movedSet,n):t.removes.push({parentId:i,id:r,isShadow:!(!(0,a.Zq)(e.target)||!(0,a.DS)(e.target))||void 0})),t.mapRemoves.push(n))}))}},this.genAdds=function(e,n){if(!t.processedNodeManager.inOtherBuffer(e,t)&&!t.addedSet.has(e)&&!t.movedSet.has(e)){if(t.mirror.hasNode(e)){if((0,c.WU)(e,t.mirror))return;t.movedSet.add(e);var r=null;n&&t.mirror.hasNode(n)&&(r=t.mirror.getId(n)),r&&-1!==r&&(t.movedMap[p(t.mirror.getId(e),r)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);(0,c.IT)(e,t.blockClass,t.blockSelector,!1)||(e.childNodes.forEach((function(e){return t.genAdds(e)})),(0,c.He)(e)&&e.shadowRoot.childNodes.forEach((function(n){t.processedNodeManager.add(n,t),t.genAdds(n,e)})))}}}return(0,i.Z)(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function m(e,t){e.delete(t),t.childNodes.forEach((function(t){return m(e,t)}))}function g(e,t,n){return 0!==e.length&&y(e,t,n)}function y(e,t,n){var r=t.parentNode;if(!r)return!1;var i=n.getId(r);return!!e.some((function(e){return e.id===i}))||y(e,r,n)}function b(e,t){return 0!==e.size&&w(e,t)}function w(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||w(e,n))}function k(e){f=e}function E(){f=void 0}var S=function(e){if(!f)return e;return function(){try{return e.apply(void 0,arguments)}catch(t){if(f&&!0===f(t))return;throw t}}},x=[];function I(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(Q){}return e&&e.target}function C(e,t){var n,r,i=new v;x.push(i),i.init(e);var o=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(o=window[a]);var s=new o(S(i.processMutations.bind(i)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function T(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.sampling;if(!1===s.mouseInteraction)return function(){};var u=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,d=[],f=null;return Object.keys(l.Y2).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==u[e]})).forEach((function(e){var s=(0,a.UR)(e),u=function(e){return function(n){var a=I(n);if(!(0,c.IT)(a,i,o,!0)){var s=null,u=e;if("pointerType"in n){switch(n.pointerType){case"mouse":s=l.Et.Mouse;break;case"touch":s=l.Et.Touch;break;case"pen":s=l.Et.Pen}s===l.Et.Touch?l.Y2[e]===l.Y2.MouseDown?u="TouchStart":l.Y2[e]===l.Y2.MouseUp&&(u="TouchEnd"):l.Et.Pen}else(0,c.xO)(n)&&(s=l.Et.Touch);null!==s?(f=s,(u.startsWith("Touch")&&s===l.Et.Touch||u.startsWith("Mouse")&&s===l.Et.Mouse)&&(s=null)):l.Y2[e]===l.Y2.Click&&(s=f,f=null);var d=(0,c.xO)(n)?n.changedTouches[0]:n;if(d){var h=r.getId(a),p=d.clientX,v=d.clientY;S(t)(Object.assign({type:l.Y2[u],id:h,x:p,y:v},null!==s&&{pointerType:s}))}}}}(e);if(window.PointerEvent)switch(l.Y2[e]){case l.Y2.MouseDown:case l.Y2.MouseUp:s=s.replace("mouse","pointer");break;case l.Y2.TouchStart:case l.Y2.TouchEnd:return}d.push((0,c.on)(s,u,n))})),S((function(){d.forEach((function(e){return e()}))}))}function M(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling,s=S((0,c.P2)(S((function(e){var a=I(e);if(a&&!(0,c.IT)(a,i,o,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var u=(0,c.$1)(n.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100));return(0,c.on)("scroll",s,n)}var N=["INPUT","TEXTAREA","SELECT"],A=new WeakMap;function _(e){return function(e,t){if(L("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||L("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||L("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||L("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function D(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function R(e,t){var n,r,i,o=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(t.host);var u="#document"===t.nodeName?null===(n=t.defaultView)||void 0===n?void 0:n.Document:null===(i=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===i?void 0:i.ShadowRoot,c=(null===u||void 0===u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null===u||void 0===u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&u&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null===(e=c.get)||void 0===e?void 0:e.call(this)},set:function(e){var t,n=null===(t=c.set)||void 0===t?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(r){}return n}}),S((function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):function(){}}function O(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.doc.defaultView;if(!i)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,u=e.mediaInteractionCb,c=e.styleSheetRuleCb,l=e.styleDeclarationCb,d=e.canvasMutationCb,f=e.fontCb,h=e.selectionCb,p=e.customElementCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),r.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),i.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),o.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),a.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),u.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),c.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),l.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),f.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),h.apply(void 0,arguments)},e.customElementCb=function(){t.customElement&&t.customElement.apply(t,arguments),p.apply(void 0,arguments)}}(e,n),e.recordDOM&&(t=C(e,e.doc));var o=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,a="number"===typeof n.mousemove?n.mousemove:50,s="number"===typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],d=(0,c.P2)(S((function(e){var n=Date.now()-o;t(u.map((function(e){return e.timeOffset-=n,e})),e),u=[],o=null})),s),f=S((0,c.P2)(S((function(e){var t=I(e),n=(0,c.xO)(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;o||(o=(0,c.zq)()),u.push({x:r,y:a,id:i.getId(t),timeOffset:(0,c.zq)()-o}),d("undefined"!==typeof DragEvent&&e instanceof DragEvent?l.yh.Drag:e instanceof MouseEvent?l.yh.MouseMove:l.yh.TouchMove)})),a,{trailing:!1})),h=[(0,c.on)("mousemove",f,r),(0,c.on)("touchmove",f,r),(0,c.on)("drag",f,r)];return S((function(){h.forEach((function(e){return e()}))}))}(e),d=T(e),f=M(e),h=function(e,t){var n=e.viewportResizeCb,r=t.win,i=-1,o=-1,a=S((0,c.P2)(S((function(){var e=(0,c.gp)(),t=(0,c.fM)();i===e&&o===t||(n({width:Number(t),height:Number(e)}),i=e,o=t)})),200));return(0,c.on)("resize",a,r)}(e,{win:i}),p=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.ignoreClass,l=e.ignoreSelector,d=e.maskInputOptions,f=e.maskInputFn,h=e.sampling,p=e.userTriggeredOnInput;function v(e){var t=I(e),r=e.isTrusted,u=t&&t.tagName;if(t&&"OPTION"===u&&(t=t.parentElement),t&&u&&!(N.indexOf(u)<0)&&!(0,c.IT)(t,i,o,!0)&&!(t.classList.contains(s)||l&&t.matches(l))){var h=t.value,v=!1,g=(0,a.kv)(t)||"";"radio"===g||"checkbox"===g?v=t.checked:(d[u.toLowerCase()]||d[g])&&(h=(0,a.wR)({element:t,maskInputOptions:d,tagName:u,type:g,value:h,maskInputFn:f})),m(t,p?{text:h,isChecked:v,userTriggered:r}:{text:h,isChecked:v});var y=t.name;"radio"===g&&y&&v&&n.querySelectorAll('input[type="radio"][name="'.concat(y,'"]')).forEach((function(e){if(e!==t){var n=e.value;m(e,p?{text:n,isChecked:!v,userTriggered:!1}:{text:n,isChecked:!v})}}))}}function m(e,n){var i=A.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){A.set(e,n);var o=r.getId(e);S(t)(Object.assign(Object.assign({},n),{id:o}))}}var g=("last"===h.input?["change"]:["input","change"]).map((function(e){return(0,c.on)(e,S(v),n)})),y=n.defaultView;if(!y)return function(){g.forEach((function(e){return e()}))};var b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,"value"),w=[[y.HTMLInputElement.prototype,"value"],[y.HTMLInputElement.prototype,"checked"],[y.HTMLSelectElement.prototype,"value"],[y.HTMLTextAreaElement.prototype,"value"],[y.HTMLSelectElement.prototype,"selectedIndex"],[y.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&g.push.apply(g,(0,u.Z)(w.map((function(e){return(0,c.yU)(e[0],e[1],{set:function(){S(v)({target:this,isTrusted:!1})}},!1,y)})))),S((function(){g.forEach((function(e){return e()}))}))}(e),v=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,o=e.sampling,a=e.doc,s=S((function(e){return(0,c.P2)(S((function(o){var a=I(o);if(a&&!(0,c.IT)(a,n,r,!0)){var s=a.currentTime,u=a.volume,l=a.muted,d=a.playbackRate,f=a.loop;t({type:e,id:i.getId(a),currentTime:s,volume:u,muted:l,playbackRate:d,loop:f})}})),o.media||500)})),u=[(0,c.on)("play",s(0),a),(0,c.on)("pause",s(1),a),(0,c.on)("seeked",s(2),a),(0,c.on)("volumechange",s(3),a),(0,c.on)("ratechange",s(4),a)];return S((function(){u.forEach((function(e){return e()}))}))}(e),m=function(){},g=function(){},y=function(){},b=function(){};e.recordDOM&&(m=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,o=t.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:S((function(e,t,o){var a=(0,s.Z)(o,2),u=a[0],c=a[1],l=D(t,r,i.styleMirror),d=l.id,f=l.styleId;return(d&&-1!==d||f&&-1!==f)&&n({id:d,styleId:f,adds:[{rule:u,index:c}]}),e.apply(t,o)}))});var c,l,d=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(d,{apply:S((function(e,t,o){var a=(0,s.Z)(o,1)[0],u=D(t,r,i.styleMirror),c=u.id,l=u.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,removes:[{index:a}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.replace&&(c=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:S((function(e,t,o){var a=(0,s.Z)(o,1)[0],u=D(t,r,i.styleMirror),c=u.id,l=u.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,replace:a}),e.apply(t,o)}))})),o.CSSStyleSheet.prototype.replaceSync&&(l=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:S((function(e,t,o){var a=(0,s.Z)(o,1)[0],u=D(t,r,i.styleMirror),c=u.id,l=u.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,replaceSync:a}),e.apply(t,o)}))}));var f={};Z("CSSGroupingRule")?f.CSSGroupingRule=o.CSSGroupingRule:(Z("CSSMediaRule")&&(f.CSSMediaRule=o.CSSMediaRule),Z("CSSConditionRule")&&(f.CSSConditionRule=o.CSSConditionRule),Z("CSSSupportsRule")&&(f.CSSSupportsRule=o.CSSSupportsRule));var h={};return Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),o=t[0],a=t[1];h[o]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(h[o].insertRule,{apply:S((function(e,t,o){var a=(0,s.Z)(o,2),c=a[0],l=a[1],d=D(t.parentStyleSheet,r,i.styleMirror),f=d.id,h=d.styleId;return(f&&-1!==f||h&&-1!==h)&&n({id:f,styleId:h,adds:[{rule:c,index:[].concat((0,u.Z)(_(t)),[l||0])}]}),e.apply(t,o)}))}),a.prototype.deleteRule=new Proxy(h[o].deleteRule,{apply:S((function(e,t,o){var a=(0,s.Z)(o,1)[0],c=D(t.parentStyleSheet,r,i.styleMirror),l=c.id,d=c.styleId;return(l&&-1!==l||d&&-1!==d)&&n({id:l,styleId:d,removes:[{index:[].concat((0,u.Z)(_(t)),[a])}]}),e.apply(t,o)}))})})),S((function(){o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=d,c&&(o.CSSStyleSheet.prototype.replace=c),l&&(o.CSSStyleSheet.prototype.replaceSync=l),Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),n=t[0],r=t[1];r.prototype.insertRule=h[n].insertRule,r.prototype.deleteRule=h[n].deleteRule}))}))}(e,{win:i}),g=R(e,e.doc),y=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,o=e.stylesheetManager,a=t.win,u=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(u,{apply:S((function(e,t,a){var c,l=(0,s.Z)(a,3),d=l[0],f=l[1],h=l[2];if(i.has(d))return u.apply(t,[d,f,h]);var p=D(null===(c=t.parentRule)||void 0===c?void 0:c.parentStyleSheet,r,o.styleMirror),v=p.id,m=p.styleId;return(v&&-1!==v||m&&-1!==m)&&n({id:v,styleId:m,set:{property:d,value:f,priority:h},index:_(t.parentRule)}),e.apply(t,a)}))});var c=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:S((function(e,t,a){var u,l=(0,s.Z)(a,1)[0];if(i.has(l))return c.apply(t,[l]);var d=D(null===(u=t.parentRule)||void 0===u?void 0:u.parentStyleSheet,r,o.styleMirror),f=d.id,h=d.styleId;return(f&&-1!==f||h&&-1!==h)&&n({id:f,styleId:h,remove:{property:l},index:_(t.parentRule)}),e.apply(t,a)}))}),S((function(){a.CSSStyleDeclaration.prototype.setProperty=u,a.CSSStyleDeclaration.prototype.removeProperty=c}))}(e,{win:i}),e.collectFonts&&(b=function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return o.set(r,{family:e,buffer:"string"!==typeof t,descriptors:n,fontSource:"string"===typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=(0,c.r$)(n.fonts,"add",(function(e){return function(n){return setTimeout(S((function(){var e=o.get(n);e&&(t(e),o.delete(n))})),0),e.apply(this,[n])}}));return i.push((function(){r.FontFace=a})),i.push(s),S((function(){i.forEach((function(e){return e()}))}))}(e)));var w,k=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,o=e.selectionCb,a=!0,s=S((function(){var e=t.getSelection();if(!(!e||a&&(null===e||void 0===e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],u=e.rangeCount||0,l=0;l<u;l++){var d=e.getRangeAt(l),f=d.startContainer,h=d.startOffset,p=d.endContainer,v=d.endOffset;(0,c.IT)(f,r,i,!0)||(0,c.IT)(p,r,i,!0)||s.push({start:n.getId(f),startOffset:h,end:n.getId(p),endOffset:v})}o({ranges:s})}}));return s(),(0,c.on)("selectionchange",s)}(e),E=function(e){var t=e.doc,n=e.customElementCb,r=t.defaultView;return r&&r.customElements?(0,c.r$)(r.customElements,"define",(function(e){return function(t,r,i){try{n({define:{name:t}})}catch(o){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,r,i])}})):function(){}}(e),O=[],L=(0,r.Z)(e.plugins);try{for(L.s();!(w=L.n()).done;){var F=w.value;O.push(F.observer(F.callback,i,F.options))}}catch(P){L.e(P)}finally{L.f()}return S((function(){x.forEach((function(e){return e.reset()})),null===t||void 0===t||t.disconnect(),o(),d(),f(),h(),p(),v(),m(),g(),y(),b(),k(),E(),O.forEach((function(e){return e()}))}))}function L(e){return"undefined"!==typeof window[e]}function Z(e){return Boolean("undefined"!==typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var F=function(){function e(t){(0,o.Z)(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return(0,i.Z)(e,[{key:"getId",value:function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}},{key:"getIds",value:function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,r,i)}))}},{key:"getRemoteId",value:function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!==typeof t)return t;var i=r.get(t);return i||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,r)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),P=function(){function e(t){(0,o.Z)(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new F(a.Bu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new F(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return(0,i.Z)(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,r=this;switch(t.type){case l.tw.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:l.tw.IncrementalSnapshot,data:{source:l.yh.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case l.tw.Meta:case l.tw.Load:case l.tw.DomContentLoaded:return!1;case l.tw.Plugin:return t;case l.tw.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case l.tw.IncrementalSnapshot:switch(t.data.source){case l.yh.Mutation:return t.data.adds.forEach((function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((function(t){r.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){r.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.Drag:case l.yh.TouchMove:case l.yh.MouseMove:return t.data.positions.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.ViewportResize:return!1;case l.yh.MediaInteraction:case l.yh.MouseInteraction:case l.yh.Scroll:case l.yh.CanvasMutation:case l.yh.Input:return this.replaceIds(t.data,e,["id"]),t;case l.yh.StyleSheetRule:case l.yh.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case l.yh.Font:return t;case l.yh.Selection:return t.data.ranges.forEach((function(t){r.replaceIds(t,e,["start","end"])})),t;case l.yh.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((function(t){r.replaceStyleIds(t,e,["styleId"])})),t}}return!1}},{key:"replace",value:function(e,t,n,i){var o,a=(0,r.Z)(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;(Array.isArray(t[s])||"number"===typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]))}}catch(u){a.e(u)}finally{a.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===a.Jq.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((function(e){n.patchRootIdOnNode(e,t)}))}}]),e}(),V=function(){function e(t){(0,o.Z)(this,e),this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}return(0,i.Z)(e,[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n=this;if((0,a.DS)(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=C(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((function(){return r.disconnect()})),this.restoreHandlers.push(M(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),n.restoreHandlers.push(R({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))}),0)}}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,t){var n=this;this.restoreHandlers.push((0,c.r$)(e.prototype,"attachShadow",(function(e){return function(r){var i=e.call(this,r);return this.shadowRoot&&(0,c._f)(this)&&n.addShadowRoot(this.shadowRoot,t),i}})))}},{key:"reset",value:function(){this.restoreHandlers.forEach((function(e){try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),e}(),B=n(4165),j=n(3246),H=n(3464),U=new Map;var W=function(e,t,n){if(e&&(z(e,t)||"object"===typeof e)){var r=function(e,t){var n=U.get(e);return n||(n=new Map,U.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function q(e,t,n){if(e instanceof Array)return e.map((function(e){return q(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:(0,H.c)(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[q(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[q(e.data,t,n),e.width,e.height]}:z(e,t)||"object"===typeof e?{rr_type:e.constructor.name,index:W(e,t,n)}:e}var G=function(e,t,n){return e.map((function(e){return q(e,t,n)}))},z=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"===typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function $(e,t,n,r){var i=[];try{var o=(0,c.r$)(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if(!(0,c.IT)(this,t,n,!0)){var u=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&"object"===typeof a[0]){var l=a[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i].concat(a))}}));i.push(o)}catch(Q){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){i.forEach((function(e){return e()}))}}function Y(e,t,n,i,o,a,s){var u,l=[],d=Object.getOwnPropertyNames(e),f=(0,r.Z)(d);try{var h=function(){var r=u.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(r))return 0;try{if("function"!==typeof e[r])return 0;var a=(0,c.r$)(e,r,(function(e){return function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var d=e.apply(this,u);if(W(d,s,this),"tagName"in this.canvas&&!(0,c.IT)(this.canvas,i,o,!0)){var f=G(u,s,this),h={type:t,property:r,args:f};n(this.canvas,h)}return d}}));l.push(a)}catch(Q){var d=(0,c.yU)(e,r,{set:function(e){n(this.canvas,{type:t,property:r,args:[e],setter:!0})}});l.push(d)}};for(f.s();!(u=f.n()).done;)h()}catch(p){f.e(p)}finally{f.f()}return l}var Q,X,K,J,ee=function(e,t){var n;return function(r){return n=n||function(e,t){var n=function(e,t){var n=void 0===t?null:t,r=e.toString().split("\n");r.pop(),r.shift();for(var i=r[0].search(/\S/),o=/(['"])__worker_loader_strict__(['"])/g,a=0,s=r.length;a<s;++a)r[a]=r[a].substring(i).replace(o,"$1use strict$2")+"\n";return n&&r.push("//# sourceMappingURL="+n+"\n"),r}(e,t),r=new Blob(n,{type:"application/javascript"});return URL.createObjectURL(r)}(e,t),new Worker(n,r)}}((function(){!function(){function e(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="undefined"===typeof Uint8Array?[]:new Uint8Array(256),r=0;r<64;r++)n[t.charCodeAt(r)]=r;var i=function(e){var n,r=new Uint8Array(e),i=r.length,o="";for(n=0;n<i;n+=3)o+=t[r[n]>>2],o+=t[(3&r[n])<<4|r[n+1]>>4],o+=t[(15&r[n+1])<<2|r[n+2]>>6],o+=t[63&r[n+2]];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},o=new Map,a=new Map;function s(t,n,r){return e(this,void 0,void 0,(0,B.Z)().mark((function e(){var o,s,u,c,l;return(0,B.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o="".concat(t,"-").concat(n),!("OffscreenCanvas"in globalThis)){e.next=17;break}if(!a.has(o)){e.next=4;break}return e.abrupt("return",a.get(o));case 4:return(s=new OffscreenCanvas(t,n)).getContext("2d"),e.next=8,s.convertToBlob(r);case 8:return u=e.sent,e.next=11,u.arrayBuffer();case 11:return c=e.sent,l=i(c),a.set(o,l),e.abrupt("return",l);case 17:return e.abrupt("return","");case 18:case"end":return e.stop()}}),e)})))}var u=self;u.onmessage=function(t){return e(this,void 0,void 0,(0,B.Z)().mark((function e(){var n,r,a,c,l,d,f,h,p,v,m,g;return(0,B.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("OffscreenCanvas"in globalThis)){e.next=31;break}return n=t.data,r=n.id,a=n.bitmap,c=n.width,l=n.height,d=n.dataURLOptions,f=s(c,l,d),h=new OffscreenCanvas(c,l),h.getContext("2d").drawImage(a,0,0),a.close(),e.next=9,h.convertToBlob(d);case 9:return p=e.sent,v=p.type,e.next=13,p.arrayBuffer();case 13:if(m=e.sent,g=i(m),e.t0=!o.has(r),!e.t0){e.next=22;break}return e.next=19,f;case 19:e.t1=e.sent,e.t2=g,e.t0=e.t1===e.t2;case 22:if(!e.t0){e.next=25;break}return o.set(r,g),e.abrupt("return",u.postMessage({id:r}));case 25:if(o.get(r)!==g){e.next=27;break}return e.abrupt("return",u.postMessage({id:r}));case 27:u.postMessage({id:r,type:v,base64:g,width:c,height:l}),o.set(r,g),e.next=32;break;case 31:return e.abrupt("return",u.postMessage({id:t.data.id}));case 32:case"end":return e.stop()}}),e)})))}}()}),null),te=function(){function e(t){var n=this;(0,o.Z)(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId)&&n.rafStamps.invokeId||(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var r=t.sampling,i=void 0===r?"all":r,a=t.win,s=t.blockClass,u=t.blockSelector,c=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&"all"===i&&this.initCanvasMutationObserver(a,s,u),c&&"number"===typeof i&&this.initCanvasFPSObserver(i,a,s,u,{dataURLOptions:l})}return(0,i.Z)(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,r,i){var o=this,a=$(t,n,r,!0),s=new Map,u=new ee;u.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,a=n.width,u=n.height;o.mutationCb({id:t,type:l.FX["2D"],commands:[{property:"clearRect",args:[0,0,a,u]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var d,f=1e3/e,h=0;d=requestAnimationFrame((function e(a){h&&a-h<f||(h=a,function(){var e=[];return t.document.querySelectorAll("canvas").forEach((function(t){(0,c.IT)(t,n,r,!0)||e.push(t)})),e}().forEach((function(e){return(0,j.m)(o,void 0,void 0,(0,B.Z)().mark((function t(){var n,r,o,a;return(0,B.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.mirror.getId(e),!s.get(r)){t.next=3;break}return t.abrupt("return");case 3:if(0!==e.width&&0!==e.height){t.next=5;break}return t.abrupt("return");case 5:return s.set(r,!0),["webgl","webgl2"].includes(e.__context)&&(o=e.getContext(e.__context),!1===(null===(n=null===o||void 0===o?void 0:o.getContextAttributes())||void 0===n?void 0:n.preserveDrawingBuffer)&&o.clear(o.COLOR_BUFFER_BIT)),t.next=9,createImageBitmap(e);case 9:a=t.sent,u.postMessage({id:r,bitmap:a,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[a]);case 11:case"end":return t.stop()}}),t,this)})))}))),d=requestAnimationFrame(e)})),this.resetObservers=function(){a(),cancelAnimationFrame(d)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var i=$(e,t,n,!1),o=function(e,t,n,i){var o,a=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),u=(0,r.Z)(s);try{var d=function(){var r=o.value;try{if("function"!==typeof t.CanvasRenderingContext2D.prototype[r])return 1;var s=(0,c.r$)(t.CanvasRenderingContext2D.prototype,r,(function(o){return function(){for(var a=this,s=arguments.length,u=new Array(s),d=0;d<s;d++)u[d]=arguments[d];return(0,c.IT)(this.canvas,n,i,!0)||setTimeout((function(){var n=G(u,t,a);e(a.canvas,{type:l.FX["2D"],property:r,args:n})}),0),o.apply(this,u)}}));a.push(s)}catch(Q){var u=(0,c.yU)(t.CanvasRenderingContext2D.prototype,r,{set:function(t){e(this.canvas,{type:l.FX["2D"],property:r,args:[t],setter:!0})}});a.push(u)}};for(u.s();!(o=u.n()).done;)d()}catch(f){u.e(f)}finally{u.f()}return function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),a=function(e,t,n,r,i){var o=[];return o.push.apply(o,(0,u.Z)(Y(t.WebGLRenderingContext.prototype,l.FX.WebGL,e,n,r,0,t))),"undefined"!==typeof t.WebGL2RenderingContext&&o.push.apply(o,(0,u.Z)(Y(t.WebGL2RenderingContext.prototype,l.FX.WebGL2,e,n,r,0,t))),function(){o.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){i(),o(),a()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){return(0,j._)(e,["type"])})),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),ne=function(){function e(t){(0,o.Z)(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new c.ug,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return(0,i.Z)(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,i={id:t,styleIds:[]},o=[],s=(0,r.Z)(e);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=void 0;this.styleMirror.has(u)?c=this.styleMirror.getId(u):(c=this.styleMirror.add(u),o.push({styleId:c,rules:Array.from(u.rules||CSSRule,(function(e,t){return{rule:(0,a.MK)(e),index:t}}))})),i.styleIds.push(c)}}catch(l){s.e(l)}finally{s.f()}o.length>0&&(i.styles=o),this.adoptedStyleSheetCb(i)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),re=function(){function e(){(0,o.Z)(this,e),this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}return(0,i.Z)(e,[{key:"periodicallyClear",value:function(){var e=this;requestAnimationFrame((function(){e.clear(),e.loop&&e.periodicallyClear()}))}},{key:"inOtherBuffer",value:function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some((function(e){return e!==t}))}},{key:"add",value:function(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"clear",value:function(){this.nodeMap=new WeakMap}},{key:"destroy",value:function(){this.loop=!1}}]),e}(),ie=!1;try{if(2!==Array.from([1],(function(e){return 2*e}))[0]){var oe=document.createElement("iframe");document.body.appendChild(oe),Array.from=(null===(Q=oe.contentWindow)||void 0===Q?void 0:Q.Array.from)||Array.from,document.body.removeChild(oe)}}catch(pe){console.debug("Unable to override Array.from",pe)}var ae=(0,a.bZ)();function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,i=e.checkoutEveryNth,o=e.blockClass,s=void 0===o?"rr-block":o,u=e.blockSelector,d=void 0===u?null:u,f=e.ignoreClass,h=void 0===f?"rr-ignore":f,p=e.ignoreSelector,v=void 0===p?null:p,m=e.maskTextClass,g=void 0===m?"rr-mask":m,y=e.maskTextSelector,b=void 0===y?null:y,w=e.inlineStylesheet,I=void 0===w||w,C=e.maskAllInputs,T=e.maskInputOptions,M=e.slimDOMOptions,N=e.maskInputFn,A=e.maskTextFn,_=e.hooks,D=e.packFn,R=e.sampling,L=void 0===R?{}:R,Z=e.dataURLOptions,F=void 0===Z?{}:Z,B=e.mousemoveWait,j=e.recordDOM,H=void 0===j||j,U=e.recordCanvas,W=void 0!==U&&U,q=e.recordCrossOriginIframes,G=void 0!==q&&q,z=e.recordAfter,$=void 0===z?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":z,Y=e.userTriggeredOnInput,Q=void 0!==Y&&Y,ee=e.collectFonts,oe=void 0!==ee&&ee,se=e.inlineImages,ue=void 0!==se&&se,ce=e.plugins,le=e.keepIframeSrcFn,de=void 0===le?function(){return!1}:le,fe=e.ignoreCSSAttributes,he=void 0===fe?new Set([]):fe;k(e.errorHandler);var ve=!G||window.parent===window,me=!1;if(!ve)try{window.parent.document&&(me=!1)}catch(Le){me=!0}if(ve&&!t)throw new Error("emit function is required");void 0!==B&&void 0===L.mousemove&&(L.mousemove=B),ae.reset();var ge,ye=!0===C?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==T?T:{password:!0},be=!0===M||"all"===M?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===M,headMetaDescKeywords:"all"===M}:M||{};(0,c.OK)();var we=0,ke=function(e){var t,n=(0,r.Z)(ce||[]);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.eventProcessor&&(e=i.eventProcessor(e))}}catch(pe){n.e(pe)}finally{n.f()}return D&&!me&&(e=D(e)),e};X=function(e,r){var o,a=e;if(a.timestamp=(0,c.zq)(),!(null===(o=x[0])||void 0===o?void 0:o.isFrozen())||a.type===l.tw.FullSnapshot||a.type===l.tw.IncrementalSnapshot&&a.data.source===l.yh.Mutation||x.forEach((function(e){return e.unfreeze()})),ve)null===t||void 0===t||t(ke(a),r);else if(me){var s={type:"rrweb",event:ke(a),origin:window.location.origin,isCheckout:r};window.parent.postMessage(s,"*")}if(a.type===l.tw.FullSnapshot)ge=a,we=0;else if(a.type===l.tw.IncrementalSnapshot){if(a.data.source===l.yh.Mutation&&a.data.isAttachIframe)return;we++;var u=i&&we>=i,d=n&&a.timestamp-ge.timestamp>n;(u||d)&&K(!0)}};var Ee,Se=function(e){X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Mutation},e)})},xe=function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Scroll},e)})},Ie=function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.CanvasMutation},e)})},Ce=new ne({mutationCb:Se,adoptedStyleSheetCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.AdoptedStyleSheet},e)})}}),Te=new P({mirror:ae,mutationCb:Se,stylesheetManager:Ce,recordCrossOriginIframes:G,wrappedEmit:X}),Me=(0,r.Z)(ce||[]);try{for(Me.s();!(Ee=Me.n()).done;){var Ne=Ee.value;Ne.getMirror&&Ne.getMirror({nodeMirror:ae,crossOriginIframeMirror:Te.crossOriginIframeMirror,crossOriginIframeStyleMirror:Te.crossOriginIframeStyleMirror})}}catch(pe){Me.e(pe)}finally{Me.f()}var Ae=new re;J=new te({recordCanvas:W,mutationCb:Ie,win:window,blockClass:s,blockSelector:d,mirror:ae,sampling:L.canvas,dataURLOptions:F});var _e=new V({mutationCb:Se,scrollCb:xe,bypassOptions:{blockClass:s,blockSelector:d,maskTextClass:g,maskTextSelector:b,inlineStylesheet:I,maskInputOptions:ye,dataURLOptions:F,maskTextFn:A,maskInputFn:N,recordCanvas:W,inlineImages:ue,sampling:L,slimDOMOptions:be,iframeManager:Te,stylesheetManager:Ce,canvasManager:J,keepIframeSrcFn:de,processedNodeManager:Ae},mirror:ae});K=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(H){X({type:l.tw.Meta,data:{href:window.location.href,width:(0,c.fM)(),height:(0,c.gp)()}},e),Ce.reset(),_e.init(),x.forEach((function(e){return e.lock()}));var t=(0,a.CO)(document,{mirror:ae,blockClass:s,blockSelector:d,maskTextClass:g,maskTextSelector:b,inlineStylesheet:I,maskAllInputs:ye,maskTextFn:A,slimDOM:be,dataURLOptions:F,recordCanvas:W,inlineImages:ue,onSerialize:function(e){(0,c.Cj)(e,ae)&&Te.addIframe(e),(0,c.qs)(e,ae)&&Ce.trackLinkElement(e),(0,c.He)(e)&&_e.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){Te.attachIframe(e,t),_e.observeAttachShadow(e)},onStylesheetLoad:function(e,t){Ce.attachLinkElement(e,t)},keepIframeSrcFn:de});if(!t)return console.warn("Failed to snapshot the document");X({type:l.tw.FullSnapshot,data:{node:t,initialOffset:(0,c.$1)(window)}},e),x.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ce.adoptStyleSheets(document.adoptedStyleSheets,ae.getId(document))}};try{var De=[],Re=function(e){var t;return S(O)({mutationCb:Se,mousemoveCb:function(e,t){return X({type:l.tw.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MouseInteraction},e)})},scrollCb:xe,viewportResizeCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.ViewportResize},e)})},inputCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Input},e)})},mediaInteractionCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MediaInteraction},e)})},styleSheetRuleCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleSheetRule},e)})},styleDeclarationCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleDeclaration},e)})},canvasMutationCb:Ie,fontCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Font},e)})},selectionCb:function(e){X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Selection},e)})},customElementCb:function(e){X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.CustomElement},e)})},blockClass:s,ignoreClass:h,ignoreSelector:v,maskTextClass:g,maskTextSelector:b,maskInputOptions:ye,inlineStylesheet:I,sampling:L,recordDOM:H,recordCanvas:W,inlineImages:ue,userTriggeredOnInput:Q,collectFonts:oe,doc:e,maskInputFn:N,maskTextFn:A,keepIframeSrcFn:de,blockSelector:d,slimDOMOptions:be,dataURLOptions:F,mirror:ae,iframeManager:Te,stylesheetManager:Ce,shadowDomManager:_e,processedNodeManager:Ae,canvasManager:J,ignoreCSSAttributes:he,plugins:(null===(t=null===ce||void 0===ce?void 0:ce.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return X({type:l.tw.Plugin,data:{plugin:e.name,payload:t}})}}})))||[]},_)};Te.addLoadListener((function(e){try{De.push(Re(e.contentDocument))}catch(t){console.warn(t)}}));var Oe=function(){K(),De.push(Re(document)),ie=!0};return"interactive"===document.readyState||"complete"===document.readyState?Oe():(De.push((0,c.on)("DOMContentLoaded",(function(){X({type:l.tw.DomContentLoaded,data:{}}),"DOMContentLoaded"===$&&Oe()}))),De.push((0,c.on)("load",(function(){X({type:l.tw.Load,data:{}}),"load"===$&&Oe()}),window))),function(){De.forEach((function(e){return e()})),Ae.destroy(),ie=!1,E()}}catch(Ze){console.warn(Ze)}}se.addCustomEvent=function(e,t){if(!ie)throw new Error("please add custom event after start recording");X({type:l.tw.Custom,data:{tag:e,payload:t}})},se.freezePage=function(){x.forEach((function(e){return e.freeze()}))},se.takeFullSnapshot=function(e){if(!ie)throw new Error("please take full snapshot after start recording");K(e)},se.mirror=ae;var ue=function(e){var t=function(t){try{if((i=t.target)&&(i instanceof HTMLInputElement&&/|text|email|number|password|search|tel|url/.test(i.type||"")||i instanceof HTMLTextAreaElement)&&!i.disabled&&!i.readOnly)return;n=function(e){return(e.ctrlKey?"ctrl ":"")+(e.altKey?"alt ":"")+(e.shiftKey?"shift ":"")+(e.metaKey?"meta ":"")+e.key}(t),r=t.target,e({key:n,eventTarget:r})}catch(o){}var n,r,i};window.addEventListener("keyup",(function(e){t(e)}))},ce=n(4228),le=n(458),de=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;(0,o.Z)(this,e),this.target=n,this.onEvent=r,this.observer=void 0,this.monitoredTextElements=[],this.inputEnabledSelectors=["[contenteditable=true]"].join(","),this.iframeObservers=[],this.monitorInputEnabledElement=function(e){e.addEventListener("input",(function(e){var n;t.onEvent({text:null===(n=e.target)||void 0===n?void 0:n.innerText,eventTarget:e.target})}))}}return(0,i.Z)(e,[{key:"startObserver",value:function(){var e=this;this.startIframesObserver(),this.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.querySelector){var n=t.querySelector("iframe");n&&console.log("FFF",n)}if(t.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE){var r=t;r.matches(e.inputEnabledSelectors)||r.isContentEditable?e.monitorInputEnabledElement(r):Array.from((0,le.RA)("*",r)).filter((function(t){return t.matches&&t.matches(e.inputEnabledSelectors)||t.isContentEditable})).forEach(e.monitorInputEnabledElement)}}))}))})),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.startInputMonitoring()}},{key:"startIframesObserver",value:function(){var t=this;setInterval((function(){(0,le.RA)("iframe",t.target).forEach((function(n){if(!t.iframeObservers.find((function(e){return e.iframe===n}))){var r=new e(n.contentWindow.document,t.onEvent);t.iframeObservers.push({iframe:n,observer:r}),r.startObserver()}}))}),500)}},{key:"startInputMonitoring",value:function(){this.monitoredTextElements=(0,le.RA)(this.inputEnabledSelectors,this.target),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}}]),e}(),fe=function(){function e(t){var n=this;(0,o.Z)(this,e),this.onEvent=t,this.currentURL=void 0,this.onURLChange=function(){setTimeout((function(){var e=window.location.href;if(e!==n.currentURL){n.currentURL=e;try{n.onEvent({url:e})}catch(t){}}}))}}return(0,i.Z)(e,[{key:"start",value:function(){var e=this;window.addEventListener("popstate",(function(t){e.onURLChange()})),window.addEventListener("locationchange",(function(t){e.onURLChange()})),window.addEventListener("hashchange",(function(t){e.onURLChange()}));var t=window.history.pushState;window.history.pushState=function(){e.onURLChange();for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.apply(window.history,r)};var n=window.history.replaceState;window.history.replaceState=function(){e.onURLChange();for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return n.apply(window.history,r)}}}]),e}(),he=(0,i.Z)((function e(t){var n=this;(0,o.Z)(this,e),this.contentEditableObserver=void 0,this.urlObserver=void 0,this.logNativeMutationObserver=!1,this.stopRRWebRecording=function(){},this.eventHandler=void 0,this.currentURL=void 0,this.start=function(){n.stopRRWebRecording=se({emit:n.eventHandler,sampling:{mousemove:!1},userTriggeredOnInput:!0}),n.logNativeMutationObserver&&n.selfObserve(),n.startURLObserver(),n.startKeyboardObserver(),n.startContentEditableObserver()},this.stop=function(){n.stopRRWebRecording()},this.startURLObserver=function(){n.urlObserver=new fe((function(e){var t={url:e.url};n.addCustomEvent(ce.N.URLChange,t)})),n.urlObserver.start()},this.startContentEditableObserver=function(){n.contentEditableObserver=new de(document,(function(e){var t,r=e.text,i=e.eventTarget,o={text:r,id:null===(t=n.tryGetMetaFromEventTarget(i))||void 0===t?void 0:t.id};n.addCustomEvent(ce.N.ContentEditableInput,o)})),n.contentEditableObserver.startObserver()},this.startKeyboardObserver=function(){ue((function(e){var t,r=e.key,i=e.eventTarget,o={key:r,id:null===(t=n.tryGetMetaFromEventTarget(i))||void 0===t?void 0:t.id};n.addCustomEvent(ce.N.KeyStroke,o)}))},this.addCustomEvent=function(e,t){se.addCustomEvent(e,t)},this.tryGetMetaFromEventTarget=function(e){try{return n.getMeta(e)}catch(t){}},this.selfObserve=function(){var e=document.getElementsByTagName("body");new MutationObserver((function(e,t){var n,i=(0,r.Z)(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;"childList"===o.type?console.log("A child node has been added or removed.",o):"attributes"===o.type&&console.log("The ".concat(o.attributeName," attribute was modified."),o)}}catch(pe){i.e(pe)}finally{i.f()}})).observe(e[0],{attributes:!0,childList:!0,subtree:!0})},this.getNodeById=function(e){return se.mirror.getNode(e)},this.getMeta=function(e){return se.mirror.getMeta(e)},this.eventHandler=t,this.currentURL=window.location.href}))},4228:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});var r=function(e){return e.KeyStroke="key-stroke",e.ContentEditableInput="contenteditable-input",e.URLChange="url-change",e}({})},6301:function(e){e.exports=function(e){return new Promise((function(t){return setTimeout(t,e)}))}},763:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,c=32,l=64,d=128,f=256,h=1/0,p=9007199254740991,v=NaN,m=4294967295,g=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",f]],y="[object Arguments]",b="[object Array]",w="[object Boolean]",k="[object Date]",E="[object Error]",S="[object Function]",x="[object GeneratorFunction]",I="[object Map]",C="[object Number]",T="[object Object]",M="[object Promise]",N="[object RegExp]",A="[object Set]",_="[object String]",D="[object Symbol]",R="[object WeakMap]",O="[object ArrayBuffer]",L="[object DataView]",Z="[object Float32Array]",F="[object Float64Array]",P="[object Int8Array]",V="[object Int16Array]",B="[object Int32Array]",j="[object Uint8Array]",H="[object Uint8ClampedArray]",U="[object Uint16Array]",W="[object Uint32Array]",q=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,Q=RegExp($.source),X=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,ke=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ee=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",Ie="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Te="a-z\\xdf-\\xf6\\xf8-\\xff",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",Ne="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_e="['\u2019]",De="["+xe+"]",Re="["+Ae+"]",Oe="["+Ie+"]",Le="\\d+",Ze="["+Ce+"]",Fe="["+Te+"]",Pe="[^"+xe+Ae+Le+Ce+Te+Me+"]",Ve="\\ud83c[\\udffb-\\udfff]",Be="[^"+xe+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Me+"]",We="\\u200d",qe="(?:"+Fe+"|"+Pe+")",Ge="(?:"+Ue+"|"+Pe+")",ze="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",$e="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+Oe+"|"+Ve+")"+"?",Qe="["+Ne+"]?",Xe=Qe+Ye+("(?:"+We+"(?:"+[Be,je,He].join("|")+")"+Qe+Ye+")*"),Ke="(?:"+[Ze,je,He].join("|")+")"+Xe,Je="(?:"+[Be+Oe+"?",Oe,je,He,De].join("|")+")",et=RegExp(_e,"g"),tt=RegExp(Oe,"g"),nt=RegExp(Ve+"(?="+Ve+")|"+Je+Xe,"g"),rt=RegExp([Ue+"?"+Fe+"+"+ze+"(?="+[Re,Ue,"$"].join("|")+")",Ge+"+"+$e+"(?="+[Re,Ue+qe,"$"].join("|")+")",Ue+"?"+qe+"+"+ze,Ue+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Ke].join("|"),"g"),it=RegExp("["+We+xe+Ie+Ne+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,ut={};ut[Z]=ut[F]=ut[P]=ut[V]=ut[B]=ut[j]=ut[H]=ut[U]=ut[W]=!0,ut[y]=ut[b]=ut[O]=ut[w]=ut[L]=ut[k]=ut[E]=ut[S]=ut[I]=ut[C]=ut[T]=ut[N]=ut[A]=ut[_]=ut[R]=!1;var ct={};ct[y]=ct[b]=ct[O]=ct[L]=ct[w]=ct[k]=ct[Z]=ct[F]=ct[P]=ct[V]=ct[B]=ct[I]=ct[C]=ct[T]=ct[N]=ct[A]=ct[_]=ct[D]=ct[j]=ct[H]=ct[U]=ct[W]=!0,ct[E]=ct[S]=ct[R]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ft=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,vt=ht||pt||Function("return this")(),mt=t&&!t.nodeType&&t,gt=mt&&e&&!e.nodeType&&e,yt=gt&&gt.exports===mt,bt=yt&&ht.process,wt=function(){try{var e=gt&&gt.require&&gt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),kt=wt&&wt.isArrayBuffer,Et=wt&&wt.isDate,St=wt&&wt.isMap,xt=wt&&wt.isRegExp,It=wt&&wt.isSet,Ct=wt&&wt.isTypedArray;function Tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Mt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Nt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Dt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Rt(e,t){return!!(null==e?0:e.length)&&Ut(e,t,0)>-1}function Ot(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Lt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Zt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Pt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Vt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Bt=zt("length");function jt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ht(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ut(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ht(e,qt,n)}function Wt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function qt(e){return e!==e}function Gt(e,t){var n=null==e?0:e.length;return n?Qt(e,t)/n:v}function zt(e){return function(t){return null==t?i:t[e]}}function $t(e){return function(t){return null==e?i:e[t]}}function Yt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Qt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Kt(e){return e?e.slice(0,mn(e)+1).replace(ae,""):e}function Jt(e){return function(t){return e(t)}}function en(e,t){return Lt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Ut(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var on=$t({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=$t({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(e){return"\\"+lt[e]}function un(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return un(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):Bt(e)}function vn(e){return un(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function mn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var gn=$t({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yn=function e(t){var n=(t=null==t?vt:yn.defaults(vt.Object(),t,yn.pick(vt,at))).Array,r=t.Date,se=t.Error,xe=t.Function,Ie=t.Math,Ce=t.Object,Te=t.RegExp,Me=t.String,Ne=t.TypeError,Ae=n.prototype,_e=xe.prototype,De=Ce.prototype,Re=t["__core-js_shared__"],Oe=_e.toString,Le=De.hasOwnProperty,Ze=0,Fe=function(){var e=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Pe=De.toString,Ve=Oe.call(Ce),Be=vt._,je=Te("^"+Oe.call(Le).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=yt?t.Buffer:i,Ue=t.Symbol,We=t.Uint8Array,qe=He?He.allocUnsafe:i,Ge=ln(Ce.getPrototypeOf,Ce),ze=Ce.create,$e=De.propertyIsEnumerable,Ye=Ae.splice,Qe=Ue?Ue.isConcatSpreadable:i,Xe=Ue?Ue.iterator:i,Ke=Ue?Ue.toStringTag:i,Je=function(){try{var e=fo(Ce,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==vt.clearTimeout&&t.clearTimeout,it=r&&r.now!==vt.Date.now&&r.now,lt=t.setTimeout!==vt.setTimeout&&t.setTimeout,ht=Ie.ceil,pt=Ie.floor,mt=Ce.getOwnPropertySymbols,gt=He?He.isBuffer:i,bt=t.isFinite,wt=Ae.join,Bt=ln(Ce.keys,Ce),$t=Ie.max,bn=Ie.min,wn=r.now,kn=t.parseInt,En=Ie.random,Sn=Ae.reverse,xn=fo(t,"DataView"),In=fo(t,"Map"),Cn=fo(t,"Promise"),Tn=fo(t,"Set"),Mn=fo(t,"WeakMap"),Nn=fo(Ce,"create"),An=Mn&&new Mn,_n={},Dn=Po(xn),Rn=Po(In),On=Po(Cn),Ln=Po(Tn),Zn=Po(Mn),Fn=Ue?Ue.prototype:i,Pn=Fn?Fn.valueOf:i,Vn=Fn?Fn.toString:i;function Bn(e){if(ts(e)&&!Wa(e)&&!(e instanceof Wn)){if(e instanceof Un)return e;if(Le.call(e,"__wrapped__"))return Vo(e)}return new Un(e)}var jn=function(){function e(){}return function(t){if(!es(t))return{};if(ze)return ze(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Hn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new zn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Qn(e,t){var n=Wa(e),r=!n&&Ua(e),i=!n&&!r&&$a(e),o=!n&&!r&&!i&&cs(e),a=n||r||i||o,s=a?Xt(e.length,Me):[],u=s.length;for(var c in e)!t&&!Le.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,u))||s.push(c);return s}function Xn(e){var t=e.length;return t?e[$r(0,t-1)]:i}function Kn(e,t){return Lo(Ni(e),sr(t,0,e.length))}function Jn(e){return Lo(Ni(e))}function er(e,t,n){(n!==i&&!Ba(e[t],n)||n===i&&!(t in e))&&or(e,t,n)}function tr(e,t,n){var r=e[t];Le.call(e,t)&&Ba(r,n)&&(n!==i||t in e)||or(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function rr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ir(e,t){return e&&Ai(t,_s(t),e)}function or(e,t,n){"__proto__"==t&&Je?Je(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,o=t.length,a=n(o),s=null==e;++r<o;)a[r]=s?i:Cs(e,t[r]);return a}function sr(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ur(e,t,n,r,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!es(e))return e;var d=Wa(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Le.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Ni(e,s)}else{var f=vo(e),h=f==S||f==x;if($a(e))return Si(e,u);if(f==T||f==y||h&&!o){if(s=c||h?{}:go(e),!u)return c?function(e,t){return Ai(e,po(e),t)}(e,function(e,t){return e&&Ai(t,Ds(t),e)}(s,e)):function(e,t){return Ai(e,ho(e),t)}(e,ir(s,e))}else{if(!ct[f])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case O:return xi(e);case w:case k:return new r(+e);case L:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case Z:case F:case P:case V:case B:case j:case H:case U:case W:return Ii(e,n);case I:return new r;case C:case _:return new r(e);case N:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new r;case D:return i=e,Pn?Ce(Pn.call(i)):{}}var i}(e,f,u)}}a||(a=new Yn);var p=a.get(e);if(p)return p;a.set(e,s),as(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,a))})):ns(e)&&e.forEach((function(r,i){s.set(i,ur(r,t,n,i,e,a))}));var v=d?i:(l?c?io:ro:c?Ds:_s)(e);return Nt(v||e,(function(r,i){v&&(r=e[i=r]),tr(s,i,ur(r,t,n,i,e,a))})),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Ne(o);return _o((function(){e.apply(i,n)}),t)}function dr(e,t,n,r){var i=-1,o=Rt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Lt(t,Jt(n))),r?(o=Ot,a=!1):t.length>=200&&(o=tn,a=!1,t=new $n(t));e:for(;++i<s;){var l=e[i],d=null==n?l:n(l);if(l=r||0!==l?l:0,a&&d===d){for(var f=c;f--;)if(t[f]===d)continue e;u.push(l)}else o(t,d,r)||u.push(l)}return u}Bn.templateSettings={escape:K,evaluate:J,interpolate:ee,variable:"",imports:{_:Bn}},Bn.prototype=Hn.prototype,Bn.prototype.constructor=Bn,Un.prototype=jn(Hn.prototype),Un.prototype.constructor=Un,Wn.prototype=jn(Hn.prototype),Wn.prototype.constructor=Wn,qn.prototype.clear=function(){this.__data__=Nn?Nn(null):{},this.size=0},qn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qn.prototype.get=function(e){var t=this.__data__;if(Nn){var n=t[e];return n===a?i:n}return Le.call(t,e)?t[e]:i},qn.prototype.has=function(e){var t=this.__data__;return Nn?t[e]!==i:Le.call(t,e)},qn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Nn&&t===i?a:t,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ye.call(t,n,1),--this.size,!0)},Gn.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?i:t[n][1]},Gn.prototype.has=function(e){return nr(this.__data__,e)>-1},Gn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(In||Gn),string:new qn}},zn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},zn.prototype.get=function(e){return co(this,e).get(e)},zn.prototype.has=function(e){return co(this,e).has(e)},zn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},$n.prototype.add=$n.prototype.push=function(e){return this.__data__.set(e,a),this},$n.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!In||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ri(wr),hr=Ri(kr,!0);function pr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function vr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s===s&&!us(s):n(s,u)))var u=s,c=a}return c}function mr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function gr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=yo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?gr(s,t-1,n,r,i):Zt(i,s):r||(i[i.length]=s)}return i}var yr=Oi(),br=Oi(!0);function wr(e,t){return e&&yr(e,t,_s)}function kr(e,t){return e&&br(e,t,_s)}function Er(e,t){return Dt(t,(function(t){return Xa(e[t])}))}function Sr(e,t){for(var n=0,r=(t=bi(t,e)).length;null!=e&&n<r;)e=e[Fo(t[n++])];return n&&n==r?e:i}function xr(e,t,n){var r=t(e);return Wa(e)?r:Zt(r,n(e))}function Ir(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ke&&Ke in Ce(e)?function(e){var t=Le.call(e,Ke),n=e[Ke];try{e[Ke]=i;var r=!0}catch(a){}var o=Pe.call(e);r&&(t?e[Ke]=n:delete e[Ke]);return o}(e):function(e){return Pe.call(e)}(e)}function Cr(e,t){return e>t}function Tr(e,t){return null!=e&&Le.call(e,t)}function Mr(e,t){return null!=e&&t in Ce(e)}function Nr(e,t,r){for(var o=r?Ot:Rt,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,d=[];u--;){var f=e[u];u&&t&&(f=Lt(f,Jt(t))),l=bn(f.length,l),c[u]=!r&&(t||a>=120&&f.length>=120)?new $n(u&&f):i}f=e[0];var h=-1,p=c[0];e:for(;++h<a&&d.length<l;){var v=f[h],m=t?t(v):v;if(v=r||0!==v?v:0,!(p?tn(p,m):o(d,m,r))){for(u=s;--u;){var g=c[u];if(!(g?tn(g,m):o(e[u],m,r)))continue e}p&&p.push(m),d.push(v)}}return d}function Ar(e,t,n){var r=null==(e=Mo(e,t=bi(t,e)))?e:e[Fo(Qo(t))];return null==r?i:Tt(r,e,n)}function _r(e){return ts(e)&&Ir(e)==y}function Dr(e,t,n,r,o){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!==e&&t!==t:function(e,t,n,r,o,a){var s=Wa(e),u=Wa(t),c=s?b:vo(e),l=u?b:vo(t),d=(c=c==y?T:c)==T,f=(l=l==y?T:l)==T,h=c==l;if(h&&$a(e)){if(!$a(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new Yn),s||cs(e)?to(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!o(new We(e),new We(t)));case w:case k:case C:return Ba(+e,+t);case E:return e.name==t.name&&e.message==t.message;case N:case _:return e==t+"";case I:var s=cn;case A:var u=1&r;if(s||(s=fn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=to(s(e),s(t),r,i,o,a);return a.delete(e),l;case D:if(Pn)return Pn.call(e)==Pn.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var p=d&&Le.call(e,"__wrapped__"),v=f&&Le.call(t,"__wrapped__");if(p||v){var m=p?e.value():e,g=v?t.value():t;return a||(a=new Yn),o(m,g,n,r,a)}}if(!h)return!1;return a||(a=new Yn),function(e,t,n,r,o,a){var s=1&n,u=ro(e),c=u.length,l=ro(t),d=l.length;if(c!=d&&!s)return!1;var f=c;for(;f--;){var h=u[f];if(!(s?h in t:Le.call(t,h)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);var g=s;for(;++f<c;){var y=e[h=u[f]],b=t[h];if(r)var w=s?r(b,y,h,t,e,a):r(y,b,h,e,t,a);if(!(w===i?y===b||o(y,b,n,r,a):w)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var k=e.constructor,E=t.constructor;k==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof k&&k instanceof k&&"function"==typeof E&&E instanceof E||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,n,r,o,a)}(e,t,n,r,Dr,o))}function Rr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=Ce(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],d=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var f=new Yn;if(r)var h=r(l,d,c,e,t,f);if(!(h===i?Dr(d,l,3,r,f):h))return!1}}return!0}function Or(e){return!(!es(e)||(t=e,Fe&&Fe in t))&&(Xa(e)?je:ye).test(Po(e));var t}function Lr(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Wa(e)?jr(e[0],e[1]):Br(e):fu(e)}function Zr(e){if(!xo(e))return Bt(e);var t=[];for(var n in Ce(e))Le.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fr(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=xo(e),n=[];for(var r in e)("constructor"!=r||!t&&Le.call(e,r))&&n.push(r);return n}function Pr(e,t){return e<t}function Vr(e,t){var r=-1,i=Ga(e)?n(e.length):[];return fr(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Br(e){var t=lo(e);return 1==t.length&&t[0][2]?Co(t[0][0],t[0][1]):function(n){return n===e||Rr(n,e,t)}}function jr(e,t){return ko(e)&&Io(t)?Co(Fo(e),t):function(n){var r=Cs(n,e);return r===i&&r===t?Ts(n,e):Dr(t,r,3)}}function Hr(e,t,n,r,o){e!==t&&yr(t,(function(a,s){if(o||(o=new Yn),es(a))!function(e,t,n,r,o,a,s){var u=No(e,n),c=No(t,n),l=s.get(c);if(l)return void er(e,n,l);var d=a?a(u,c,n+"",e,t,s):i,f=d===i;if(f){var h=Wa(c),p=!h&&$a(c),v=!h&&!p&&cs(c);d=c,h||p||v?Wa(u)?d=u:za(u)?d=Ni(u):p?(f=!1,d=Si(c,!0)):v?(f=!1,d=Ii(c,!0)):d=[]:is(c)||Ua(c)?(d=u,Ua(u)?d=gs(u):es(u)&&!Xa(u)||(d=go(c))):f=!1}f&&(s.set(c,d),o(d,c,r,a,s),s.delete(c));er(e,n,d)}(e,t,s,n,Hr,r,o);else{var u=r?r(No(e,s),a,s+"",e,t,o):i;u===i&&(u=a),er(e,s,u)}}),Ds)}function Ur(e,t){var n=e.length;if(n)return bo(t+=t<0?n:0,n)?e[t]:i}function Wr(e,t,n){t=t.length?Lt(t,(function(e){return Wa(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e})):[ru];var r=-1;t=Lt(t,Jt(uo()));var i=Vr(e,(function(e,n,i){var o=Lt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ci(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function qr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Sr(e,a);n(s,a)&&Jr(o,bi(a,e),s)}return o}function Gr(e,t,n,r){var i=r?Wt:Ut,o=-1,a=t.length,s=e;for(e===t&&(t=Ni(t)),n&&(s=Lt(e,Jt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Ye.call(s,u,1),Ye.call(e,u,1);return e}function zr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Ye.call(e,i,1):di(e,i)}}return e}function $r(e,t){return e+pt(En()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Qr(e,t){return Do(To(e,t,ru),e+"")}function Xr(e){return Xn(Bs(e))}function Kr(e,t){var n=Bs(e);return Lo(n,sr(t,0,n.length))}function Jr(e,t,n,r){if(!es(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Fo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var d=u[c];(l=r?r(d,c,u):i)===i&&(l=es(d)?d:bo(t[o+1])?[]:{})}tr(u,c,l),u=u[c]}return e}var ei=An?function(e,t){return An.set(e,t),e}:ru,ti=Je?function(e,t){return Je(e,"toString",{configurable:!0,enumerable:!1,value:eu(t),writable:!0})}:ru;function ni(e){return Lo(Bs(e))}function ri(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function ii(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!us(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ai(e,t,ru,n)}function ai(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!==t,u=null===t,c=us(t),l=t===i;o<a;){var d=pt((o+a)/2),f=n(e[d]),h=f!==i,p=null===f,v=f===f,m=us(f);if(s)var g=r||v;else g=l?v&&(r||h):u?v&&h&&(r||!p):c?v&&h&&!p&&(r||!m):!p&&!m&&(r?f<=t:f<t);g?o=d+1:a=d}return bn(a,4294967294)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Ba(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ui(e){return"number"==typeof e?e:us(e)?v:+e}function ci(e){if("string"==typeof e)return e;if(Wa(e))return Lt(e,ci)+"";if(us(e))return Vn?Vn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function li(e,t,n){var r=-1,i=Rt,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=Ot;else if(o>=200){var c=t?null:Yi(e);if(c)return fn(c);a=!1,i=tn,u=new $n}else u=t?[]:s;e:for(;++r<o;){var l=e[r],d=t?t(l):l;if(l=n||0!==l?l:0,a&&d===d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(l)}else i(u,d,n)||(u!==s&&u.push(d),s.push(l))}return s}function di(e,t){return null==(e=Mo(e,t=bi(t,e)))||delete e[Fo(Qo(t))]}function fi(e,t,n,r){return Jr(e,t,n(Sr(e,t)),r)}function hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof Wn&&(n=n.value()),Ft(t,(function(e,t){return t.func.apply(t.thisArg,Zt([e],t.args))}),n)}function vi(e,t,r){var i=e.length;if(i<2)return i?li(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=dr(a[o]||s,e[u],t,r));return li(gr(a,1),t,r)}function mi(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function gi(e){return za(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function bi(e,t){return Wa(e)?e:ko(e,t)?[e]:Zo(ys(e))}var wi=Qr;function ki(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ri(e,t,n)}var Ei=nt||function(e){return vt.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=qe?qe(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function Ii(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ci(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=us(e),s=t!==i,u=null===t,c=t===t,l=us(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Ti(e,t,r,i){for(var o=-1,a=e.length,s=r.length,u=-1,c=t.length,l=$t(a-s,0),d=n(c+l),f=!i;++u<c;)d[u]=t[u];for(;++o<s;)(f||o<a)&&(d[r[o]]=e[o]);for(;l--;)d[u++]=e[o++];return d}function Mi(e,t,r,i){for(var o=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,d=$t(a-u,0),f=n(d+l),h=!i;++o<d;)f[o]=e[o];for(var p=o;++c<l;)f[p+c]=t[c];for(;++s<u;)(h||o<a)&&(f[p+r[s]]=e[o++]);return f}function Ni(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ai(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?or(n,u,c):tr(n,u,c)}return n}function _i(e,t){return function(n,r){var i=Wa(n)?Mt:rr,o=t?t():{};return i(n,e,uo(r,2),o)}}function Di(e){return Qr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&wo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=Ce(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Ri(e,t){return function(n,r){if(null==n)return n;if(!Ga(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ce(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Oi(e){return function(t,n,r){for(var i=-1,o=Ce(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Li(e){return function(t){var n=un(t=ys(t))?vn(t):i,r=n?n[0]:t.charAt(0),o=n?ki(n,1).join(""):t.slice(1);return r[e]()+o}}function Zi(e){return function(t){return Ft(Xs(Us(t).replace(et,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=jn(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Pi(e){return function(t,n,r){var o=Ce(t);if(!Ga(t)){var a=uo(n,3);t=_s(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function Vi(e){return no((function(t){var n=t.length,r=n,a=Un.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ne(o);if(a&&!u&&"wrapper"==ao(s))var u=new Un([],!0)}for(r=u?r:n;++r<n;){var c=ao(s=t[r]),l="wrapper"==c?oo(s):i;u=l&&Eo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[ao(l[0])].apply(u,l[3]):1==s.length&&Eo(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Wa(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Bi(e,t,r,o,a,s,u,c,l,f){var h=t&d,p=1&t,v=2&t,m=24&t,g=512&t,y=v?i:Fi(e);return function d(){for(var b=arguments.length,w=n(b),k=b;k--;)w[k]=arguments[k];if(m)var E=so(d),S=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,E);if(o&&(w=Ti(w,o,a,m)),s&&(w=Mi(w,s,u,m)),b-=S,m&&b<f){var x=dn(w,E);return zi(e,t,Bi,d.placeholder,r,w,x,c,l,f-b)}var I=p?r:this,C=v?I[e]:e;return b=w.length,c?w=function(e,t){var n=e.length,r=bn(t.length,n),o=Ni(e);for(;r--;){var a=t[r];e[r]=bo(a,n)?o[a]:i}return e}(w,c):g&&b>1&&w.reverse(),h&&l<b&&(w.length=l),this&&this!==vt&&this instanceof d&&(C=y||Fi(C)),C.apply(I,w)}}function ji(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Hi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ci(n),r=ci(r)):(n=ui(n),r=ui(r)),o=e(n,r)}return o}}function Ui(e){return no((function(t){return t=Lt(t,Jt(uo())),Qr((function(n){var r=this;return e(t,(function(e){return Tt(e,r,n)}))}))}))}function Wi(e,t){var n=(t=t===i?" ":ci(t)).length;if(n<2)return n?Yr(t,e):t;var r=Yr(t,ht(e/pn(t)));return un(t)?ki(vn(r),0,e).join(""):r.slice(0,e)}function qi(e){return function(t,r,o){return o&&"number"!=typeof o&&wo(t,r,o)&&(r=o=i),t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r,i){for(var o=-1,a=$t(ht((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:hs(o),e)}}function Gi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function zi(e,t,n,r,o,a,s,u,d,f){var h=8&t;t|=h?c:l,4&(t&=~(h?l:c))||(t&=-4);var p=[e,t,o,h?a:i,h?s:i,h?i:a,h?i:s,u,d,f],v=n.apply(i,p);return Eo(e)&&Ao(v,p),v.placeholder=r,Ro(v,e,t)}function $i(e){var t=Ie[e];return function(e,n){if(e=ms(e),(n=null==n?0:bn(ps(n),292))&&bt(e)){var r=(ys(e)+"e").split("e");return+((r=(ys(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Yi=Tn&&1/fn(new Tn([,-0]))[1]==h?function(e){return new Tn(e)}:uu;function Qi(e){return function(t){var n=vo(t);return n==I?cn(t):n==A?hn(t):function(e,t){return Lt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,r,a,h,p,v,m){var g=2&t;if(!g&&"function"!=typeof e)throw new Ne(o);var y=a?a.length:0;if(y||(t&=-97,a=h=i),v=v===i?v:$t(ps(v),0),m=m===i?m:ps(m),y-=h?h.length:0,t&l){var b=a,w=h;a=h=i}var k=g?i:oo(e),E=[e,t,r,a,h,b,w,p,v,m];if(k&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==d&&8==n||r==d&&n==f&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ti(c,u,t[4]):u,e[4]=c?dn(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Mi(c,u,t[6]):u,e[6]=c?dn(e[5],s):t[6]);(u=t[7])&&(e[7]=u);r&d&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(E,k),e=E[0],t=E[1],r=E[2],a=E[3],h=E[4],!(m=E[9]=E[9]===i?g?0:e.length:$t(E[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)S=8==t||t==u?function(e,t,r){var o=Fi(e);return function a(){for(var s=arguments.length,u=n(s),c=s,l=so(a);c--;)u[c]=arguments[c];var d=s<3&&u[0]!==l&&u[s-1]!==l?[]:dn(u,l);return(s-=d.length)<r?zi(e,t,Bi,a.placeholder,i,u,d,i,i,r-s):Tt(this&&this!==vt&&this instanceof a?o:e,this,u)}}(e,t,m):t!=c&&33!=t||h.length?Bi.apply(i,E):function(e,t,r,i){var o=1&t,a=Fi(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,d=n(l+u),f=this&&this!==vt&&this instanceof t?a:e;++c<l;)d[c]=i[c];for(;u--;)d[c++]=arguments[++s];return Tt(f,o?r:this,d)}}(e,t,r,a);else var S=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==vt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return Ro((k?ei:Ao)(S,E),e,t)}function Ki(e,t,n,r){return e===i||Ba(e,De[n])&&!Le.call(r,n)?t:e}function Ji(e,t,n,r,o,a){return es(e)&&es(t)&&(a.set(t,e),Hr(e,t,i,Ji,a),a.delete(t)),e}function eo(e){return is(e)?i:e}function to(e,t,n,r,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),d=a.get(t);if(l&&d)return l==t&&d==e;var f=-1,h=!0,p=2&n?new $n:i;for(a.set(e,t),a.set(t,e);++f<u;){var v=e[f],m=t[f];if(r)var g=s?r(m,v,f,t,e,a):r(v,m,f,e,t,a);if(g!==i){if(g)continue;h=!1;break}if(p){if(!Vt(t,(function(e,t){if(!tn(p,t)&&(v===e||o(v,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(v!==m&&!o(v,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function no(e){return Do(To(e,i,qo),e+"")}function ro(e){return xr(e,_s,ho)}function io(e){return xr(e,Ds,po)}var oo=An?function(e){return An.get(e)}:uu;function ao(e){for(var t=e.name+"",n=_n[t],r=Le.call(_n,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Le.call(Bn,"placeholder")?Bn:e).placeholder}function uo(){var e=Bn.iteratee||iu;return e=e===iu?Lr:e,arguments.length?e(arguments[0],arguments[1]):e}function co(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function lo(e){for(var t=_s(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Io(i)]}return t}function fo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Or(n)?n:i}var ho=mt?function(e){return null==e?[]:(e=Ce(e),Dt(mt(e),(function(t){return $e.call(e,t)})))}:vu,po=mt?function(e){for(var t=[];e;)Zt(t,ho(e)),e=Ge(e);return t}:vu,vo=Ir;function mo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Fo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&bo(a,i)&&(Wa(e)||Ua(e))}function go(e){return"function"!=typeof e.constructor||xo(e)?{}:jn(Ge(e))}function yo(e){return Wa(e)||Ua(e)||!!(Qe&&e&&e[Qe])}function bo(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function wo(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?Ga(n)&&bo(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function ko(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!us(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ce(t))}function Eo(e){var t=ao(e),n=Bn[t];if("function"!=typeof n||!(t in Wn.prototype))return!1;if(e===n)return!0;var r=oo(n);return!!r&&e===r[0]}(xn&&vo(new xn(new ArrayBuffer(1)))!=L||In&&vo(new In)!=I||Cn&&vo(Cn.resolve())!=M||Tn&&vo(new Tn)!=A||Mn&&vo(new Mn)!=R)&&(vo=function(e){var t=Ir(e),n=t==T?e.constructor:i,r=n?Po(n):"";if(r)switch(r){case Dn:return L;case Rn:return I;case On:return M;case Ln:return A;case Zn:return R}return t});var So=Re?Xa:mu;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||De)}function Io(e){return e===e&&!es(e)}function Co(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Ce(n)))}}function To(e,t,r){return t=$t(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=$t(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(s),Tt(e,this,u)}}function Mo(e,t){return t.length<2?e:Sr(e,ri(t,0,-1))}function No(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var Ao=Oo(ei),_o=lt||function(e,t){return vt.setTimeout(e,t)},Do=Oo(ti);function Ro(e,t,n){var r=t+"";return Do(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Nt(g,(function(n){var r="_."+n[0];t&n[1]&&!Rt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(le):[]}(r),n)))}function Oo(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Lo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=$r(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Zo=function(e){var t=Oa(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)})),t}));function Fo(e){if("string"==typeof e||us(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Po(e){if(null!=e){try{return Oe.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Vo(e){if(e instanceof Wn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Ni(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bo=Qr((function(e,t){return za(e)?dr(e,gr(t,1,za,!0)):[]})),jo=Qr((function(e,t){var n=Qo(t);return za(n)&&(n=i),za(e)?dr(e,gr(t,1,za,!0),uo(n,2)):[]})),Ho=Qr((function(e,t){var n=Qo(t);return za(n)&&(n=i),za(e)?dr(e,gr(t,1,za,!0),i,n):[]}));function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=$t(r+i,0)),Ht(e,uo(t,3),i)}function Wo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ps(n),o=n<0?$t(r+o,0):bn(o,r-1)),Ht(e,uo(t,3),o,!0)}function qo(e){return(null==e?0:e.length)?gr(e,1):[]}function Go(e){return e&&e.length?e[0]:i}var zo=Qr((function(e){var t=Lt(e,gi);return t.length&&t[0]===e[0]?Nr(t):[]})),$o=Qr((function(e){var t=Qo(e),n=Lt(e,gi);return t===Qo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Nr(n,uo(t,2)):[]})),Yo=Qr((function(e){var t=Qo(e),n=Lt(e,gi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Nr(n,i,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xo=Qr(Ko);function Ko(e,t){return e&&e.length&&t&&t.length?Gr(e,t):e}var Jo=no((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return zr(e,Lt(t,(function(e){return bo(e,n)?+e:e})).sort(Ci)),r}));function ea(e){return null==e?e:Sn.call(e)}var ta=Qr((function(e){return li(gr(e,1,za,!0))})),na=Qr((function(e){var t=Qo(e);return za(t)&&(t=i),li(gr(e,1,za,!0),uo(t,2))})),ra=Qr((function(e){var t=Qo(e);return t="function"==typeof t?t:i,li(gr(e,1,za,!0),i,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Dt(e,(function(e){if(za(e))return t=$t(e.length,t),!0})),Xt(t,(function(t){return Lt(e,zt(t))}))}function oa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Lt(n,(function(e){return Tt(t,i,e)}))}var aa=Qr((function(e,t){return za(e)?dr(e,t):[]})),sa=Qr((function(e){return vi(Dt(e,za))})),ua=Qr((function(e){var t=Qo(e);return za(t)&&(t=i),vi(Dt(e,za),uo(t,2))})),ca=Qr((function(e){var t=Qo(e);return t="function"==typeof t?t:i,vi(Dt(e,za),i,t)})),la=Qr(ia);var da=Qr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,oa(e,n)}));function fa(e){var t=Bn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var pa=no((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Wn&&bo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Un(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var va=_i((function(e,t,n){Le.call(e,n)?++e[n]:or(e,n,1)}));var ma=Pi(Uo),ga=Pi(Wo);function ya(e,t){return(Wa(e)?Nt:fr)(e,uo(t,3))}function ba(e,t){return(Wa(e)?At:hr)(e,uo(t,3))}var wa=_i((function(e,t,n){Le.call(e,n)?e[n].push(t):or(e,n,[t])}));var ka=Qr((function(e,t,r){var i=-1,o="function"==typeof t,a=Ga(e)?n(e.length):[];return fr(e,(function(e){a[++i]=o?Tt(t,e,r):Ar(e,t,r)})),a})),Ea=_i((function(e,t,n){or(e,n,t)}));function Sa(e,t){return(Wa(e)?Lt:Vr)(e,uo(t,3))}var xa=_i((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ia=Qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,gr(t,1),[])})),Ca=it||function(){return vt.Date.now()};function Ta(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xi(e,d,i,i,i,i,t)}function Ma(e,t){var n;if("function"!=typeof t)throw new Ne(o);return e=ps(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Na=Qr((function(e,t,n){var r=1;if(n.length){var i=dn(n,so(Na));r|=c}return Xi(e,r,t,n,i)})),Aa=Qr((function(e,t,n){var r=3;if(n.length){var i=dn(n,so(Aa));r|=c}return Xi(t,r,e,n,i)}));function _a(e,t,n){var r,a,s,u,c,l,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ne(o);function v(t){var n=r,o=a;return r=a=i,d=t,u=e.apply(o,n)}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-d>=s}function g(){var e=Ca();if(m(e))return y(e);c=_o(g,function(e){var n=t-(e-l);return h?bn(n,s-(e-d)):n}(e))}function y(e){return c=i,p&&r?v(e):(r=a=i,u)}function b(){var e=Ca(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===i)return function(e){return d=e,c=_o(g,t),f?v(e):u}(l);if(h)return Ei(c),c=_o(g,t),v(l)}return c===i&&(c=_o(g,t)),u}return t=ms(t)||0,es(n)&&(f=!!n.leading,s=(h="maxWait"in n)?$t(ms(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==i&&Ei(c),d=0,r=l=a=c=i},b.flush=function(){return c===i?u:y(Ca())},b}var Da=Qr((function(e,t){return lr(e,1,t)})),Ra=Qr((function(e,t,n){return lr(e,ms(t)||0,n)}));function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ne(o);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Oa.Cache||zn),n}function La(e){if("function"!=typeof e)throw new Ne(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=zn;var Za=wi((function(e,t){var n=(t=1==t.length&&Wa(t[0])?Lt(t[0],Jt(uo())):Lt(gr(t,1),Jt(uo()))).length;return Qr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Tt(e,this,r)}))})),Fa=Qr((function(e,t){var n=dn(t,so(Fa));return Xi(e,c,i,t,n)})),Pa=Qr((function(e,t){var n=dn(t,so(Pa));return Xi(e,l,i,t,n)})),Va=no((function(e,t){return Xi(e,f,i,i,i,t)}));function Ba(e,t){return e===t||e!==e&&t!==t}var ja=Gi(Cr),Ha=Gi((function(e,t){return e>=t})),Ua=_r(function(){return arguments}())?_r:function(e){return ts(e)&&Le.call(e,"callee")&&!$e.call(e,"callee")},Wa=n.isArray,qa=kt?Jt(kt):function(e){return ts(e)&&Ir(e)==O};function Ga(e){return null!=e&&Ja(e.length)&&!Xa(e)}function za(e){return ts(e)&&Ga(e)}var $a=gt||mu,Ya=Et?Jt(Et):function(e){return ts(e)&&Ir(e)==k};function Qa(e){if(!ts(e))return!1;var t=Ir(e);return t==E||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Xa(e){if(!es(e))return!1;var t=Ir(e);return t==S||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ka(e){return"number"==typeof e&&e==ps(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=St?Jt(St):function(e){return ts(e)&&vo(e)==I};function rs(e){return"number"==typeof e||ts(e)&&Ir(e)==C}function is(e){if(!ts(e)||Ir(e)!=T)return!1;var t=Ge(e);if(null===t)return!0;var n=Le.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==Ve}var os=xt?Jt(xt):function(e){return ts(e)&&Ir(e)==N};var as=It?Jt(It):function(e){return ts(e)&&vo(e)==A};function ss(e){return"string"==typeof e||!Wa(e)&&ts(e)&&Ir(e)==_}function us(e){return"symbol"==typeof e||ts(e)&&Ir(e)==D}var cs=Ct?Jt(Ct):function(e){return ts(e)&&Ja(e.length)&&!!ut[Ir(e)]};var ls=Gi(Pr),ds=Gi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Ga(e))return ss(e)?vn(e):Ni(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=vo(e);return(t==I?cn:t==A?fn:Bs)(e)}function hs(e){return e?(e=ms(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ps(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function vs(e){return e?sr(ps(e),0,m):0}function ms(e){if("number"==typeof e)return e;if(us(e))return v;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=ge.test(e);return n||be.test(e)?ft(e.slice(2),n?2:8):me.test(e)?v:+e}function gs(e){return Ai(e,Ds(e))}function ys(e){return null==e?"":ci(e)}var bs=Di((function(e,t){if(xo(t)||Ga(t))Ai(t,_s(t),e);else for(var n in t)Le.call(t,n)&&tr(e,n,t[n])})),ws=Di((function(e,t){Ai(t,Ds(t),e)})),ks=Di((function(e,t,n,r){Ai(t,Ds(t),e,r)})),Es=Di((function(e,t,n,r){Ai(t,_s(t),e,r)})),Ss=no(ar);var xs=Qr((function(e,t){e=Ce(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&wo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Ds(a),u=-1,c=s.length;++u<c;){var l=s[u],d=e[l];(d===i||Ba(d,De[l])&&!Le.call(e,l))&&(e[l]=a[l])}return e})),Is=Qr((function(e){return e.push(i,Ji),Tt(Os,i,e)}));function Cs(e,t,n){var r=null==e?i:Sr(e,t);return r===i?n:r}function Ts(e,t){return null!=e&&mo(e,t,Mr)}var Ms=ji((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),e[t]=n}),eu(ru)),Ns=ji((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),Le.call(e,t)?e[t].push(n):e[t]=[n]}),uo),As=Qr(Ar);function _s(e){return Ga(e)?Qn(e):Zr(e)}function Ds(e){return Ga(e)?Qn(e,!0):Fr(e)}var Rs=Di((function(e,t,n){Hr(e,t,n)})),Os=Di((function(e,t,n,r){Hr(e,t,n,r)})),Ls=no((function(e,t){var n={};if(null==e)return n;var r=!1;t=Lt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ai(e,io(e),n),r&&(n=ur(n,7,eo));for(var i=t.length;i--;)di(n,t[i]);return n}));var Zs=no((function(e,t){return null==e?{}:function(e,t){return qr(e,t,(function(t,n){return Ts(e,n)}))}(e,t)}));function Fs(e,t){if(null==e)return{};var n=Lt(io(e),(function(e){return[e]}));return t=uo(t),qr(e,n,(function(e,n){return t(e,n[0])}))}var Ps=Qi(_s),Vs=Qi(Ds);function Bs(e){return null==e?[]:en(e,_s(e))}var js=Zi((function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)}));function Hs(e){return Qs(ys(e).toLowerCase())}function Us(e){return(e=ys(e))&&e.replace(ke,on).replace(tt,"")}var Ws=Zi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),qs=Zi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Gs=Li("toLowerCase");var zs=Zi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var $s=Zi((function(e,t,n){return e+(n?" ":"")+Qs(t)}));var Ys=Zi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qs=Li("toUpperCase");function Xs(e,t,n){return e=ys(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Ks=Qr((function(e,t){try{return Tt(e,i,t)}catch(n){return Qa(n)?n:new se(n)}})),Js=no((function(e,t){return Nt(t,(function(t){t=Fo(t),or(e,t,Na(e[t],e))})),e}));function eu(e){return function(){return e}}var tu=Vi(),nu=Vi(!0);function ru(e){return e}function iu(e){return Lr("function"==typeof e?e:ur(e,1))}var ou=Qr((function(e,t){return function(n){return Ar(n,e,t)}})),au=Qr((function(e,t){return function(n){return Ar(e,n,t)}}));function su(e,t,n){var r=_s(t),i=Er(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Er(t,_s(t)));var o=!(es(n)&&"chain"in n)||!!n.chain,a=Xa(e);return Nt(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ni(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Zt([this.value()],arguments))})})),e}function uu(){}var cu=Ui(Lt),lu=Ui(_t),du=Ui(Vt);function fu(e){return ko(e)?zt(Fo(e)):function(e){return function(t){return Sr(t,e)}}(e)}var hu=qi(),pu=qi(!0);function vu(){return[]}function mu(){return!1}var gu=Hi((function(e,t){return e+t}),0),yu=$i("ceil"),bu=Hi((function(e,t){return e/t}),1),wu=$i("floor");var ku=Hi((function(e,t){return e*t}),1),Eu=$i("round"),Su=Hi((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Ne(o);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Ta,Bn.assign=bs,Bn.assignIn=ws,Bn.assignInWith=ks,Bn.assignWith=Es,Bn.at=Ss,Bn.before=Ma,Bn.bind=Na,Bn.bindAll=Js,Bn.bindKey=Aa,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Bn.chain=fa,Bn.chunk=function(e,t,r){t=(r?wo(e,t,r):t===i)?1:$t(ps(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=n(ht(o/t));a<o;)u[s++]=ri(e,a,a+=t);return u},Bn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Bn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Zt(Wa(r)?Ni(r):[r],gr(t,1))},Bn.cond=function(e){var t=null==e?0:e.length,n=uo();return e=t?Lt(e,(function(e){if("function"!=typeof e[1])throw new Ne(o);return[n(e[0]),e[1]]})):[],Qr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Tt(i[0],this,n))return Tt(i[1],this,n)}}))},Bn.conforms=function(e){return function(e){var t=_s(e);return function(n){return cr(n,e,t)}}(ur(e,1))},Bn.constant=eu,Bn.countBy=va,Bn.create=function(e,t){var n=jn(e);return null==t?n:ir(n,t)},Bn.curry=function e(t,n,r){var o=Xi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Bn.curryRight=function e(t,n,r){var o=Xi(t,u,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Bn.debounce=_a,Bn.defaults=xs,Bn.defaultsDeep=Is,Bn.defer=Da,Bn.delay=Ra,Bn.difference=Bo,Bn.differenceBy=jo,Bn.differenceWith=Ho,Bn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=n||t===i?1:ps(t))<0?0:t,r):[]},Bn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,0,(t=r-(t=n||t===i?1:ps(t)))<0?0:t):[]},Bn.dropRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0,!0):[]},Bn.dropWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0):[]},Bn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&wo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ps(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ps(r))<0&&(r+=o),r=n>r?0:vs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Bn.filter=function(e,t){return(Wa(e)?Dt:mr)(e,uo(t,3))},Bn.flatMap=function(e,t){return gr(Sa(e,t),1)},Bn.flatMapDeep=function(e,t){return gr(Sa(e,t),h)},Bn.flatMapDepth=function(e,t,n){return n=n===i?1:ps(n),gr(Sa(e,t),n)},Bn.flatten=qo,Bn.flattenDeep=function(e){return(null==e?0:e.length)?gr(e,h):[]},Bn.flattenDepth=function(e,t){return(null==e?0:e.length)?gr(e,t=t===i?1:ps(t)):[]},Bn.flip=function(e){return Xi(e,512)},Bn.flow=tu,Bn.flowRight=nu,Bn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Bn.functions=function(e){return null==e?[]:Er(e,_s(e))},Bn.functionsIn=function(e){return null==e?[]:Er(e,Ds(e))},Bn.groupBy=wa,Bn.initial=function(e){return(null==e?0:e.length)?ri(e,0,-1):[]},Bn.intersection=zo,Bn.intersectionBy=$o,Bn.intersectionWith=Yo,Bn.invert=Ms,Bn.invertBy=Ns,Bn.invokeMap=ka,Bn.iteratee=iu,Bn.keyBy=Ea,Bn.keys=_s,Bn.keysIn=Ds,Bn.map=Sa,Bn.mapKeys=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,t(e,r,i),e)})),n},Bn.mapValues=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,r,t(e,r,i))})),n},Bn.matches=function(e){return Br(ur(e,1))},Bn.matchesProperty=function(e,t){return jr(e,ur(t,1))},Bn.memoize=Oa,Bn.merge=Rs,Bn.mergeWith=Os,Bn.method=ou,Bn.methodOf=au,Bn.mixin=su,Bn.negate=La,Bn.nthArg=function(e){return e=ps(e),Qr((function(t){return Ur(t,e)}))},Bn.omit=Ls,Bn.omitBy=function(e,t){return Fs(e,La(uo(t)))},Bn.once=function(e){return Ma(2,e)},Bn.orderBy=function(e,t,n,r){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(n=r?i:n)||(n=null==n?[]:[n]),Wr(e,t,n))},Bn.over=cu,Bn.overArgs=Za,Bn.overEvery=lu,Bn.overSome=du,Bn.partial=Fa,Bn.partialRight=Pa,Bn.partition=xa,Bn.pick=Zs,Bn.pickBy=Fs,Bn.property=fu,Bn.propertyOf=function(e){return function(t){return null==e?i:Sr(e,t)}},Bn.pull=Xo,Bn.pullAll=Ko,Bn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Gr(e,t,uo(n,2)):e},Bn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gr(e,t,i,n):e},Bn.pullAt=Jo,Bn.range=hu,Bn.rangeRight=pu,Bn.rearg=Va,Bn.reject=function(e,t){return(Wa(e)?Dt:mr)(e,La(uo(t,3)))},Bn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=uo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return zr(e,i),n},Bn.rest=function(e,t){if("function"!=typeof e)throw new Ne(o);return Qr(e,t=t===i?t:ps(t))},Bn.reverse=ea,Bn.sampleSize=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),(Wa(e)?Kn:Kr)(e,t)},Bn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},Bn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Jr(e,t,n,r)},Bn.shuffle=function(e){return(Wa(e)?Jn:ni)(e)},Bn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&wo(e,t,n)?(t=0,n=r):(t=null==t?0:ps(t),n=n===i?r:ps(n)),ri(e,t,n)):[]},Bn.sortBy=Ia,Bn.sortedUniq=function(e){return e&&e.length?si(e):[]},Bn.sortedUniqBy=function(e,t){return e&&e.length?si(e,uo(t,2)):[]},Bn.split=function(e,t,n){return n&&"number"!=typeof n&&wo(e,t,n)&&(t=n=i),(n=n===i?m:n>>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ci(t))&&un(e)?ki(vn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Ne(o);return t=null==t?0:$t(ps(t),0),Qr((function(n){var r=n[t],i=ki(n,0,t);return r&&Zt(i,r),Tt(e,this,i)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===i?1:ps(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===i?1:ps(t)))<0?0:t,r):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?hi(e,uo(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ne(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_a(e,t,{leading:r,maxWait:t,trailing:i})},Bn.thru=ha,Bn.toArray=fs,Bn.toPairs=Ps,Bn.toPairsIn=Vs,Bn.toPath=function(e){return Wa(e)?Lt(e,Fo):us(e)?[e]:Ni(Zo(ys(e)))},Bn.toPlainObject=gs,Bn.transform=function(e,t,n){var r=Wa(e),i=r||$a(e)||cs(e);if(t=uo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:es(e)&&Xa(o)?jn(Ge(e)):{}}return(i?Nt:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Bn.unary=function(e){return Ta(e,1)},Bn.union=ta,Bn.unionBy=na,Bn.unionWith=ra,Bn.uniq=function(e){return e&&e.length?li(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?li(e,uo(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?li(e,i,t):[]},Bn.unset=function(e,t){return null==e||di(e,t)},Bn.unzip=ia,Bn.unzipWith=oa,Bn.update=function(e,t,n){return null==e?e:fi(e,t,yi(n))},Bn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:fi(e,t,yi(n),r)},Bn.values=Bs,Bn.valuesIn=function(e){return null==e?[]:en(e,Ds(e))},Bn.without=aa,Bn.words=Xs,Bn.wrap=function(e,t){return Fa(yi(t),e)},Bn.xor=sa,Bn.xorBy=ua,Bn.xorWith=ca,Bn.zip=la,Bn.zipObject=function(e,t){return mi(e||[],t||[],tr)},Bn.zipObjectDeep=function(e,t){return mi(e||[],t||[],Jr)},Bn.zipWith=da,Bn.entries=Ps,Bn.entriesIn=Vs,Bn.extend=ws,Bn.extendWith=ks,su(Bn,Bn),Bn.add=gu,Bn.attempt=Ks,Bn.camelCase=js,Bn.capitalize=Hs,Bn.ceil=yu,Bn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ms(n))===n?n:0),t!==i&&(t=(t=ms(t))===t?t:0),sr(ms(e),t,n)},Bn.clone=function(e){return ur(e,4)},Bn.cloneDeep=function(e){return ur(e,5)},Bn.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:i)},Bn.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:i)},Bn.conformsTo=function(e,t){return null==t||cr(e,t,_s(t))},Bn.deburr=Us,Bn.defaultTo=function(e,t){return null==e||e!==e?t:e},Bn.divide=bu,Bn.endsWith=function(e,t,n){e=ys(e),t=ci(t);var r=e.length,o=n=n===i?r:sr(ps(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Bn.eq=Ba,Bn.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace(Y,an):e},Bn.escapeRegExp=function(e){return(e=ys(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Bn.every=function(e,t,n){var r=Wa(e)?_t:pr;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Bn.find=ma,Bn.findIndex=Uo,Bn.findKey=function(e,t){return jt(e,uo(t,3),wr)},Bn.findLast=ga,Bn.findLastIndex=Wo,Bn.findLastKey=function(e,t){return jt(e,uo(t,3),kr)},Bn.floor=wu,Bn.forEach=ya,Bn.forEachRight=ba,Bn.forIn=function(e,t){return null==e?e:yr(e,uo(t,3),Ds)},Bn.forInRight=function(e,t){return null==e?e:br(e,uo(t,3),Ds)},Bn.forOwn=function(e,t){return e&&wr(e,uo(t,3))},Bn.forOwnRight=function(e,t){return e&&kr(e,uo(t,3))},Bn.get=Cs,Bn.gt=ja,Bn.gte=Ha,Bn.has=function(e,t){return null!=e&&mo(e,t,Tr)},Bn.hasIn=Ts,Bn.head=Go,Bn.identity=ru,Bn.includes=function(e,t,n,r){e=Ga(e)?e:Bs(e),n=n&&!r?ps(n):0;var i=e.length;return n<0&&(n=$t(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=$t(r+i,0)),Ut(e,t,i)},Bn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=bn(t,n)&&e<$t(t,n)}(e=ms(e),t,n)},Bn.invoke=As,Bn.isArguments=Ua,Bn.isArray=Wa,Bn.isArrayBuffer=qa,Bn.isArrayLike=Ga,Bn.isArrayLikeObject=za,Bn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Ir(e)==w},Bn.isBuffer=$a,Bn.isDate=Ya,Bn.isElement=function(e){return ts(e)&&1===e.nodeType&&!is(e)},Bn.isEmpty=function(e){if(null==e)return!0;if(Ga(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||$a(e)||cs(e)||Ua(e)))return!e.length;var t=vo(e);if(t==I||t==A)return!e.size;if(xo(e))return!Zr(e).length;for(var n in e)if(Le.call(e,n))return!1;return!0},Bn.isEqual=function(e,t){return Dr(e,t)},Bn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Dr(e,t,i,n):!!r},Bn.isError=Qa,Bn.isFinite=function(e){return"number"==typeof e&&bt(e)},Bn.isFunction=Xa,Bn.isInteger=Ka,Bn.isLength=Ja,Bn.isMap=ns,Bn.isMatch=function(e,t){return e===t||Rr(e,t,lo(t))},Bn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Rr(e,t,lo(t),n)},Bn.isNaN=function(e){return rs(e)&&e!=+e},Bn.isNative=function(e){if(So(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(e)},Bn.isNil=function(e){return null==e},Bn.isNull=function(e){return null===e},Bn.isNumber=rs,Bn.isObject=es,Bn.isObjectLike=ts,Bn.isPlainObject=is,Bn.isRegExp=os,Bn.isSafeInteger=function(e){return Ka(e)&&e>=-9007199254740991&&e<=p},Bn.isSet=as,Bn.isString=ss,Bn.isSymbol=us,Bn.isTypedArray=cs,Bn.isUndefined=function(e){return e===i},Bn.isWeakMap=function(e){return ts(e)&&vo(e)==R},Bn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Ir(e)},Bn.join=function(e,t){return null==e?"":wt.call(e,t)},Bn.kebabCase=Ws,Bn.last=Qo,Bn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ps(n))<0?$t(r+o,0):bn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ht(e,qt,o,!0)},Bn.lowerCase=qs,Bn.lowerFirst=Gs,Bn.lt=ls,Bn.lte=ds,Bn.max=function(e){return e&&e.length?vr(e,ru,Cr):i},Bn.maxBy=function(e,t){return e&&e.length?vr(e,uo(t,2),Cr):i},Bn.mean=function(e){return Gt(e,ru)},Bn.meanBy=function(e,t){return Gt(e,uo(t,2))},Bn.min=function(e){return e&&e.length?vr(e,ru,Pr):i},Bn.minBy=function(e,t){return e&&e.length?vr(e,uo(t,2),Pr):i},Bn.stubArray=vu,Bn.stubFalse=mu,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=ku,Bn.nth=function(e,t){return e&&e.length?Ur(e,ps(t)):i},Bn.noConflict=function(){return vt._===this&&(vt._=Be),this},Bn.noop=uu,Bn.now=Ca,Bn.pad=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Wi(pt(i),n)+e+Wi(ht(i),n)},Bn.padEnd=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?e+Wi(t-r,n):e},Bn.padStart=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?Wi(t-r,n)+e:e},Bn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),kn(ys(e).replace(ae,""),t||0)},Bn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&wo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=En();return bn(e+o*(t-e+dt("1e-"+((o+"").length-1))),t)}return $r(e,t)},Bn.reduce=function(e,t,n){var r=Wa(e)?Ft:Yt,i=arguments.length<3;return r(e,uo(t,4),n,i,fr)},Bn.reduceRight=function(e,t,n){var r=Wa(e)?Pt:Yt,i=arguments.length<3;return r(e,uo(t,4),n,i,hr)},Bn.repeat=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),Yr(ys(e),t)},Bn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var r=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Fo(t[r])];a===i&&(r=o,a=n),e=Xa(a)?a.call(e):a}return e},Bn.round=Eu,Bn.runInContext=e,Bn.sample=function(e){return(Wa(e)?Xn:Xr)(e)},Bn.size=function(e){if(null==e)return 0;if(Ga(e))return ss(e)?pn(e):e.length;var t=vo(e);return t==I||t==A?e.size:Zr(e).length},Bn.snakeCase=zs,Bn.some=function(e,t,n){var r=Wa(e)?Vt:ii;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Bn.sortedIndex=function(e,t){return oi(e,t)},Bn.sortedIndexBy=function(e,t,n){return ai(e,t,uo(n,2))},Bn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Ba(e[r],t))return r}return-1},Bn.sortedLastIndex=function(e,t){return oi(e,t,!0)},Bn.sortedLastIndexBy=function(e,t,n){return ai(e,t,uo(n,2),!0)},Bn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},Bn.startCase=$s,Bn.startsWith=function(e,t,n){return e=ys(e),n=null==n?0:sr(ps(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},Bn.subtract=Su,Bn.sum=function(e){return e&&e.length?Qt(e,ru):0},Bn.sumBy=function(e,t){return e&&e.length?Qt(e,uo(t,2)):0},Bn.template=function(e,t,n){var r=Bn.templateSettings;n&&wo(e,t,n)&&(t=i),e=ys(e),t=ks({},t,r,Ki);var o,a,s=ks({},t.imports,r.imports,Ki),u=_s(s),c=en(s,u),l=0,d=t.interpolate||Ee,f="__p += '",h=Te((t.escape||Ee).source+"|"+d.source+"|"+(d===ee?pe:Ee).source+"|"+(t.evaluate||Ee).source+"|$","g"),p="//# sourceURL="+(Le.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(h,(function(t,n,r,i,s,u){return r||(r=i),f+=e.slice(l,u).replace(Se,sn),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),f+="';\n";var v=Le.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(q,""):f).replace(G,"$1").replace(z,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Ks((function(){return xe(u,p+"return "+f).apply(i,c)}));if(m.source=f,Qa(m))throw m;return m},Bn.times=function(e,t){if((e=ps(e))<1||e>p)return[];var n=m,r=bn(e,m);t=uo(t),e-=m;for(var i=Xt(r,t);++n<e;)t(n);return i},Bn.toFinite=hs,Bn.toInteger=ps,Bn.toLength=vs,Bn.toLower=function(e){return ys(e).toLowerCase()},Bn.toNumber=ms,Bn.toSafeInteger=function(e){return e?sr(ps(e),-9007199254740991,p):0===e?e:0},Bn.toString=ys,Bn.toUpper=function(e){return ys(e).toUpperCase()},Bn.trim=function(e,t,n){if((e=ys(e))&&(n||t===i))return Kt(e);if(!e||!(t=ci(t)))return e;var r=vn(e),o=vn(t);return ki(r,nn(r,o),rn(r,o)+1).join("")},Bn.trimEnd=function(e,t,n){if((e=ys(e))&&(n||t===i))return e.slice(0,mn(e)+1);if(!e||!(t=ci(t)))return e;var r=vn(e);return ki(r,0,rn(r,vn(t))+1).join("")},Bn.trimStart=function(e,t,n){if((e=ys(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=ci(t)))return e;var r=vn(e);return ki(r,nn(r,vn(t))).join("")},Bn.truncate=function(e,t){var n=30,r="...";if(es(t)){var o="separator"in t?t.separator:o;n="length"in t?ps(t.length):n,r="omission"in t?ci(t.omission):r}var a=(e=ys(e)).length;if(un(e)){var s=vn(e);a=s.length}if(n>=a)return e;var u=n-pn(r);if(u<1)return r;var c=s?ki(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),os(o)){if(e.slice(u).search(o)){var l,d=c;for(o.global||(o=Te(o.source,ys(ve.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(e.indexOf(ci(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Bn.unescape=function(e){return(e=ys(e))&&Q.test(e)?e.replace($,gn):e},Bn.uniqueId=function(e){var t=++Ze;return ys(e)+t},Bn.upperCase=Ys,Bn.upperFirst=Qs,Bn.each=ya,Bn.eachRight=ba,Bn.first=Go,su(Bn,function(){var e={};return wr(Bn,(function(t,n){Le.call(Bn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Bn.VERSION="4.17.21",Nt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),Nt(["drop","take"],(function(e,t){Wn.prototype[e]=function(n){n=n===i?1:$t(ps(n),0);var r=this.__filtered__&&!t?new Wn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Nt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Nt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}})),Nt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}})),Wn.prototype.compact=function(){return this.filter(ru)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Qr((function(e,t){return"function"==typeof e?new Wn(this):this.map((function(n){return Ar(n,e,t)}))})),Wn.prototype.reject=function(e){return this.filter(La(uo(e)))},Wn.prototype.slice=function(e,t){e=ps(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Wn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ps(t))<0?n.dropRight(-t):n.take(t-e)),n)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(m)},wr(Wn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Bn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Wn,c=s[0],l=u||Wa(t),d=function(e){var t=o.apply(Bn,Zt([e],s));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,h=!!this.__actions__.length,p=a&&!f,v=u&&!h;if(!a&&l){t=v?t:new Wn(this);var m=e.apply(t,s);return m.__actions__.push({func:ha,args:[d],thisArg:i}),new Un(m,f)}return p&&v?e.apply(this,s):(m=this.thru(d),p?r?m.value()[0]:m.value():m)})})),Nt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ae[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wa(i)?i:[],e)}return this[n]((function(n){return t.apply(Wa(n)?n:[],e)}))}})),wr(Wn.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";Le.call(_n,r)||(_n[r]=[]),_n[r].push({name:t,func:n})}})),_n[Bi(i,2).name]=[{name:"wrapper",func:i}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=Ni(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ni(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ni(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=$t(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,d=l.length,f=0,h=bn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return pi(e,this.__actions__);var p=[];e:for(;u--&&f<h;){for(var v=-1,m=e[c+=t];++v<d;){var g=l[v],y=g.iteratee,b=g.type,w=y(m);if(2==b)m=w;else if(!w){if(1==b)continue e;break e}}p[f++]=m}return p},Bn.prototype.at=pa,Bn.prototype.chain=function(){return fa(this)},Bn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof Hn;){var r=Vo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Un(t,this.__chain__)}return this.thru(ea)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Xe&&(Bn.prototype[Xe]=function(){return this}),Bn}();vt._=yn,(r=function(){return yn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2352:function(e){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return x})),n.d(t,"b",(function(){return I})),n.d(t,"c",(function(){return C}));var r=n(1),i=n.n(r),o=n(14),a=n.n(o),s=n(2),u=n.n(s),c=n(15),l=n.n(c);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var f=Array.isArray,h=Object.keys;function p(e){return"function"==typeof e}function v(e){return e instanceof HTMLElement||e instanceof Text}function m(e){return"object"===u()(e)&&!f(e)}function g(e){if(!e||"string"==typeof e)return e;var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete t.children,t}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!(!f(e)||!f(t))&&(n?e.length===t.length&&!e.find((function(e){return!t.includes(e)})):e.some((function(e){return t.includes(e)})))}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];if(!h(e).length)return!0;if(null===t||!h(t).length)return!1;if(n)return l()(e,t);var i=h(e).filter((function(e){return h(t).includes(e)}));return i.forEach((function(n){m(e[n])&&m(t[n])&&(r=r.concat(b(e[n],t[n]))),(e[n]===t[n]||y(e[n],t[n]))&&r.push(t)})),r.length>0&&r.filter((function(e){return e})).length===i.length}function w(e){var t,n={children:[]};if(!e)return n;n.name=p(t=e.type)?t.displayName||t.name:t,n.props=g(e.memoizedProps),n.state=function(e){if(e)return e.baseState||e}(e.memoizedState);var r=e.child;if(r)for(n.children.push(r);r.sibling;)n.children.push(r.sibling),r=r.sibling;return n.children=n.children.map((function(e){return w(e)})),p(e.type)&&function(e){return e.children.length>1}(n)?(n.node=function(e){return e.children.map((function(e){return e.node})).filter((function(e){return!!e}))}(n),n.isFragment=!0):n.node=function(e){return v(e.stateNode)?e.stateNode:e.child&&v(e.child.stateNode)?e.child.stateNode:null}(e),n}function k(e){for(;e.length;){var t=e.shift();if(t.node)return t.node;t.children&&Array.isArray(t.children)&&e.push.apply(e,i()(t.children))}}function E(e,t){for(var n=[];e.length;){var r=e.shift().children;r&&Array.isArray(r)&&r.forEach((function(r){t(r)&&(!r.node&&Array.isArray(r.children)&&(r.node=k(r.children.concat([]))),n.push(r)),e.push(r)}))}return n}function S(e,t){var n=function(e){if(e){var t=e.split("(");return 1===t.length?e:t.find((function(e){return e.includes(")")})).replace(/\)*/g,"")}}(t);return new RegExp("^"+e.split("*").map((function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")})).join(".+")+"$").test(n)}function x(e,t){var n=arguments.length>3?arguments[3]:void 0;return e.reduce((function(e,t){return e.concat(E(e,n&&"function"==typeof n?n:function(e){return"string"==typeof e.name?S(t,e.name):null!==e.name&&"object"===u()(e.name)&&S(t,e.name.displayName)}))}),[t])}function I(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return p(n)?(console.warn("Functions are not supported as filter matchers"),[]):e.filter((function(e){return m(n)&&b(n,e[t],r)||f(n)&&y(n,e[t],r)||e[t]===n}))}function C(e){if(e.hasOwnProperty("_reactRootContainer"))return e._reactRootContainer._internalRoot.current;var t=Object.keys(e).find((function(e){return e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber")||e.startsWith("__reactContainer")}));return t?e[t]:void 0}},function(e,t,n){var r=n(17),i=n(18),o=n(19),a=n(20);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(3),i=n(6),o=n(22),a=n(23);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,s(t)}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(0);function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,n=arguments.length>1?arguments[1]:void 0;if(e.isReactLoaded)return Promise.resolve("React already loaded");var i=function(){var e=document.createTreeWalker(document);if(n)return document.querySelector(n);for(;e.nextNode();)if(e.currentNode.hasOwnProperty("_reactRootContainer"))return e.currentNode};return new Promise((function(n,o){var a=!1,s=null;!function t(){var o=i();if(o&&(e.isReactLoaded=!0,e.rootReactElement=Object(r.c)(o),e.rootReactElement))return clearTimeout(s),n();a||setTimeout(t,200)}(),s=setTimeout((function(){a=!0,o("Timed out")}),t)}))}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(1),i=n.n(r),o=n(4),a=n.n(o),s=n(5),u=n.n(s),c=n(7),l=n.n(c),d=n(13),f=n.n(d),h=n(3),p=n.n(h),v=n(8),m=n.n(v),g=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var b=function(e){l()(n,e);var t=y(n);function n(e){return a()(this,n),e||(e=[]),t.call.apply(t,[this].concat(i()(e)))}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"props",e,t))}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"state",e,t))}}]),n}(m()(Array)),w=function(e){l()(n,e);var t=y(n);function n(e,r){var i;for(var o in a()(this,n),(i=t.call(this,e))._nodes=r,e)i[o]=e[o];return i}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"props",e,t)[0],this._nodes)}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"state",e,t)[0],this._nodes)}}]),n}(m()(Object)),k=function(){function e(t,n){a()(this,e),this.selectors=t.split(" ").filter((function(e){return!!e})).map((function(e){return e.trim()})),this.rootComponent=n,this.tree=Object(g.a)(this.rootComponent)}return u()(e,[{key:"find",value:function(){return this.nodes=new b(Object(g.d)(this.selectors,this.tree,!0)),new w(this.nodes[0],this.nodes)}},{key:"findAll",value:function(){return new b(Object(g.d)(this.selectors,this.tree))}}]),e}()},function(e,t,n){var r=n(2).default,i=n(21);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var a,s,u,c=r(t),l=r(n);if(c&&l){if((s=t.length)!=n.length)return!1;for(a=s;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(c!=l)return!1;var d=t instanceof Date,f=n instanceof Date;if(d!=f)return!1;if(d&&f)return t.getTime()==n.getTime();var h=t instanceof RegExp,p=n instanceof RegExp;if(h!=p)return!1;if(h&&p)return t.toString()==n.toString();var v=i(t);if((s=v.length)!==i(n).length)return!1;for(a=s;0!=a--;)if(!o.call(n,v[a]))return!1;for(a=s;0!=a--;)if(!e(t[u=v[a]],n[u]))return!1;return!0}return t!=t&&n!=n}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"resq$",(function(){return s})),n.d(t,"resq$$",(function(){return u}));var r=n(12),i=n(11);n.d(t,"waitToLoadReact",(function(){return i.a}));var o=n(0);function a(t,n,i){if(!i&&!e.isReactLoaded)throw new Error("Could not find the root element of your application");var a=e.rootReactElement;if(i instanceof HTMLElement&&(a=Object(o.c)(i)),!a)throw new Error("Could not find instance of React in given element");return new r.a(t,a)[n]()}function s(e,t){return a(e,"find",t)}function u(e,t){return a(e,"findAll",t)}}.call(this,n(9))},function(e,t,n){var r=n(10);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(10);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6),i=n(24);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0}])},573:function(e,t,n){var r=n(763);function i(e){return e.reduce((function(e,t,n,r){return e+t}))}function o(e){if(r.isArray(e))return e;if("string"===typeof e)return e.split("");throw Error("Parameter must be a string or array.")}t.$m=function(e,t){return e=o(e),t=o(t),r.intersection(e,t).length/r.union(e,t).length}},907:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},7326:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},5861:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))}}n.d(t,{Z:function(){return i}})},5671:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},5647:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9611),i=n(8814);function o(e,t,n){return o=(0,i.Z)()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&(0,r.Z)(o,n.prototype),o},o.apply(null,arguments)}},3144:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9142);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.Z)(i.key),i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},7762:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,r.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},7277:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(1120),i=n(8814),o=n(1002),a=n(7326);function s(e){var t=(0,i.Z)();return function(){var n,i=(0,r.Z)(e);if(t){var s=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===(0,o.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,a.Z)(e)}(this,n)}}},4942:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9142);function i(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},1752:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1120);function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,r.Z)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},i.apply(this,arguments)}},1120:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},136:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9611);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},8814:function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{Z:function(){return r}})},1413:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(4942);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},4925:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:function(){return r}})},4165:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(){i=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new D(r||[]);return a(o,"_invoke",{value:M(e,n,s)}),o}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",g="completed",y={};function b(){}function w(){}function k(){}var E={};d(E,u,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(R([])));x&&x!==n&&o.call(x,u)&&(E=x);var I=k.prototype=b.prototype=Object.create(E);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==(0,r.Z)(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function M(t,n,r){var i=p;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=N(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var c=h(t,n,r);if("normal"===c.type){if(i=r.done?g:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function N(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,N(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(o.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError((0,r.Z)(t)+" is not iterable")}return w.prototype=k,a(I,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:w,configurable:!0}),w.displayName=d(k,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,d(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},C(T.prototype),d(T.prototype,c,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new T(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(I),d(I,l,"Generator"),d(I,u,(function(){return this})),d(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}},9611:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},885:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2982:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(907);var i=n(181);function o(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},9142:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==(0,r.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},1002:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(907);function i(e,t){if(e){if("string"===typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},8664:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(1120),i=n(9611);var o=n(5647);function a(e){var t="function"===typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"===typeof e}}(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return(0,o.Z)(e,arguments,(0,r.Z)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(n,e)},a(e)}},3464:function(e,t,n){"use strict";n.d(t,{J:function(){return s},c:function(){return a}});for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"===typeof Uint8Array?[]:new Uint8Array(256),o=0;o<64;o++)i[r.charCodeAt(o)]=o;var a=function(e){var t,n=new Uint8Array(e),i=n.length,o="";for(t=0;t<i;t+=3)o+=r[n[t]>>2],o+=r[(3&n[t])<<4|n[t+1]>>4],o+=r[(15&n[t+1])<<2|n[t+2]>>6],o+=r[63&n[t+2]];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(e){var t,n,r,o,a,s=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),d=new Uint8Array(l);for(t=0;t<u;t+=4)n=i[e.charCodeAt(t)],r=i[e.charCodeAt(t+1)],o=i[e.charCodeAt(t+2)],a=i[e.charCodeAt(t+3)],d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|o>>2,d[c++]=(3&o)<<6|63&a;return l}},3246:function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function i(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}n.d(t,{_:function(){return r},m:function(){return i}})},5512:function(e,t,n){"use strict";n.d(t,{Bu:function(){return C},CO:function(){return q},DS:function(){return d},Df:function(){return re},GQ:function(){return oe},IG:function(){return j},Jq:function(){return r},MK:function(){return h},P8:function(){return V},UR:function(){return g},VU:function(){return ae},We:function(){return P},Zq:function(){return l},bZ:function(){return v},eD:function(){return W},kv:function(){return b},pe:function(){return B},wR:function(){return m},zi:function(){return I}});var r,i=n(136),o=n(7277),a=n(7762),s=n(5671),u=n(3144);function c(e){return e.nodeType===e.ELEMENT_NODE}function l(e){var t=null===e||void 0===e?void 0:e.host;return Boolean((null===t||void 0===t?void 0:t.shadowRoot)===e)}function d(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function f(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t,h).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n):null}catch(r){return null}var n}function h(e){var t;if(function(e){return"styleSheet"in e}(e))try{t=f(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var n=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer(".concat(e.layerName,")")),e.supportsText&&n.push("supports(".concat(e.supportsText,")")),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(n){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function(e){var t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(e.cssText);return t||e.cssText}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(r||(r={}));var p=function(){function e(){(0,s.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,u.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function v(){return new p}function m(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.value,a=e.maskInputFn,s=o||"",u=i&&g(i);return(n[r.toLowerCase()]||u&&n[u])&&(s=a?a(s,t):"*".repeat(s.length)),s}function g(e){return e.toLowerCase()}var y="__rrweb_original__";function b(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?g(t):null}function w(e,t){var n,r;try{r=new URL(e,null!==t&&void 0!==t?t:window.location.href)}catch(o){return null}var i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null===i||void 0===i?void 0:i[1])&&void 0!==n?n:null}var k,E,S=1,x=new RegExp("[^a-z0-9-_:]"),I=-2;function C(){return S++}var T=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,M=/^(?:[a-z+]+:)?\/\//i,N=/^www\..*/i,A=/^(data:)([^,]*),(.*)/i;function _(e,t){return(e||"").replace(T,(function(e,n,r,i,o,s){var u,c=r||o||s,l=n||i||"";if(!c)return e;if(M.test(c)||N.test(c))return"url(".concat(l).concat(c).concat(l,")");if(A.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((u=t,(u.indexOf("//")>-1?u.split("/").slice(0,3).join("/"):u.split("/")[0]).split("?")[0]+c)).concat(l,")");var d=t.split("/"),f=c.split("/");d.pop();var h,p=(0,a.Z)(f);try{for(p.s();!(h=p.n()).done;){var v=h.value;"."!==v&&(".."===v?d.pop():d.push(v))}}catch(m){p.e(m)}finally{p.f()}return"url(".concat(l).concat(d.join("/")).concat(l,")")}))}var D=/^[^ \t\n\r\u000c]+/,R=/^[, \t\n\r\u000c]+/;var O=new WeakMap;function L(e,t){return t&&""!==t.trim()?F(e,t):t}function Z(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function F(e,t){var n=O.get(e);if(n||(n=e.createElement("a"),O.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function P(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?L(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(R),!(n>=t.length);){var o=r(D);if(","===o.slice(-1))o=L(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=L(e,o);for(var s=!1;;){var u=t.charAt(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n?_(r,F(e)):"object"===t&&"data"===n?L(e,r):r:L(e,r):r}function V(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function B(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&B(e.parentNode,t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&B(e.parentNode,t,n)}function j(e,t,n,r){try{var i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("string"===typeof t){if(r){if(i.closest(".".concat(t)))return!0}else if(i.classList.contains(t))return!0}else if(B(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(o){}return!1}function H(e,t){var n=t.doc,i=t.mirror,o=t.blockClass,a=t.blockSelector,s=t.needsMask,u=t.inlineStylesheet,c=t.maskInputOptions,l=void 0===c?{}:c,d=t.maskTextFn,h=t.maskInputFn,p=t.dataURLOptions,v=void 0===p?{}:p,w=t.inlineImages,S=t.recordCanvas,I=t.keepIframeSrcFn,C=t.newlyAddedElement,T=void 0!==C&&C,M=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,i);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:r.Document,childNodes:[],compatMode:e.compatMode}:{type:r.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:r.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:M};case e.ELEMENT_NODE:return function(e,t){for(var n,i=t.doc,o=t.blockClass,a=t.blockSelector,s=t.inlineStylesheet,u=t.maskInputOptions,c=void 0===u?{}:u,l=t.maskInputFn,d=t.dataURLOptions,h=void 0===d?{}:d,p=t.inlineImages,v=t.recordCanvas,w=t.keepIframeSrcFn,S=t.newlyAddedElement,I=void 0!==S&&S,C=t.rootId,T=function(e,t,n){try{if("string"===typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(o){}return!1}(e,o,a),M=function(e){if(e instanceof HTMLFormElement)return"form";var t=g(e.tagName);return x.test(t)?"div":t}(e),N={},A=e.attributes.length,D=0;D<A;D++){var R=e.attributes[D];V(M,R.name,R.value)||(N[R.name]=P(i,M,g(R.name),R.value))}if("link"===M&&s){var O=Array.from(i.styleSheets).find((function(t){return t.href===e.href})),L=null;O&&(L=f(O)),L&&(delete N.rel,delete N.href,N._cssText=_(L,O.href))}if("style"===M&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var B=f(e.sheet);B&&(N._cssText=_(B,F(i)))}if("input"===M||"textarea"===M||"select"===M){var j=e.value,H=e.checked;"radio"!==N.type&&"checkbox"!==N.type&&"submit"!==N.type&&"button"!==N.type&&j?N.value=m({element:e,type:b(e),tagName:M,value:j,maskInputOptions:c,maskInputFn:l}):H&&(N.checked=H)}"option"===M&&(e.selected&&!c.select?N.selected=!0:delete N.selected);if("canvas"===M&&v)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=y in i?i[y]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(N.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){var U=e.toDataURL(h.type,h.quality),W=document.createElement("canvas");W.width=e.width,W.height=e.height,U!==W.toDataURL(h.type,h.quality)&&(N.rr_dataURL=U)}if("img"===M&&p){k||(k=i.createElement("canvas"),E=k.getContext("2d"));var q=e,G=q.crossOrigin;q.crossOrigin="anonymous";var z=function e(){q.removeEventListener("load",e);try{k.width=q.naturalWidth,k.height=q.naturalHeight,E.drawImage(q,0,0),N.rr_dataURL=k.toDataURL(h.type,h.quality)}catch(t){console.warn("Cannot inline img src=".concat(q.currentSrc,"! Error: ").concat(t))}G?N.crossOrigin=G:q.removeAttribute("crossorigin")};q.complete&&0!==q.naturalWidth?z():q.addEventListener("load",z)}if("audio"===M||"video"===M){var $=N;$.rr_mediaState=e.paused?"paused":"played",$.rr_mediaCurrentTime=e.currentTime,$.rr_mediaPlaybackRate=e.playbackRate,$.rr_mediaMuted=e.muted,$.rr_mediaLoop=e.loop,$.rr_mediaVolume=e.volume}I||(e.scrollLeft&&(N.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(N.rr_scrollTop=e.scrollTop));if(T){var Y=e.getBoundingClientRect(),Q=Y.width,X=Y.height;N={class:N.class,rr_width:"".concat(Q,"px"),rr_height:"".concat(X,"px")}}"iframe"!==M||w(N.src)||(e.contentDocument||(N.rr_src=N.src),delete N.src);try{customElements.get(M)&&(n=!0)}catch(K){}return{type:r.Element,tagName:M,attributes:N,childNodes:[],isSVG:Z(e)||void 0,needBlock:T,rootId:C,isCustom:n}}(e,{doc:n,blockClass:o,blockSelector:a,inlineStylesheet:u,maskInputOptions:l,maskInputFn:h,dataURLOptions:v,inlineImages:w,recordCanvas:S,keepIframeSrcFn:I,newlyAddedElement:T,rootId:M});case e.TEXT_NODE:return function(e,t){var n,i=t.needsMask,o=t.maskTextFn,a=t.rootId,s=e.parentNode&&e.parentNode.tagName,u=e.textContent,c="STYLE"===s||void 0,l="SCRIPT"===s||void 0;if(c&&u){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(u=f(e.parentNode.sheet))}catch(d){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(d),e)}u=_(u,F(t.doc))}l&&(u="SCRIPT_PLACEHOLDER");!c&&!l&&u&&i&&(u=o?o(u,e.parentElement):u.replace(/[\S]/g,"*"));return{type:r.Text,textContent:u||"",isStyle:c,rootId:a}}(e,{doc:n,needsMask:s,maskTextFn:d,rootId:M});case e.CDATA_SECTION_NODE:return{type:r.CDATA,textContent:"",rootId:M};case e.COMMENT_NODE:return{type:r.Comment,textContent:e.textContent||"",rootId:M};default:return!1}}function U(e){return void 0===e||null===e?"":e.toLowerCase()}function W(e,t){var n=t.doc,i=t.mirror,o=t.blockClass,a=t.blockSelector,s=t.maskTextClass,u=t.maskTextSelector,f=t.skipChild,h=void 0!==f&&f,p=t.inlineStylesheet,v=void 0===p||p,m=t.maskInputOptions,g=void 0===m?{}:m,y=t.maskTextFn,b=t.maskInputFn,k=t.slimDOMOptions,E=t.dataURLOptions,S=void 0===E?{}:E,x=t.inlineImages,T=void 0!==x&&x,M=t.recordCanvas,N=void 0!==M&&M,A=t.onSerialize,_=t.onIframeLoad,D=t.iframeLoadTimeout,R=void 0===D?5e3:D,O=t.onStylesheetLoad,L=t.stylesheetLoadTimeout,Z=void 0===L?5e3:L,F=t.keepIframeSrcFn,P=void 0===F?function(){return!1}:F,V=t.newlyAddedElement,B=void 0!==V&&V,q=t.needsMask,G=t.preserveWhiteSpace,z=void 0===G||G;!q&&e.childNodes&&(q=j(e,s,u,void 0===q));var $,Y=H(e,{doc:n,mirror:i,blockClass:o,blockSelector:a,needsMask:q,inlineStylesheet:v,maskInputOptions:g,maskTextFn:y,maskInputFn:b,dataURLOptions:S,inlineImages:T,recordCanvas:N,keepIframeSrcFn:P,newlyAddedElement:B});if(!Y)return console.warn(e,"not serialized"),null;$=i.hasNode(e)?i.getId(e):!function(e,t){if(t.comment&&e.type===r.Comment)return!0;if(e.type===r.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&"js"===w(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(U(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===U(e.attributes.name)||"icon"===U(e.attributes.rel)||"apple-touch-icon"===U(e.attributes.rel)||"shortcut icon"===U(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&U(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(U(e.attributes.property).match(/^(og|twitter|fb):/)||U(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===U(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===U(e.attributes.name)||"googlebot"===U(e.attributes.name)||"bingbot"===U(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===U(e.attributes.name)||"generator"===U(e.attributes.name)||"framework"===U(e.attributes.name)||"publisher"===U(e.attributes.name)||"progid"===U(e.attributes.name)||U(e.attributes.property).match(/^article:/)||U(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===U(e.attributes.name)||"yandex-verification"===U(e.attributes.name)||"csrf-token"===U(e.attributes.name)||"p:domain_verify"===U(e.attributes.name)||"verify-v1"===U(e.attributes.name)||"verification"===U(e.attributes.name)||"shopify-checkout-api-token"===U(e.attributes.name)))return!0}}return!1}(Y,k)&&(z||Y.type!==r.Text||Y.isStyle||Y.textContent.replace(/^\s+|\s+$/gm,"").length)?C():I;var Q=Object.assign(Y,{id:$});if(i.add(e,Q),$===I)return null;A&&A(e);var X=!h;if(Q.type===r.Element){X=X&&!Q.needBlock,delete Q.needBlock;var K=e.shadowRoot;K&&d(K)&&(Q.isShadowHost=!0)}if((Q.type===r.Document||Q.type===r.Element)&&X){k.headWhitespace&&Q.type===r.Element&&"head"===Q.tagName&&(z=!1);var J={doc:n,mirror:i,blockClass:o,blockSelector:a,needsMask:q,maskTextClass:s,maskTextSelector:u,skipChild:h,inlineStylesheet:v,maskInputOptions:g,maskTextFn:y,maskInputFn:b,slimDOMOptions:k,dataURLOptions:S,inlineImages:T,recordCanvas:N,preserveWhiteSpace:z,onSerialize:A,onIframeLoad:_,iframeLoadTimeout:R,onStylesheetLoad:O,stylesheetLoadTimeout:Z,keepIframeSrcFn:P};if(Q.type===r.Element&&"textarea"===Q.tagName&&void 0!==Q.attributes.value);else for(var ee=0,te=Array.from(e.childNodes);ee<te.length;ee++){var ne=W(te[ee],J);ne&&Q.childNodes.push(ne)}if(c(e)&&e.shadowRoot)for(var re=0,ie=Array.from(e.shadowRoot.childNodes);re<ie.length;re++){var oe=W(ie[re],J);oe&&(d(e.shadowRoot)&&(oe.isShadow=!0),Q.childNodes.push(oe))}}return e.parentNode&&l(e.parentNode)&&d(e.parentNode)&&(Q.isShadow=!0),Q.type===r.Element&&"iframe"===Q.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(u){return}if("complete"===i){var a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&_){var n=W(t,{doc:t,mirror:i,blockClass:o,blockSelector:a,needsMask:q,maskTextClass:s,maskTextSelector:u,skipChild:!1,inlineStylesheet:v,maskInputOptions:g,maskTextFn:y,maskInputFn:b,slimDOMOptions:k,dataURLOptions:S,inlineImages:T,recordCanvas:N,preserveWhiteSpace:z,onSerialize:A,onIframeLoad:_,iframeLoadTimeout:R,onStylesheetLoad:O,stylesheetLoadTimeout:Z,keepIframeSrcFn:P});n&&_(e,n)}}),R),Q.type===r.Element&&"link"===Q.tagName&&"string"===typeof Q.attributes.rel&&("stylesheet"===Q.attributes.rel||"preload"===Q.attributes.rel&&"string"===typeof Q.attributes.href&&"css"===w(Q.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(a){return}if(!r){var o=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(o),i=!0,t()}))}}(e,(function(){if(O){var t=W(e,{doc:n,mirror:i,blockClass:o,blockSelector:a,needsMask:q,maskTextClass:s,maskTextSelector:u,skipChild:!1,inlineStylesheet:v,maskInputOptions:g,maskTextFn:y,maskInputFn:b,slimDOMOptions:k,dataURLOptions:S,inlineImages:T,recordCanvas:N,preserveWhiteSpace:z,onSerialize:A,onIframeLoad:_,iframeLoadTimeout:R,onStylesheetLoad:O,stylesheetLoadTimeout:Z,keepIframeSrcFn:P});t&&O(e,t)}}),Z),Q}function q(e,t){var n=t||{},r=n.mirror,i=void 0===r?new p:r,o=n.blockClass,a=void 0===o?"rr-block":o,s=n.blockSelector,u=void 0===s?null:s,c=n.maskTextClass,l=void 0===c?"rr-mask":c,d=n.maskTextSelector,f=void 0===d?null:d,h=n.inlineStylesheet,v=void 0===h||h,m=n.inlineImages,g=void 0!==m&&m,y=n.recordCanvas,b=void 0!==y&&y,w=n.maskAllInputs,k=void 0!==w&&w,E=n.maskTextFn,S=n.maskInputFn,x=n.slimDOM,I=void 0!==x&&x,C=n.dataURLOptions,T=n.preserveWhiteSpace,M=n.onSerialize,N=n.onIframeLoad,A=n.iframeLoadTimeout,_=n.onStylesheetLoad,D=n.stylesheetLoadTimeout,R=n.keepIframeSrcFn;return W(e,{doc:e,mirror:i,blockClass:a,blockSelector:u,maskTextClass:l,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:!0===k?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===k?{password:!0}:k,maskTextFn:E,maskInputFn:S,slimDOMOptions:!0===I||"all"===I?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===I,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===I?{}:I,dataURLOptions:C,inlineImages:g,recordCanvas:b,preserveWhiteSpace:T,onSerialize:M,onIframeLoad:N,iframeLoadTimeout:A,onStylesheetLoad:_,stylesheetLoadTimeout:D,keepIframeSrcFn:void 0===R?function(){return!1}:R,newlyAddedElement:!1})}var G=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function o(){var e={line:n,column:r};return function(t){return t.position=new c(e),m(),t}}var c=(0,u.Z)((function e(i){(0,s.Z)(this,e),this.start=i,this.end={line:n,column:r},this.source=t.source}));c.prototype.content=e;var l=[];function d(i){var o=new Error("".concat(t.source||"",":").concat(n,":").concat(r,": ").concat(i));if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;l.push(o)}function f(){return v(/^{\s*/)}function h(){return v(/^}/)}function p(){var t,n=[];for(m(),g(n);e.length&&"}"!==e.charAt(0)&&(t=T()||M());)t&&(n.push(t),g(n));return n}function v(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function m(){v(/^\s*/)}function g(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e=y();)e&&t.push(e),e=y();return t}function y(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return d("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function b(){for(m();"}"==e[0];)d("extra closing bracket"),e=e.slice(1),m();var t=v(/^(((?<!\\)"(?:\\"|[^"])*"|(?<!\\)'(?:\\'|[^'])*'|[^{])+)/);if(t){var n=t[0].trim().replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"\u200c")}));return function(e){var t,n=[],r="",i=0,o=0,s=null,u=(0,a.Z)(e);try{for(u.s();!(t=u.n()).done;){var c=t.value,l=r.endsWith("\\");s?s!==c||l||(s=null):"("===c?i++:")"===c?i--:"["===c?o++:"]"===c?o--:"'\"".includes(c)&&(s=c),","===c&&0===i&&0===o?(n.push(r),r=""):r+=c}}catch(d){u.e(d)}finally{u.f()}r&&n.push(r);return n}(n).map((function(e){return e.replace(/\u200C/g,",").trim()}))}}function w(){var e=o(),t=v(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=$(t[0]);if(!v(/^:\s*/))return d("property missing ':'");var r=v(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(G,""),value:r?$(r[0]).replace(G,""):""});return v(/^[;\s]*/),i}}function k(){var e,t=[];if(!f())return d("missing '{'");for(g(t);e=w();)!1!==e&&(t.push(e),g(t)),e=w();return h()?t:d("missing '}'")}function E(){for(var e,t=[],n=o();e=v(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),v(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:k()})}var S=C("import"),x=C("charset"),I=C("namespace");function C(e){var t=new RegExp("^@"+e+"\\s*((?:"+['(?<!\\\\)"(?:\\\\"|[^"])*"',"(?<!\\\\)'(?:\\\\'|[^'])*'","[^;]"].join("|")+")+);");return function(){var n=o(),r=v(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function T(){if("@"===e[0])return function(){var e=o(),t=v(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=v(/^([-\w]+)\s*/)))return d("@keyframes missing name");var r,i=t[1];if(!f())return d("@keyframes missing '{'");for(var a=g();r=E();)a.push(r),a=a.concat(g());return h()?e({type:"keyframes",name:i,vendor:n,keyframes:a}):d("@keyframes missing '}'")}}()||function(){var e=o(),t=v(/^@media *([^{]+)/);if(t){var n=$(t[1]);if(!f())return d("@media missing '{'");var r=g().concat(p());return h()?e({type:"media",media:n,rules:r}):d("@media missing '}'")}}()||function(){var e=o(),t=v(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:$(t[1]),media:$(t[2])})}()||function(){var e=o(),t=v(/^@supports *([^{]+)/);if(t){var n=$(t[1]);if(!f())return d("@supports missing '{'");var r=g().concat(p());return h()?e({type:"supports",supports:n,rules:r}):d("@supports missing '}'")}}()||S()||x()||I()||function(){var e=o(),t=v(/^@([-\w]+)?document *([^{]+)/);if(t){var n=$(t[1]),r=$(t[2]);if(!f())return d("@document missing '{'");var i=g().concat(p());return h()?e({type:"document",document:r,vendor:n,rules:i}):d("@document missing '}'")}}()||function(){var e=o();if(v(/^@page */)){var t=b()||[];if(!f())return d("@page missing '{'");for(var n,r=g();n=w();)r.push(n),r=r.concat(g());return h()?e({type:"page",selectors:t,declarations:r}):d("@page missing '}'")}}()||function(){var e=o();if(v(/^@host\s*/)){if(!f())return d("@host missing '{'");var t=g().concat(p());return h()?e({type:"host",rules:t}):d("@host missing '}'")}}()||function(){var e=o();if(v(/^@font-face\s*/)){if(!f())return d("@font-face missing '{'");for(var t,n=g();t=w();)n.push(t),n=n.concat(g());return h()?e({type:"font-face",declarations:n}):d("@font-face missing '}'")}}()}function M(){var e=o(),t=b();return t?(g(),e({type:"rule",selectors:t,declarations:k()})):d("selector missing")}return Y(function(){var e=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:l}}}())}function $(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Y(e,t){for(var n=e&&"string"===typeof e.type,r=n?e:t,i=0,o=Object.keys(e);i<o.length;i++){var a=e[o[i]];Array.isArray(a)?a.forEach((function(e){Y(e,r)})):a&&"object"===typeof a&&Y(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Q={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function X(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var K=/(max|min)-device-(width|height)/,J=new RegExp(K.source,"g"),ee=/([^\\]):hover/,te=new RegExp(ee.source,"g");function ne(e,t){var n=null===t||void 0===t?void 0:t.stylesWithHoverClass.get(e);if(n)return n;var r=z(e,{silent:!0});if(!r.stylesheet)return e;var i=[],o=[];!function e(t){"selectors"in t&&t.selectors&&t.selectors.forEach((function(e){ee.test(e)&&i.push(e)})),"media"in t&&t.media&&K.test(t.media)&&o.push(t.media),"rules"in t&&t.rules&&t.rules.forEach(e)}(r.stylesheet);var a=e;if(i.length>0){var s=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return X(e)})).join("|"),"g");a=a.replace(s,(function(e){var t=e.replace(te,"$1.\\:hover");return"".concat(e,", ").concat(t)}))}if(o.length>0){var u=new RegExp(o.filter((function(e,t){return o.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return X(e)})).join("|"),"g");a=a.replace(u,(function(e){return e.replace(J,"$1-$2")}))}return null===t||void 0===t||t.stylesWithHoverClass.set(e,a),a}function re(){return{stylesWithHoverClass:new Map}}function ie(e,t){var n,a=t.doc,c=t.hackCss,l=t.cache;switch(e.type){case r.Document:return a.implementation.createDocument(null,"",null);case r.DocumentType:return a.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case r.Element:var d,f=function(e){var t=Q[e.tagName]?Q[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);e.isSVG?d=a.createElementNS("http://www.w3.org/2000/svg",f):(e.isCustom&&(null===(n=a.defaultView)||void 0===n?void 0:n.customElements)&&!a.defaultView.customElements.get(e.tagName)&&a.defaultView.customElements.define(e.tagName,function(e){(0,i.Z)(n,e);var t=(0,o.Z)(n);function n(){return(0,s.Z)(this,n),t.apply(this,arguments)}return(0,u.Z)(n)}(a.defaultView.HTMLElement)),d=a.createElement(f));var h={};for(var p in e.attributes)if(Object.prototype.hasOwnProperty.call(e.attributes,p)){var v=e.attributes[p];if(("option"!==f||"selected"!==p||!1!==v)&&null!==v)if(!0===v&&(v=""),p.startsWith("rr_"))h[p]=v;else{var m="textarea"===f&&"value"===p,g="style"===f&&"_cssText"===p;if(g&&c&&"string"===typeof v&&(v=ne(v,l)),!m&&!g||"string"!==typeof v)try{if(e.isSVG&&"xlink:href"===p)d.setAttributeNS("http://www.w3.org/1999/xlink",p,v.toString());else if("onload"===p||"onclick"===p||"onmouse"===p.substring(0,7))d.setAttribute("_"+p,v.toString());else{if("meta"===f&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===p){d.setAttribute("csp-content",v.toString());continue}("link"!==f||"preload"!==e.attributes.rel&&"modulepreload"!==e.attributes.rel||"script"!==e.attributes.as)&&("link"===f&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")||("img"===f&&e.attributes.srcset&&e.attributes.rr_dataURL?d.setAttribute("rrweb-original-srcset",e.attributes.srcset):d.setAttribute(p,v.toString())))}}catch(w){}else d.appendChild(a.createTextNode(v)),e.childNodes=[]}}var y=function(){var t=h[b];if("canvas"===f&&"rr_dataURL"===b){var n=document.createElement("img");n.onload=function(){var e=d.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=t.toString(),d.RRNodeType&&(d.rr_dataURL=t.toString())}else if("img"===f&&"rr_dataURL"===b){var r=d;r.currentSrc.startsWith("data:")||(r.setAttribute("rrweb-original-src",e.attributes.src),r.src=t.toString())}if("rr_width"===b)d.style.width=t.toString();else if("rr_height"===b)d.style.height=t.toString();else if("rr_mediaCurrentTime"===b&&"number"===typeof t)d.currentTime=t;else if("rr_mediaState"===b)switch(t){case"played":d.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":d.pause()}else"rr_mediaPlaybackRate"===b&&"number"===typeof t?d.playbackRate=t:"rr_mediaMuted"===b&&"boolean"===typeof t?d.muted=t:"rr_mediaLoop"===b&&"boolean"===typeof t?d.loop=t:"rr_mediaVolume"===b&&"number"===typeof t&&(d.volume=t)};for(var b in h)y();if(e.isShadowHost)if(d.shadowRoot)for(;d.shadowRoot.firstChild;)d.shadowRoot.removeChild(d.shadowRoot.firstChild);else d.attachShadow({mode:"open"});return d;case r.Text:return a.createTextNode(e.isStyle&&c?ne(e.textContent,l):e.textContent);case r.CDATA:return a.createCDATASection(e.textContent);case r.Comment:return a.createComment(e.textContent);default:return null}}function oe(e,t){var n,i,o=t.doc,s=t.mirror,u=t.skipChild,l=void 0!==u&&u,d=t.hackCss,f=void 0===d||d,h=t.afterAppend,p=t.cache;if(s.has(e.id)){var v=s.getNode(e.id),m=s.getMeta(v);if(i=e,(n=m)&&i&&n.type===i.type&&(n.type===r.Document?n.compatMode===i.compatMode:n.type===r.DocumentType?n.name===i.name&&n.publicId===i.publicId&&n.systemId===i.systemId:n.type===r.Comment||n.type===r.Text||n.type===r.CDATA?n.textContent===i.textContent:n.type===r.Element&&n.tagName===i.tagName&&JSON.stringify(n.attributes)===JSON.stringify(i.attributes)&&n.isSVG===i.isSVG&&n.needBlock===i.needBlock))return s.getNode(e.id)}var g=ie(e,{doc:o,hackCss:f,cache:p});if(!g)return null;if(e.rootId&&s.getNode(e.rootId)!==o&&s.replace(e.rootId,o),e.type===r.Document&&(o.close(),o.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==r.DocumentType&&(e.childNodes[0].type===r.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?o.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):o.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),g=o),s.add(g,e),(e.type===r.Document||e.type===r.Element)&&!l){var y,b=(0,a.Z)(e.childNodes);try{var w=function(){var t=y.value,n=oe(t,{doc:o,mirror:s,skipChild:!1,hackCss:f,afterAppend:h,cache:p});if(!n)return console.warn("Failed to rebuild",t),1;if(t.isShadow&&c(g)&&g.shadowRoot)g.shadowRoot.appendChild(n);else if(e.type===r.Document&&t.type==r.Element){var i=n,a=null;i.childNodes.forEach((function(e){"BODY"===e.nodeName&&(a=e)})),a?(i.removeChild(a),g.appendChild(n),i.appendChild(a)):g.appendChild(n)}else g.appendChild(n);h&&h(n,t.id)};for(b.s();!(y=b.n()).done;)w()}catch(k){b.e(k)}finally{b.f()}}return g}function ae(e,t){var n=t.doc,i=t.onVisit,o=t.hackCss,s=void 0===o||o,u=t.afterAppend,c=t.cache,l=t.mirror,d=void 0===l?new p:l,f=oe(e,{doc:n,mirror:d,skipChild:!1,hackCss:s,afterAppend:u,cache:c});return function(e,t){var n,r=(0,a.Z)(e.getIds());try{for(r.s();!(n=r.n()).done;){var i=n.value;e.has(i)&&t(e.getNode(i))}}catch(o){r.e(o)}finally{r.f()}}(d,(function(e){i&&i(e),function(e,t){var n=t.getMeta(e);if((null===n||void 0===n?void 0:n.type)===r.Element){var i=e;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var a=n.attributes[o];"rr_scrollLeft"===o&&(i.scrollLeft=a),"rr_scrollTop"===o&&(i.scrollTop=a)}}}(e,d)})),f}},1737:function(e,t,n){"use strict";n.d(t,{$1:function(){return v},Cj:function(){return T},E2:function(){return R},Fn:function(){return C},He:function(){return A},IT:function(){return b},OK:function(){return x},P2:function(){return d},WU:function(){return k},_X:function(){return D},_f:function(){return F},fM:function(){return g},gp:function(){return m},jB:function(){return L},md:function(){return _},nF:function(){return w},on:function(){return u},qs:function(){return M},r$:function(){return h},rU:function(){return y},s6:function(){return I},ug:function(){return O},vD:function(){return N},xO:function(){return S},y5:function(){return E},yU:function(){return f},zq:function(){return p}});var r=n(5671),i=n(3144),o=n(2982),a=n(7762),s=n(5512);function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var c="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",l={map:{},getId:function(){return console.error(c),-1},getNode:function(){return console.error(c),null},removeNodeFromMap:function(){console.error(c)},has:function(){return console.error(c),!1},reset:function(){console.error(c)}};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=Date.now();i||!1!==n.leading||(i=u);var c=t-(u-i),l=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(l,a)):r||!1===n.trailing||(r=setTimeout((function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(l,a)}),c))}}function f(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),o&&o.set&&o.set.call(this,e)}}),function(){return f(e,t,o||{},!0)}}function h(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"===typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(o){return function(){}}}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(l=new Proxy(l,{get:function(e,t,n){return"map"===t&&console.error(c),Reflect.get(e,t,n)}}));var p=Date.now;function v(e){var t,n,r,i,o,a,s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null===s||void 0===s?void 0:s.documentElement.scrollLeft)||(null===(n=null===(t=null===s||void 0===s?void 0:s.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null===s||void 0===s?void 0:s.body)||void 0===r?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null===s||void 0===s?void 0:s.documentElement.scrollTop)||(null===(o=null===(i=null===s||void 0===s?void 0:s.body)||void 0===i?void 0:i.parentElement)||void 0===o?void 0:o.scrollTop)||(null===(a=null===s||void 0===s?void 0:s.body)||void 0===a?void 0:a.scrollTop)||0}}function m(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function g(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function y(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function b(e,t,n,r){if(!e)return!1;var i=y(e);if(!i)return!1;try{if("string"===typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if((0,s.pe)(i,t,r))return!0}catch(o){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function w(e,t){return-1!==t.getId(e)}function k(e,t){return t.getId(e)===s.zi}function E(e,t){if((0,s.Zq)(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||E(e.parentNode,t))}function S(e){return Boolean(e.changedTouches)}function x(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===i)return!0}while(i=i&&i.parentNode);return!1})}function I(e){var t,n={},r=function(e,t){var r={value:e,parent:t,children:[]};return n[e.node.id]=r,r},i=[],o=(0,a.Z)(e);try{for(o.s();!(t=o.n()).done;){var s=t.value,u=s.nextId,c=s.parentId;if(u&&u in n){var l=n[u];if(l.parent){var d=l.parent.children.indexOf(l);l.parent.children.splice(d,0,r(s,l.parent))}else{var f=i.indexOf(l);i.splice(f,0,r(s,null))}}else if(c in n){var h=n[c];h.children.push(r(s,h))}else i.push(r(s,null))}}catch(p){o.e(p)}finally{o.f()}return i}function C(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)C(e.children[n],t)}function T(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function M(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function N(e,t){var n,r,i=null===(r=null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var o=i.getBoundingClientRect(),a=N(i,t),s=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function A(e){return Boolean(null===e||void 0===e?void 0:e.shadowRoot)}function _(e,t){var n=e[t[0]];return 1===t.length?n:_(n.cssRules[t[1]].cssRules,t.slice(2))}function D(e){var t=(0,o.Z)(e),n=t.pop();return{positions:t,index:n}}function R(e){for(var t=new Set,n=[],r=e.length;r--;){var i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}/[1-9][0-9]{12}/.test(Date.now().toString())||(p=function(){return(new Date).getTime()});var O=function(){function e(){(0,r.Z)(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return(0,i.Z)(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}();function L(e){var t,n,r=null;return(null===(n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function Z(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=L(n);)n=t;return n}(e);return t.contains(n)}function F(e){var t=e.ownerDocument;return!!t&&(t.contains(e)||Z(e))}},1414:function(e,t,n){"use strict";n.d(t,{Et:function(){return a},FX:function(){return s},SA:function(){return u},Y2:function(){return o},tw:function(){return r},yh:function(){return i}});var r=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(r||{}),i=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(i||{}),o=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(o||{}),a=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(a||{}),s=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(s||{}),u=function(e){return e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e}(u||{})}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+"."+{542:"044e26d9",736:"3b0c3434"}[e]+".chunk.js"},n.miniCssF=function(e){return"static/css/"+e+".32598d7d.chunk.css"},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={};n.l=function(t,r,i,o){if(e[t])e[t].push(r);else{var a,s;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var l=u[c];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")=="fe:"+i){a=l;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack","fe:"+i),a.src=t),e[t]=[r];var d=function(n,r){a.onerror=a.onload=null,clearTimeout(f);var i=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((function(e){return e(r)})),n)return n(r)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n.p="/",function(){if("undefined"!==typeof document){var e=function(e){return new Promise((function(t,r){var i=n.miniCssF(e),o=n.p+i;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var i=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(i===e||i===t))return a}var o=document.getElementsByTagName("style");for(r=0;r<o.length;r++){var a;if((i=(a=o[r]).getAttribute("data-href"))===e||i===t)return a}}(i,o))return t();!function(e,t,n,r,i){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(n){if(o.onerror=o.onload=null,"load"===n.type)r();else{var a=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.href||t,u=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");u.code="CSS_CHUNK_LOAD_FAILED",u.type=a,u.request=s,o.parentNode&&o.parentNode.removeChild(o),i(u)}},o.href=t,n?n.parentNode.insertBefore(o,n.nextSibling):document.head.appendChild(o)}(e,o,null,t,r)}))},t={179:0};n.f.miniCss=function(n,r){t[n]?r.push(t[n]):0!==t[n]&&{736:1}[n]&&r.push(t[n]=e(n).then((function(){t[n]=0}),(function(e){throw delete t[n],e})))}}}(),function(){var e={179:0};n.f.j=function(t,r){var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise((function(n,r){i=e[t]=[n,r]}));r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var i,o,a=r[0],s=r[1],u=r[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(u)u(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkfe=self.webpackChunkfe||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e={};n.r(e),n.d(e,{default:function(){return yt}});var t=n(4165),r=n(5861),i=n(603),o=n(9478),a=n(5671),s=n(3144),u=function(){function e(t){if((0,a.Z)(this,e),this.structuralVicinity=void 0,this.visualVicinity=void 0,this.serializedElement=void 0,this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.innerFeatures=void 0,this.staticCandidates=void 0,this.positioning=void 0,this.svgs=void 0,"object"===typeof t)for(var n in t)this[n]=t[n];else if("string"===typeof t){var r=JSON.parse(t);for(var i in r)this[i]=r[i]}}return(0,s.Z)(e,[{key:"serialize",value:function(){return JSON.stringify(this)}}]),e}(),c={attributesToExtract:["class","src","placeholder","href","checked","disabled","contenteditable","draggable","hidden","inputmode","role","title","name","type","readonly","size","required","multiple","min","max","step","maxlength","alt","loop","controls","poster"],structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}},l=n(1413),d=n(7873),f=n(4942),h={rect:["width","height"],circle:["cx","cy","r"],ellipse:["cx","cy","rx","ry"],line:["x1","y1","x2","y2"],polygon:["points"],polyline:["points"],path:["d"],text:["x","y"]},p=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.limit=5,this.extractSVG=function(e){return Array.from(e.children).map((function(e){var t=h[e.tagName.toLowerCase()];if(!t)return null;var n=t.reduce((function(t,n){var r=e.getAttribute(n);return(0,l.Z)((0,l.Z)({},t),{},(0,f.Z)({},n,r))}),{});return{tagName:e.tagName.toLowerCase(),attributes:n}})).filter((function(e){return!!e}))}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.matches("svg")?[e]:e.querySelectorAll("svg");if(t.length&&!(t.length>this.limit))return Array.from(t).map(this.extractSVG)}}]),e}(),v=n(458),m=function(e){return(0,v.GF)(e,{useCache:!0}).isHidden},g=function(e,t){var n=e.tagName.toLowerCase();switch(n){case"img":case"video":case"audio":return{type:d.EI.Media,tag:n,src:e.getAttribute("src"),size:{width:e.clientWidth,height:e.clientHeight},screenSize:{width:window.innerWidth,height:window.innerHeight},isRoot:t,isHidden:m(e)};case"svg":return{type:d.EI.SVG,tag:n,components:new p(document).extract(e)[0],isRoot:t,isHidden:m(e)};case"a":return{type:d.EI.Anchor,tag:n,href:e.getAttribute("href"),text:e.innerText,isRoot:t,isHidden:m(e)};case"button":return{type:d.EI.Button,tag:n,text:e.innerText,buttonType:e.getAttribute("type")||"button",isRoot:t,isHidden:m(e)};case"input":return{type:d.EI.Input,tag:n,inputType:e.getAttribute("type"),placeholder:e.getAttribute("placeholder"),isRoot:t,isHidden:m(e)};case"table":case"form":case"textarea":case"iframe":case"select":return{type:d.EI.NoData,tag:n,isRoot:t,isHidden:m(e)}}if(e.innerHTML.trim()===e.innerText&&e.innerHTML.length)return{type:d.EI.Text,tag:n,text:y(e.innerHTML),isRoot:t,isHidden:m(e)}},y=function(e){return e.length>256?e.substring(0,256)+"...":e},b=function(e){return Object.keys(e||{}).reduce((function(t,n){var r=e[n];return r&&(t[n]=r),t}),{})},w=function(e){var t=b(e);return!(!t||!Object.keys(t).length)},k=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord;return i?void 0!==o&&o?e===t||e.startsWith(t)||e.includes(" ".concat(t," "))||e.endsWith(t):e.includes(t):e===t},E=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.elementsByQueryCache={}}return(0,s.Z)(e,[{key:"getElementsByQuery",value:function(e){return this.elementsByQueryCache[e]||(this.elementsByQueryCache[e]=(0,v.RA)(e,this.document)),this.elementsByQueryCache[e]}},{key:"extract",value:function(e){for(var t=this,n=e.element,r=e.setClass,i=e.setAttribute,o=e.getElementsInStructuralVicinity,a=e.getElementsInVisualVicinity,s=function(){var e=n.attributes[u],s=e.name,l=e.value;return c.attributesToExtract.includes(s)?"string"!==typeof l?0:"class"===s?(l.split(" ").forEach((function(e){e.length&&r(e,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,e,{contains:!0,matchWholeWord:!0}))})),0):void i(s,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,l)):0},u=0;u<n.attributes.length;++u)s()}},{key:"processAttribute",value:function(e,t,n){var r=e.element,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=this.getElementsByQuery("*"),u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord,a=void 0!==o&&o;return t=t.replaceAll("\n","\\A ").replaceAll('"','\\"'),i?a?"[".concat(e,'="').concat(t,'"],[').concat(e,'*="').concat(t,' "],[').concat(e,'*=" ').concat(t,' "],[').concat(e,'*=" ').concat(t,'"]'):"[".concat(e,'*="').concat(t,'"]'):"[".concat(e,'="').concat(t,'"]')}(t,n,a),c=this.getElementsByQuery(u),l=this.getElementsByQuery("".concat(r.tagName.toLowerCase())),d=c.filter((function(e){return e.tagName===r.tagName})),f=i?i():[],h=f.filter((function(e){return e.element.attributes[t]&&k(e.element.attributes[t].value,n,a)})),p=o?o():[],v=p.filter((function(e){return e.element.attributes[t]&&k(e.element.attributes[t].value,n,a)}));return{value:n,globalUniqueness:1-c.length/s.length,tagUniqueness:1-d.length/l.length,structuralVicinityUniqueness:i?1-h.length/f.length:void 0,visualVicinityUniqueness:o?1-v.length/p.length:void 0}}}]),e}(),S=function(){function e(t){var n=this;(0,a.Z)(this,e),this.el=null,this.structuralVicinityData=void 0,this.visualVicinityData=void 0,this.serializedElement="",this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.react=void 0,this.innerFeatures=void 0,this.positioning=void 0,this.svgs=void 0,this.attributesExtractor=void 0,this.getElementsInStructuralVicinity=function(){return n.structuralVicinityData.elementsInStructuralVicinity},this.setElementStructuralVicinityData=function(e){n.structuralVicinityData=e},this.setElementVisualVicinityData=function(e){n.visualVicinityData=e},this.getElementsInVisualVicinity=function(){return n.visualVicinityData},this.setSerializedElement=function(e){n.serializedElement=e},this.setAttribute=function(e,t){n.attributes[e]=t},this.setClass=function(e,t){n.classes[e]=t},this.setInnerText=function(e){n.innerText=e},this.setStyle=function(e){n.style=e},this.setTag=function(e){n.tag=e},this.setReact=function(e){n.react=e},this.setInnerFeatures=function(e){n.innerFeatures=e},this.setPositioning=function(e){n.positioning=e},this.setSVGs=function(e){n.svgs=e},this.el=t,this.attributesExtractor=new E(this.el.ownerDocument)}return(0,s.Z)(e,[{key:"serialize",value:function(){}},{key:"getSerializedElement",value:function(){return this.serializedElement}},{key:"element",get:function(){return this.el}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getClasses",value:function(){return this.classes}},{key:"getStyle",value:function(){return this.style}},{key:"getInlineStyle",value:function(){return this.style.inline}},{key:"getComputedStyle",value:function(){return this.style.computed}},{key:"getTag",value:function(){return this.tag}},{key:"getInnerFeatures",value:function(){return this.innerFeatures}},{key:"getInnerText",value:function(){return this.innerText}},{key:"getSVGs",value:function(){return this.svgs}},{key:"toMetadata",value:function(){return{structuralVicinity:this.makeStructuralVicinityMetadata(),visualVicinity:this.makeVisualVicinityMetadata(),serializedElement:this.getSerializedElement(),attributes:this.getAttributes(),classes:this.getClasses(),innerText:this.getInnerText(),tag:this.getTag(),style:this.getStyle(),innerFeatures:this.getInnerFeatures(),staticCandidates:this.extractStaticCandidates(),positioning:this.positioning,svgs:this.getSVGs()}}},{key:"extractStaticCandidates",value:function(){return b({text:this.extractStaticTextCandidate(),labeled:this.extractLabeled(),labeling:this.extractLabeling(),svgTitle:this.extractSVGTitle()})}},{key:"makeVicinityMetadata",value:function(e,t){var n=this;return e.reduce((function(e,r){var i=n.isVicinityQualifiedElement(r.element),o=i.qualified,a=i.feature;if(!o)return e;var s={},u={};n.attributesExtractor.extract({element:r.element,setClass:function(e,t){return s[e]=t},setAttribute:function(e,t){return u[e]=t}});var c=(0,l.Z)({tag:r.element.tagName.toLowerCase(),classes:s,attributes:u,text:n.extractTextForMetadata(r.element),feature:a,relativePosition:n.element.compareDocumentPosition(r.element)},t(r));return e.push(c),e}),[])}},{key:"makeStructuralVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInStructuralVicinity(),(function(e){return{position:e.position}}))}},{key:"makeVisualVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInVisualVicinity(),(function(e){return{position:[e.position],distance:e.distance}}))}},{key:"isVicinityQualifiedElement",value:function(e){if(e===this.element)return{qualified:!1};if(!c.vicinityFeatureElementsOnly)return{qualified:!0};var t=g(e);return{qualified:!!t,feature:t}}},{key:"extractTextForMetadata",value:function(e){if(e.innerHTML===e.innerText){var t=e.innerHTML;return t.length>256?t.substring(0,256)+"...":t}}},{key:"extractStaticTextCandidate",value:function(){var e,t,n;switch(this.tag){case"input":case"textarea":return null===(e=this.attributes)||void 0===e||null===(t=e.placeholder)||void 0===t?void 0:t.value;default:return null===(n=this.innerText)||void 0===n?void 0:n.content}}},{key:"extractLabeling",value:function(){if("label"===this.element.tagName.toLowerCase())return(0,v.C0)(this.element);var e=(0,v.Du)(this.element,"label");if(e&&this.attributeExists(e.getAttribute("for")))return(0,v.C0)(e);try{if(this.element.id&&this.element.id.length)if((0,v.RA)('[aria-labelledby="'.concat(this.element.id,'"]')).length)return(0,v.C0)(this.element)}catch(xt){console.error("extractLabeling error",xt)}}},{key:"extractLabeled",value:function(){var e=this.element.getAttribute("aria-label");if(this.attributeExists(e))return e;var t=(0,v.Du)(this.element,"label");if(t&&!this.attributeExists(t.getAttribute("for")))return(0,v.C0)(t);if(this.element.id&&this.element.id.length)try{var n=(0,v.RA)("label[for=".concat(this.element.id,"]"));if(n.length)return(0,v.C0)(n[0])}catch(xt){return}var r=this.element.getAttribute("aria-labelledby");if(this.attributeExists(r)){var i=(0,v.RA)(r.split(" ").map((function(e){return"#".concat(e)})).join(","));if(i.length)return(0,v.C0)(i[0])}}},{key:"extractSVGTitle",value:function(){try{if("svg"!==this.element.tagName.toLowerCase())return;var e=this.element.querySelector("title");if(!e)return;return(0,v.C0)(e)}catch(xt){console.error("extractSVGTitle error",xt)}}},{key:"attributeExists",value:function(e){return e&&e.length>0}}]),e}(),x=n(2982),I=function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.structuralVicinityData={elementsInStructuralVicinity:[],html:""},this.element=t,this.config=n}return(0,s.Z)(e,[{key:"getInitialLimit",value:function(){switch(this.config.type){case"ratio":return document.querySelectorAll("*").length*this.config.value;case"fixed":return this.config.value}}},{key:"calculate",value:function(){var e=Date.now().toString();return this.structuralVicinityData.html=this.populateStructuralVicinity(this.element,[d.i7.Element],{runId:e,step:0,limit:this.getInitialLimit()}),this.structuralVicinityData.elementsInStructuralVicinity.forEach((function(t){return t.element.attributes.removeNamedItem("checksum-radial-traverse-".concat(e))})),this.structuralVicinityData}},{key:"populateStructuralVicinity",value:function(e,t,n){var r=this,i=n.runId,o=n.step,a=n.limit;if(!e||o>a)return"";if(void 0!==e.attributes["checksum-radial-traverse-".concat(i)])return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute("checksum-radial-traverse-".concat(i),o.toString());var s={runId:i,step:o+1,limit:this.config.useDecayingLimit?a-1:a},u=this.populateStructuralVicinity((0,v.nq)(e),[].concat((0,x.Z)(t),[d.i7.Parent]),s),c=this.populateStructuralVicinity(e.previousElementSibling,[].concat((0,x.Z)(t),[d.i7.LeftSibling]),s),l=this.populateStructuralVicinity(e.nextElementSibling,[].concat((0,x.Z)(t),[d.i7.RightSibling]),s),f=[];(0,v.ZH)(e).map((function(e,n){return f.push(r.populateStructuralVicinity(e,[].concat((0,x.Z)(t),[d.i7.Child]),s))}));var h=c+e.outerHTML.replace(e.innerHTML,f.join(""))+l;return u&&!u.includes(e.outerHTML)?u.replace("></",">".concat(h,"</")):u?u.replace(e.outerHTML,h):h}}]),e}(),C=function(e){return e[e.New=0]="New",e[e.Covered=1]="Covered",e[e.ElementTooBig=2]="ElementTooBig",e[e.Self=3]="Self",e}(C||{}),T=function(){function e(t,n){var r;(0,a.Z)(this,e),this.document=t,this.config=n,this.debug=!1,this.sampleBoxColors=(r={},(0,f.Z)(r,C.New,"green"),(0,f.Z)(r,C.Covered,"orange"),(0,f.Z)(r,C.ElementTooBig,"red"),(0,f.Z)(r,C.Self,"blue"),r)}return(0,s.Z)(e,[{key:"calculate",value:function(e){for(var t=this,n=[],r=this.config.radius,i=this.config.scanStep,o=e.getBoundingClientRect(),a=o.left-r;a<o.left+o.width+r;a+=i)for(var s=function(){var e=a+i/2,s=u+i/2;if(t.doesRectContain(o,{left:a,top:u,right:a+i,bottom:u+i}))return t.addTrace(e,s,i,C.Self),0;var c=t.document.elementFromPoint(e,s);if(!c)return 0;var l=c.getBoundingClientRect();if(l.width>2*r&&l.height>2*r||t.doesRectContain(l,o))return t.addTrace(e,s,i,C.ElementTooBig),0;if(!!n.find((function(e){return e.element===c})))return t.addTrace(e,s,i,C.Covered),0;var d=t.getPosition(o,l),f=d.position,h=d.distance;n.push({element:c,position:f,distance:h}),t.addTrace(e,s,i,C.New)},u=o.top-r;u<o.top+o.height+r;u+=i)s();return n}},{key:"getPosition",value:function(e,t){var n=this.getCenter(t),r=n.x,i=n.y,o=this.getCenter(e),a=o.x,s=o.y;return{distance:Number(Math.sqrt(Math.pow(a-r,2)+Math.pow(s-i,2)).toFixed(2)),position:function(){var e=r-a,t=i-s;return e<0&&t<0?d.BM.TopLeft:e>0&&t<0?d.BM.TopRight:e<0&&t>0?d.BM.BottomLeft:e>0&&t>0?d.BM.BottomRight:0===e&&t<0?d.BM.Top:0===e&&t>0?d.BM.Bottom:e<0&&0===t?d.BM.Left:e>0&&0===t?d.BM.Right:d.BM.Center}()}}},{key:"getCenter",value:function(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}},{key:"addTrace",value:function(e,t,n,r){if(this.debug){var i=this.document.createElement("xdiv");i.setAttribute("style","position: absolute; width: ".concat(n,"px; height: ").concat(n,"px; top: ").concat(t,"px; left: ").concat(e,"px; background: ").concat(this.sampleBoxColors[r],"; z-index: 999999999999;opacity:0.4")),this.document.getElementsByTagName("body")[0].prepend(i)}}},{key:"doesRectContain",value:function(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}},{key:"doRectsOverlap",value:function(e,t){var n=e.right<t.left,r=e.left>t.right,i=e.top>t.bottom,o=e.top<t.top;return!(n||r||i||o)}}]),e}();window.vve=new T({radius:50,scanStep:10});var M=n(2352);window.resq$=M.resq$,window.resq$$=M.resq$$;var N=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=this.findParentComponent(e,{ignoreBaseElement:!0});return{component:t,parentComponent:this.findParentComponent(t.node)}}},{key:"findParentComponent",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.ignoreBaseElement,i=void 0!==r&&r,o=n.baseElement,a=void 0===o?void 0:o,s=(0,M.resq$$)("*",e.parentElement).find((function(t){return 1===t.children.length&&t.children[0].node===e}));return a=null!==(t=a)&&void 0!==t?t:e,s&&(i||s.node!==a)?this.parseRESQresult(s):this.findParentComponent(e.parentElement,{baseElement:a,ignoreBaseElement:i})}},{key:"parseRESQresult",value:function(e){if(e){return{name:e.name,node:e.node,isFragment:e.isFragment,stateTokens:function e(t){switch(typeof t){case"string":return[t];case"object":return Array.isArray(t)?t.map(e):Object.keys(t)}}(e.state),propsNames:Object.keys(e.props),hasChildren:!!e.children.length}}}}]),e}(),A=new N,_=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){return{component:void 0,parentComponent:void 0}}}]),e}(),D=(new _,function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.provider=A,this.element=t,this.config=n}return(0,s.Z)(e,[{key:"extract",value:function(){return this.provider.extract(this.element)}}]),e}()),R=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.tagBaseComputedStyle={}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.element,n=e.setStyle,r=t.tagName.toLowerCase();try{if(!this.tagBaseComputedStyle[r]){var i=this.document.createElement(r);this.document.getElementsByTagName("body")[0].prepend(i),this.tagBaseComputedStyle[r]=this.sanitzieStyle(window.getComputedStyle(i)),i.remove()}}catch(xt){if(console.error("Failed to extract style for tag",r,xt),!this.tagBaseComputedStyle[r])return}n({inline:this.sanitzieStyle(t.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[r],this.sanitzieStyle(window.getComputedStyle(t)))})}},{key:"diffComputedStyle",value:function(e,t){var n,r;return n=e,r=t,Object.keys(r).reduce((function(e,t){return n[t]===r[t]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},t,r[t]))}),{})}},{key:"sanitzieStyle",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).acceptEmptyValue,n=void 0===t||t;return Object.keys(e).reduce((function(t,r){if(!isNaN(r))return t;var i=e[r];return n||i?(t[r]=i,t):t}),{})}}]),e}(),O=n(1209),L=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.cache=void 0,this.makeFeatureNode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:n?e.tagName.toLowerCase():void 0,feature:n?g(e,t):void 0,children:[],isRoot:t}},this.includeRootElements=!0,this.rootElementsTypeExceptions=[d.EI.Text],this.cache=O.J.getInstance("innerFeaturesExtractor",{log:!1})}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=[],n=this.makeFeatureNode(e,!0);return this.walk(e,n,t),t}},{key:"getMapFromCache",value:function(){var e=this.cache.get();return e||(e=new Map,this.cache.set(e)),e}},{key:"getFeatureNodeFromCache",value:function(e){var t=this.getMapFromCache();return t.has(e)?t.get(e):void 0}},{key:"addFeatureNodeToCache",value:function(e,t){var n=this.getMapFromCache();n.set(e,t),this.cache.set(n)}},{key:"walk",value:function(e,t,n){var r=this,i=!1;(0,v.mn)(e).forEach((function(e){var o,a=null!==(o=r.getFeatureNodeFromCache(e))&&void 0!==o?o:r.makeFeatureNode(e),s=r.walk(e,a,n);s&&t.children.push(a),i||(i=s)}));var o=!!t.feature;return!o||t.isRoot&&!this.shouldIncludeRootNode(t)||n.push(t.feature),this.addFeatureNodeToCache(e,t),o||i}},{key:"shouldIncludeRootNode",value:function(e){return!!this.includeRootElements&&!this.rootElementsTypeExceptions.includes(e.type)}}]),e}();window.inner_features_extractor=new L;var Z=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t;return{content:null!==(t=(0,v.C0)(e))&&void 0!==t?t:void 0}}}]),e}(),F=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.bottom,i=t.left,o=t.right,a=document.documentElement.scrollHeight,s=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(n,window.innerHeight),bottom:this.normalize(r,window.innerHeight),left:this.normalize(i,window.innerWidth),right:this.normalize(o,window.innerWidth)}},document:{size:{height:a,width:s},element:{top:this.normalize(n+window.scrollY,a),bottom:this.normalize(r+window.scrollY,a),left:this.normalize(i+window.scrollX,s),right:this.normalize(o+window.scrollX,s)}}}}},{key:"normalize",value:function(e,t){return e/t}}]),e}(),P=n(5034),V=function(){function e(t,n){(0,a.Z)(this,e),this.xmlSerializer=void 0,this.document=void 0,this.config=void 0,this.visualVicinityExtractor=void 0,this.styleExtractor=void 0,this.innerFeaturesExtractor=void 0,this.innerTextExtractor=void 0,this.positioningExtractor=void 0,this.stats={serializeElement:0,populateElementsInStructuralVicinity:0,populateElementsInVisualVicinity:0,extractAttributes:0,extractInnerText:0,extractStyle:0,extractTag:0,extractInnerFeatures:0,extractPositioning:0,extractSVGComponents:0,final:0},this.xmlSerializer=new XMLSerializer,this.document=t,this.config=null!==n&&void 0!==n?n:c,this.visualVicinityExtractor=new T(this.document,this.config.visualVicinity),this.styleExtractor=new R(this.document),this.innerFeaturesExtractor=new L(this.document),this.innerTextExtractor=new Z(this.document),this.positioningExtractor=new F(this.document)}return(0,s.Z)(e,[{key:"isSameDocument",value:function(e){return this.document===e}},{key:"extract",value:function(e){var t=new P.t(e).scrollIntoView(),n=Date.now(),r=new S(e);return this.serializeElement(r),this.stats.serializeElement+=Date.now()-n,n=Date.now(),this.populateElementsInStructuralVicinity(r),this.stats.populateElementsInStructuralVicinity+=Date.now()-n,n=Date.now(),this.populateElementsInVisualVicinity(r),this.stats.populateElementsInVisualVicinity+=Date.now()-n,n=Date.now(),this.extractAttributes(r),this.stats.extractAttributes+=Date.now()-n,n=Date.now(),this.extractInnerText(r),this.stats.extractInnerText+=Date.now()-n,n=Date.now(),this.extractStyle(r),this.stats.extractStyle+=Date.now()-n,n=Date.now(),this.extractTag(r),this.stats.extractTag+=Date.now()-n,n=Date.now(),this.extractInnerFeatures(r),this.stats.extractInnerFeatures+=Date.now()-n,n=Date.now(),this.extractPositioning(r),this.stats.extractPositioning+=Date.now()-n,n=Date.now(),this.extractSVGComponents(r),this.stats.extractSVGComponents+=Date.now()-n,n=Date.now(),t.restore(),this.stats.final+=Date.now()-n,r}},{key:"extractReact",value:function(e){var t=e.element;(0,e.setReact)(new D(t,this.config.react).extract())}},{key:"extractTag",value:function(e){var t=e.element;(0,e.setTag)(t.tagName.toLowerCase())}},{key:"extractPositioning",value:function(e){var t=e.element;(0,e.setPositioning)(this.positioningExtractor.extract(t))}},{key:"extractSVGComponents",value:function(e){var t=e.element;(0,e.setSVGs)(new p(this.document).extract(t))}},{key:"serializeElement",value:function(e){e.element,e.setSerializedElement}},{key:"extractAttributes",value:function(e){var t=e.element,n=e.setClass,r=e.setAttribute,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity;return new E(this.document).extract({element:t,setClass:n,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o})}},{key:"populateElementsInStructuralVicinity",value:function(e){var t=e.element;(0,e.setElementStructuralVicinityData)(new I(t,this.config.structuralVicinity).calculate())}},{key:"populateElementsInVisualVicinity",value:function(e){var t=e.element;(0,e.setElementVisualVicinityData)(this.visualVicinityExtractor.calculate(t))}},{key:"extractInnerText",value:function(e){var t=e.element;(0,e.setInnerText)(this.innerTextExtractor.extract(t))}},{key:"extractStyle",value:function(e){var t=e.element,n=e.setStyle;return this.styleExtractor.extract({element:t,setStyle:n})}},{key:"extractInnerFeatures",value:function(e){var t=e.element;(0,e.setInnerFeatures)(this.innerFeaturesExtractor.extract(t))}}]),e}(),B=n(136),j=n(7277),H=n(8664),U=n(7762),W=n(7750),q=function(){function e(t,n){var r=this;(0,a.Z)(this,e),this.POSITIONING_SATISFACTORY_SCORE=1,this.processStartTime=void 0,this.targetElementESRAMetadata=void 0,this.targetElementStaticData={},this.esraMetadataExtractor=void 0,this.elementsFiltering=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.qualifiedInnerFeatures=void 0,this.qualifiedInnerText=void 0,this.candidateQueries=[],this.candidates=[],this.uniqueCandidates=[],this.queryCandidates=[],this.interactableCandidates=[],this.rankedCandidates=[],this.filteredAndSortedRankedCandidates=[],this.finalCandidates=[],this.removedCandidates=void 0,this.similarity=void 0,this.weightsSum=0,this.config={innerText:{dropIfMoreThanNCandidates:5},innerFeatures:{mandatoryPercentage:.6,mandatoryMax:6},results:{scorePercentile:.75,epsilon:.01}},this.getSelectionResultForCandidate=function(e){var t=O.J.getInstance("getElementSelectionResult",{log:!1}),n=t.get();if(n||(n=new Map,t.set(n)),n.has(e))return n.get(e);r.checkTimeout();var i=r.extractMetadata(e),o=r.similarity.rank(i),a={score:o.score,candidate:e,scores:o.scores,esraMetadata:i};return n.set(e,a),t.set(n),a},this.targetElementESRAMetadata=t,this.targetElementStaticData=n||t.staticMetadata,this.similarity=new W.k(this.targetElementESRAMetadata),this.esraMetadataExtractor=new V(document)}return(0,s.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"getWeight",value:function(e){return e/this.weightsSum}},{key:"extractMetadata",value:function(e){return new u(this.esraMetadataExtractor.extract(e).toMetadata())}},{key:"getLastSelectionLogs",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;if(null===(e=this.candidates)||void 0===e||!e.length)return{};var n=new XMLSerializer,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return e.slice(0,t).map((function(e){return{score:e.score,metadata:e.metadata,element:n.serializeToString(e.candidate).substring(0,200)}}))},i=this.rankedCandidates[Math.min(this.rankedCandidates.length-1,t)].score,o=function(e){return r(e,t).filter((function(e){return e.score>=i}))};return{candidatesQuery:this.candidateQueries.filter((function(e){return!!e.length})).join(","),totalUniqueCandidates:this.uniqueCandidates.length,topRankingCandidates:r(this.rankedCandidates,t),topRemovedCandidates:{hidden:o(this.removedCandidates.hidden),staticData:o(this.removedCandidates.static)}}}},{key:"selectByPositioning",value:function(){var e=this.targetElementESRAMetadata.positioning;if(window.innerWidth===e.viewport.size.width&&window.innerHeight===e.viewport.size.height){var t=document.elementFromPoint(e.viewport.element.left*window.innerWidth,e.viewport.element.top*window.innerHeight),n=this.extractMetadata(t),r=this.similarity.rank(n).score;return r>=this.POSITIONING_SATISFACTORY_SCORE?{candidate:t,score:r,esraMetadata:n}:void 0}}},{key:"collectCandidates",value:function(){this.setQualifiedAttributesQueries(),this.setQualifiedClassesQueries(),this.setInnerFeaturesQueries(),this.candidates=[];var e=this.candidateQueries.filter((function(e){return!!e.length})).join(",");this.queryCandidates=[],e.length&&(this.queryCandidates=(0,v.RA)(e)),this.interactableCandidates=[],this.elementsFiltering!==d.Qy.Query&&(this.interactableCandidates=(0,v.w1)())}},{key:"select",value:function(){var t,n,r=this;console.log("selecting elements, filtering: ",d.Qy[this.elementsFiltering]);for(var i,o=function(e){switch(e){case d.Qy.Query:return r.queryCandidates;case d.Qy.Intersection:return r.intersectElements(r.queryCandidates,r.interactableCandidates);case d.Qy.Interactables:return r.interactableCandidates;case d.Qy.All:return r.queryCandidates.concat(r.interactableCandidates)}};this.candidates=o(this.elementsFiltering),!this.candidates.length&&this.elementsFiltering!==d.Qy.All;)console.log("no candidates found, expanding selection to ".concat(d.Qy[this.elementsFiltering+1])),this.elementsFiltering++;(console.log("# of query/interactable/total candidates:",this.queryCandidates.length,this.interactableCandidates.length,this.candidates.length),(t=this.candidates).push.apply(t,(0,x.Z)(this.getInnerTextCandidates())),this.candidates.length)||(i=this.candidates).push.apply(i,(0,x.Z)(this.getTagCandidates()));this.uniqueCandidates=this.candidates.filter((function(e,t,n){return n.indexOf(e)===t}));var a=e.limitChildren;null!==(n=a)&&void 0!==n&&n.length&&(a=a.map((function(e){return(0,l.Z)((0,l.Z)({},e),{},{parent:document.querySelector(e.selector)})})),this.uniqueCandidates=this.uniqueCandidates.filter((function(e){var t,n=(0,U.Z)(a);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.parent&&r.isDescendant(i.parent,e)&&i.limit--<=0)return!1}}catch(o){n.e(o)}finally{n.f()}return!0}))),this.checkTimeout(),this.rankedCandidates=this.uniqueCandidates.filter((function(e){return e instanceof(0,v.GU)(e).HTMLElement||e instanceof(0,v.GU)(e).SVGElement})).map(this.getSelectionResultForCandidate).sort((function(e,t){return t.score-e.score})),this.removedCandidates={hidden:[],static:[]},this.filteredAndSortedRankedCandidates=this.rankedCandidates.filter((function(e){var t=r.isHidden(e.candidate),n=t.isHidden,i=t.clickOffset;return!0===n?(r.removedCandidates.hidden.push(e),!1):(i&&(e.clickOffset=i),!(w(r.targetElementStaticData)&&!function(e,t){var n=b(e),r=b(t),i=function(e){return!e||0===Object.keys(e).length};if(i(n)&&i(r))return!0;if(i(n)||i(r))return!1;var o=Object.keys(n).sort(),a=Object.keys(r).sort();if(o.length!==a.length)return!1;if(!o.every((function(e,t){return e===a[t]})))return!1;for(var s in n)if(n[s]!==r[s])return!1;return!0}(r.formatStaticCandidates(e.esraMetadata.staticCandidates),r.targetElementStaticData))||(e.metadata=JSON.stringify(e.esraMetadata.staticCandidates),r.removedCandidates.static.push(e),!1))})),this.checkTimeout(),this.removedCandidates.hidden.slice().reverse().forEach((function(e,t,n){"INPUT"===e.candidate.tagName&&r.filteredAndSortedRankedCandidates.find((function(t){return t.score>.1&&t.candidate.contains(e.candidate)}))&&(r.removedCandidates.hidden.splice(n.length-1-t,1),r.filteredAndSortedRankedCandidates.push(e))})),this.filteredAndSortedRankedCandidates=this.filteredAndSortedRankedCandidates.sort((function(e,t){return t.score-e.score}));var s=this.filteredAndSortedRankedCandidates.length*(1-this.config.results.scorePercentile);this.finalCandidates=[];for(var u=null,c=0;c<this.filteredAndSortedRankedCandidates.length;++c){var f=this.filteredAndSortedRankedCandidates[c];if(c>=s&&(!u||u.score-f.score>this.config.results.epsilon))break;u=f,this.finalCandidates.push(f)}return this.finalCandidates}},{key:"intersectElements",value:function(e,t){var n=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).useElementSize,n=void 0!==t&&t,r=new Set;return e.forEach((function(e){for(var t=2,i=e;i&&t-- >0&&(r.add(i),!(n&&Math.abs(i.parentElement.clientWidth-i.clientWidth)>.3*i.clientWidth&&Math.abs(i.parentElement.clientHeight-i.clientHeight)>.3*i.clientHeight));)i=i.parentElement})),r},r=n(e),i=n(t),o=new Set;return r.forEach((function(e){i.has(e)&&o.add(e)})),Array.from(o)}},{key:"checkTimeout",value:function(){if(e.timeout&&Date.now()-this.processStartTime>e.timeout)throw new $}},{key:"selectOne",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.elementsFiltering,n=void 0===t?d.Qy.Intersection:t,r=e.minSelectionScore,i=void 0===r?.3:r;try{if(this.elementsFiltering=n,this.processStartTime=Date.now(),"html"===this.targetElementESRAMetadata.tag){var o=document.querySelector("html");return{candidate:o,score:1,esraMetadata:this.extractMetadata(o)}}var a=this.selectByPositioning();if(a)return console.log("Found element by positioning"),a;for(this.collectCandidates();;){var s=this.select();if(!s.length)break;var u=s[0].score;if(!(u<i&&this.elementsFiltering!==d.Qy.All))return s[0];this.elementsFiltering++,console.log("Best matching element is below threshold (".concat(u,"/").concat(i,"), expanding selection to ").concat(d.Qy[this.elementsFiltering]))}}catch(xt){xt instanceof $?console.error("ESRA selection timeout"):console.error("ESRA selection error",xt)}return{candidate:void 0,score:0,esraMetadata:void 0}}},{key:"getFinalCandidates",value:function(){return this.finalCandidates}},{key:"setQualifiedAttributesQueries",value:function(){var e=this;this.candidateQueries.push(this.similarity.getQualifiedAttributes().map((function(t){return"[".concat(t,'="').concat(e.targetElementESRAMetadata.attributes[t].value,'"]')})).join(","))}},{key:"setQualifiedClassesQueries",value:function(){this.candidateQueries.push(this.similarity.getQualifiedClasses().map((function(e){return".".concat(e)})).join(","))}},{key:"setInnerFeaturesQueries",value:function(){var e=this,t=this.targetElementESRAMetadata.innerFeatures.filter((function(e){return!e.isRoot}));t.length>10&&(t=Object.values(t.reduce((function(e,t){var n="".concat(t.type,"_").concat(t.tag);return e[n]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},n,t))}),{})));var n,r=Math.min(Math.ceil(t.length*this.config.innerFeatures.mandatoryPercentage),this.config.innerFeatures.mandatoryMax),i=(n=t,n.reduce((function(e,t){var n=e.map((function(e){return[].concat((0,x.Z)(e),[t])})).filter((function(e){return e.length<=r}));return e.concat(n)}),[[]])).filter((function(e){return e.length===r}));i.forEach((function(t){var n=[];t.forEach((function(t){return n.push(e.getFeatureSelector(t))})),e.cartesian(n).forEach((function(t){return e.candidateQueries.push("*"+t.map((function(e){return":has(".concat(e,")")})).join(""))}))}))}},{key:"cartesian",value:function(e){if(!e.length)return[];var t=[],n=e.length-1;return function r(i,o){for(var a=0,s=e[o].length;a<s;a++){var u=i.slice(0);u.push(e[o][a]),o===n?t.push(u):r(u,o+1)}}([],0),t}},{key:"getFeatureSelector",value:function(e){var t=[e.tag];switch(e.type){case d.EI.Media:e.src&&t.push("".concat(e.tag,'[src="').concat(e.src,'"]'));break;case d.EI.Anchor:t.push("".concat(e.tag,'[href="').concat(e.href,'"]'));break;case d.EI.Button:break;case d.EI.Input:t.push("".concat(e.tag,'[type="').concat(e.inputType,'"]')),e.placeholder&&t.push("".concat(e.tag,'[placeholder="').concat(e.placeholder,'"]'))}return t}},{key:"getInnerTextCandidates",value:function(){var e=this.similarity.getQualifiedInnerText();if(!e)return[];var t=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).tag,n=void 0===t?"*":t;return(0,v.RA)(n).filter((function(t){var n;return(null===(n=t.innerText)||void 0===n?void 0:n.trim())===e.trim()}))}(e.content);return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}},{key:"getTagCandidates",value:function(){return(0,v.RA)(this.targetElementESRAMetadata.tag)}},{key:"isDescendant",value:function(e,t){return e.contains(t)}},{key:"formatStaticCandidates",value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}},{key:"isHidden",value:function(e){return(0,v.GF)(e,{useCache:!0})}}]),e}();q.limitChildren=void 0,q.timeout=void 0;var G,z,$=function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,"ESRA selection timeout")}return(0,s.Z)(n)}((0,H.Z)(Error)),Y=n(1752),Q=n(1120),X=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"injectSelectorsAndLocators",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var i,o,a,s,u,c=this,d=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=(i=d.length>1&&void 0!==d[1]?d[1]:{}).testIdSelector,a=i.searchParentFrames,s=void 0===a||a,u=n.map((function(e){return{container:e,removedAttributes:c.stripNodeAttributes(e.element)}})),e.next=4,Promise.all(u.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,a,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.getSelectorAndLocator(n.container.element,{testIdSelector:o,searchParentFrames:s,stripAttributes:!0});case 2:return r=e.sent,i=r.selector,a=r.locator,u=r.parentFramesSelectors,e.abrupt("return",(0,l.Z)((0,l.Z)({},n),{},{selector:i,locator:a,parentFramesSelectors:u}));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 4:return u=e.sent,e.next=7,Promise.all(u.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.removedAttributes.id||n.removedAttributes.originalClasses){e.next=2;break}return e.abrupt("return",n);case 2:if(c.restoreNodeAttributes(n.container.element,n.removedAttributes),void 0===window.playwright.$(n.selector)){e.next=5;break}return e.abrupt("return",n);case 5:return e.next=7,c.getSelectorAndLocator(n.container.element,{testIdSelector:o,searchParentFrames:s,stripAttributes:!1});case 7:return r=e.sent,console.log("Selector ".concat(n.selector," is not valid, generated new one: ").concat(r.selector)),Object.assign(n,r),e.abrupt("return",n);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 7:return u=e.sent,e.abrupt("return",u.map((function(e){var t=e.container,n=e.selector,r=e.locator,i=e.parentFramesSelectors;return(0,l.Z)((0,l.Z)({},t),{},{selector:n,locator:r,parentFramesSelectors:i})})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"stripNodeAttributes",value:function(e){var t,n,r=e;r.id&&(t=r.id,r.removeAttribute("id"));try{if((n=r.getAttribute("class"))&&"string"===typeof n){var i=n.split(" ").filter((function(e){return!e.startsWith("css-")&&!e.startsWith("jss-")})).join(" ");r.setAttribute("class",i)}else n=void 0}catch(xt){return console.warn("[playwright selector generator] error with class filtering",xt),{}}return{id:t,originalClasses:n}}},{key:"restoreNodeAttributes",value:function(e,t){var n=e,r=t.id,i=t.originalClasses;r&&n.setAttribute("id",r),i&&n.setAttribute("class",i)}},{key:"getSelectorAndLocator",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,k,E,S=this,x=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=x.length>1&&void 0!==x[1]?x[1]:{}).testIdSelector,o=r.searchParentFrames,a=void 0===o||o,s=r.stripAttributes,u=void 0===s||s,c=r.ignoredIframesSelectors,l=void 0===c?[]:c,n){e.next=3;break}return e.abrupt("return",null);case 3:if(d=this.getIframes({ignoredIframesSelectors:l}),!a){e.next=10;break}return e.next=7,this.getParentFramesSelectors(n,d);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=[];case 11:if(f=e.t0,h=n,!(p=this.getTestAttributeSelector(h,i))){e.next=16;break}return e.abrupt("return",{selector:p,locator:'locator("'.concat(p,'")'),parentFramesSelectors:f});case 16:return u&&(g=this.stripNodeAttributes(n),v=g.id,m=g.originalClasses),y="",b="",e.prev=18,e.next=21,window.playwright.generateSelectorAndLocator(n);case 21:w=e.sent,y=w.selector,b=w.locator,e.next=42;break;case 26:if(e.prev=26,e.t1=e.catch(18),(k=n.ownerDocument.defaultView)===window){e.next=42;break}return k.playwright||(k.playwright=window.playwright),e.prev=31,e.next=34,k.playwright.generateSelectorAndLocator(n);case 34:E=e.sent,y=E.selector,b=E.locator,e.next=42;break;case 39:e.prev=39,e.t2=e.catch(31),console.log("get selector and locator error",n.nodeType,n,"\n",e.t1,"\n",e.t2);case 42:return e.prev=42,u&&this.restoreNodeAttributes(n,{id:v,originalClasses:m}),e.finish(42);case 45:return b&&f&&f.length>0&&(b=f.map((function(e){return"frameLocator('".concat(S.escapeSingleQuotes(S.escapeBackslash(e)),"')")})).join(".")+".".concat(b)),e.abrupt("return",{selector:y,locator:b,parentFramesSelectors:f});case 47:case"end":return e.stop()}}),e,this,[[18,26,42,45],[31,39]])})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a=window.top,!(r&&r.length>0)){e.next=22;break}s=(0,U.Z)(r),e.prev=4,s.s();case 6:if((u=s.n()).done){e.next=14;break}return c=u.value,e.next=10,a.playwright.$(c);case 10:l=e.sent,a=l.contentWindow;case 12:e.next=6;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),s.e(e.t0);case 19:return e.prev=19,s.f(),e.finish(19);case 22:return e.next=24,a.playwright.$(n);case 24:o=e.sent,e.next=30;break;case 27:e.prev=27,e.t1=e.catch(0),console.log("selector error",n,e.t1);case 30:return e.abrupt("return",null!==(i=o)&&void 0!==i?i:this.selectOnIframe(n));case 31:case"end":return e.stop()}}),e,this,[[0,27],[4,16,19,22]])})));return function(t,n){return e.apply(this,arguments)}}())},{key:"getParentFramesSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.length){e.next=2;break}return e.abrupt("return",[]);case 2:if((i=n.ownerDocument)!==document){e.next=5;break}return e.abrupt("return",[]);case 5:if(o=r.find((function(e){return e.contentDocument===i}))){e.next=8;break}return e.abrupt("return",[]);case 8:return e.next=10,this.getSelectorAndLocator(o,{searchParentFrames:!1});case 10:return a=e.sent,e.t0=[],e.t1=x.Z,e.next=15,this.getParentFramesSelectors(o,r);case 15:return e.t2=e.sent,e.t3=(0,e.t1)(e.t2),e.t4=[a.selector],e.abrupt("return",e.t0.concat.call(e.t0,e.t3,e.t4));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getIframes",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignoredIframesSelectors,t=void 0===e?[]:e,n=function(e){return e.filter((function(e){return!t.some((function(t){return e.matches(t)}))}))},r=O.J.getInstance("playwrightElementSelectorGeneratorIframes",{log:!1});if(r.hasCache())return n(r.get());var i=(0,v.RA)("iframe");return r.set(i),n(i)}},{key:"selectOnIframe",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=document.querySelector("iframe")){e.next=3;break}return e.abrupt("return",void 0);case 3:return(i=r.contentWindow).playwright||(i.playwright=window.playwright),e.prev=5,e.next=8,i.playwright.$(n);case 8:return e.abrupt("return",e.sent);case 11:e.prev=11,e.t0=e.catch(5),console.log("selector error",n);case 14:case"end":return e.stop()}}),e,null,[[5,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getTestAttributeSelector",value:function(e,t){for(var n=0,r=[t].concat(["data-cy","data-testid","data-test-id","data-test"]);n<r.length;n++){var i=r[n];if(i&&e.getAttribute(i)){var o="[".concat(i,"='").concat(e.getAttribute(i),"']");if(1===(0,v.RA)(o).length)return o;if((0,v.RA)(o).length>1){var a=Array.from((0,v.RA)(o)).indexOf(e);return"".concat(o," >> nth=").concat(a)}}}}},{key:"escapeSingleQuotes",value:function(e){return(0,v.ko)(e,"'","\\'")}},{key:"escapeBackslash",value:function(e){return e.replace(/\\/g,"\\\\")}}]),e}(),K=[{selector:'path[d="M17.5 13V15.6667C17.5 16.0203 17.3361 16.3594 17.0444 16.6095C16.7527 16.8595 16.357 17 15.9444 17H5.05556C4.643 17 4.24733 16.8595 3.95561 16.6095C3.66389 16.3594 3.5 16.0203 3.5 15.6667V13"] + path[d="M14.6673 6.92057L10.5007 2.75391L6.33398 6.92057"] + path[d="M10.5 2.75391V12.7539"]',description:"export button"},{selector:'path[d="M16.0893 13.1868C16.6838 12.7754 17.1321 12.1858 17.3697 11.503C17.6072 10.8202 17.6216 10.0796 17.4107 9.38816C17.1999 8.69667 16.7748 8.09007 16.1968 7.65594C15.6187 7.2218 14.9177 6.9826 14.1948 6.97285H12.8308C12.6017 6.20011 12.1996 5.48973 11.6549 4.89565C11.1102 4.30157 10.4374 3.83943 9.68735 3.54431C8.93734 3.24918 8.12995 3.12885 7.32648 3.19244C6.52301 3.25603 5.7446 3.50187 5.05036 3.9113C4.35612 4.32072 3.7643 4.88297 3.31985 5.55533C2.8754 6.22769 2.59001 6.99248 2.48535 7.79164C2.38068 8.59079 2.4595 9.40329 2.71582 10.1674C2.97214 10.9316 3.39921 11.6272 3.96461 12.2016"] + path[d="M10.0273 10.0039V16.8241"] + path[d="M13.0585 13.0351L10.0273 10.0039L6.99609 13.0351"]',description:"import button"},{selector:'path[d="M20.4696 21.5303C20.7625 21.8232 21.2373 21.8232 21.5302 21.5303C21.8231 21.2374 21.8231 20.7626 21.5302 20.4697L20.4696 21.5303ZM17.1802 16.1197C16.8873 15.8268 16.4125 15.8268 16.1196 16.1197C15.8267 16.4126 15.8267 16.8874 16.1196 17.1803L17.1802 16.1197ZM18.25 11C18.25 15.0041 15.0041 18.25 11 18.25V19.75C15.8325 19.75 19.75 15.8325 19.75 11H18.25ZM11 18.25C6.99594 18.25 3.75 15.0041 3.75 11H2.25C2.25 15.8325 6.16751 19.75 11 19.75V18.25ZM3.75 11C3.75 6.99594 6.99594 3.75 11 3.75V2.25C6.16751 2.25 2.25 6.16751 2.25 11H3.75ZM11 3.75C15.0041 3.75 18.25 6.99594 18.25 11H19.75C19.75 6.16751 15.8325 2.25 11 2.25V3.75ZM21.5302 20.4697L17.1802 16.1197L16.1196 17.1803L20.4696 21.5303L21.5302 20.4697Z"]',description:"search"},{selector:'path[d="M3.75 10H16.875"] + path[d="M8.125 5L3.125 10L8.125 15"]',description:"back"},{selector:'path[d="M3.33301 8H12.6663"] + path[d="M8 3.33331L12.6667 7.99998L8 12.6666"]',description:"forward"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"new or Add button"},{selector:'path[d="M10 10.75C10.4142 10.75 10.75 10.4142 10.75 10C10.75 9.58579 10.4142 9.25 10 9.25C9.58579 9.25 9.25 9.58579 9.25 10C9.25 10.4142 9.58579 10.75 10 10.75Z"] + path[d="M15.833 10.75C16.2472 10.75 16.583 10.4142 16.583 10C16.583 9.58579 16.2472 9.25 15.833 9.25C15.4188 9.25 15.083 9.58579 15.083 10C15.083 10.4142 15.4188 10.75 15.833 10.75Z"] + path[d="M4.16699 10.75C4.58121 10.75 4.91699 10.4142 4.91699 10C4.91699 9.58579 4.58121 9.25 4.16699 9.25C3.75278 9.25 3.41699 9.58579 3.41699 10C3.41699 10.4142 3.75278 10.75 4.16699 10.75Z"]',description:"open menu"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"add filter"},{selector:'path[d="M15 5L5 15"] + path[d="M5 5L15 15"]',description:"close or remove"},{selector:'path[d="M4 6L8 10L12 6"]',description:"open or close dropdown"},{selector:'path[d="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"] + path[d="M12.5 7.5L7.5 12.5"] + path[d="M7.5 7.5L12.5 12.5"]',description:"clear input"},{selector:'path[d="M3.33301 5.49054H4.81449H16.6663"] + path[d="M7.14286 5.49999V3.99999C7.14286 3.60216 7.29337 3.22063 7.56128 2.93932C7.82919 2.65802 8.19255 2.49998 8.57143 2.49998H11.4286C11.8075 2.49998 12.1708 2.65802 12.4387 2.93932C12.7066 3.22063 12.8571 3.60216 12.8571 3.99999V5.49999M15 5.49999V16C15 16.3978 14.8495 16.7793 14.5816 17.0607C14.3137 17.342 13.9503 17.5 13.5714 17.5H6.42857C6.04969 17.5 5.68633 17.342 5.41842 17.0607C5.15051 16.7793 5 16.3978 5 16V5.49999H15Z"] + path[d="M8.33203 9.23726V13.4039"] + path[d="M11.666 9.23726V13.4039"]',description:"delete"},{selector:'path[d="M13.3334 4L6.00008 11.3333L2.66675 8"]',description:"checked"},{selector:'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"]',description:"downward-pointing arrow"},{selector:'path[d="M18.0893 3.08926C18.4147 2.76382 18.4147 2.23618 18.0893 1.91074C17.7638 1.58531 17.2362 1.58531 16.9107 1.91074L18.0893 3.08926ZM9.41074 9.41074L8.82149 10L10 11.1785L10.5893 10.5893L9.41074 9.41074ZM16.9107 1.91074L9.41074 9.41074L10.5893 10.5893L18.0893 3.08926L16.9107 1.91074Z"] + path[d="M17.5 2.5L12.25 17.5L9.25 10.75L2.5 7.75L17.5 2.5Z"]',description:"send"}],J=function(){function e(){(0,a.Z)(this,e),this.observer=void 0,this.monitoringPeriodTimeout=void 0,this.flashingTextElements=[]}return(0,s.Z)(e,[{key:"start",value:function(){var e=this;this.stop(),this.flashingTextElements=[],this.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.length>0&&t.addedNodes.forEach((function(t){t instanceof HTMLElement&&e.includeElement(t)&&setTimeout((function(){e.flashingTextElements.push(e.processTextElements(t))}),1e3)}))}))})),this.observer.observe(document.body,{childList:!0,subtree:!0}),this.monitoringPeriodTimeout=setTimeout((function(){e.stop()}),3e5)}},{key:"stop",value:function(){this.monitoringPeriodTimeout&&(clearTimeout(this.monitoringPeriodTimeout),this.monitoringPeriodTimeout=null),this.observer&&(this.observer.disconnect(),this.observer=null)}},{key:"get",value:function(){var e=this.flashingTextElements.map((function(e){return e.filter((function(e){return!e.isConnected||(0,v.GF)(e.parentElement).isHidden}))})).filter((function(e){return e.length})).map((function(e){return"<span>".concat(e.map((function(e){return e.textContent})).join("</span><span>"),"</span>")})),t=new Set(e);return Array.from(t)}},{key:"stopAndGet",value:function(){return this.stop(),this.get()}},{key:"includeElement",value:function(e){return!(e.getElementsByTagName("*").length>50)&&!(e.outerHTML.length>5e3)}},{key:"processTextElements",value:function(e){for(var t,n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),r=[];t=n.nextNode();)(0,v.GF)(t.parentNode).isHidden||r.push(t);return r}}]),e}(),ee=function(){function e(t){(0,a.Z)(this,e),this.counter=void 0,this.counter=null!==t&&void 0!==t?t:"0"}return(0,s.Z)(e,[{key:"increment",value:function(){for(var e=this.counter.length-1;e>=0;){var t=this.counter[e];if("9"===t)return void(this.counter=this.replaceAt(this.counter,e,"a"));if("z"!==t)return void(this.counter=this.replaceAt(this.counter,e,String.fromCharCode(t.charCodeAt(0)+1)));if(this.counter=this.replaceAt(this.counter,e,"0"),0===e)return void(this.counter="1"+this.counter);e--}}},{key:"get",value:function(){return this.counter}},{key:"incrementAndGet",value:function(){return this.increment(),this.get()}},{key:"getAndIncrement",value:function(){var e=this.get();return this.increment(),e}},{key:"replaceAt",value:function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)}}]),e}(),te="checksum-ignore",ne="checksum-get-more-items",re=.7,ie=0,oe=function(e,t){var n=t.forceIncludeAttribute,r=t.forceIncludeFileInput,i=t.forceIncludeElements,o=t.limit;e.excludedElements=new Set;var a=e.element,s=null!==o&&void 0!==o?o:Math.min(Math.ceil(.5*a.children.length),a.children.length-20),u=function(t){var n=0,r=ae(t);r.length>=e.attributes.length&&n++;var i=r.filter((function(t){return e.attributes.includes(t)})).length;i===e.attributes.length?n+=3:i>0&&n++;var o=se(t).filter((function(t){return e.classes.includes(t)})).length;return o===e.classes.length?n+=2:o>0&&n++,n},c=Array.from(a.children).filter((function(t){return t.tagName===e.tagName&&!function(e){return!(!n||!(e.hasAttribute(n)||Array.from(e.querySelectorAll("[".concat(n,"]"))).length>0))||!(!r||"input"!==e.tagName.toLowerCase()||"file"!==e.type)||i.includes(e)}(t)})).map((function(e){return{element:e,score:u(e)}})).sort((function(e,t){return t.score-e.score})),l=c.reduce((function(e,t){var n=t.element;return(0,v.PZ)((0,v.m7)(n,"Element")?n:null===n||void 0===n?void 0:n.parentElement)?e.inViewportElements.push(n):e.outOfViewportElements.push(n),e}),{inViewportElements:[],outOfViewportElements:[]}),d=l.inViewportElements,f=function(t){var n,r=(0,U.Z)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(e.excludedElements.add(i),e.excludedElements.size===s)return!0}}catch(o){r.e(o)}finally{r.f()}};return f(l.outOfViewportElements)||f(d),function(e){var t=e.excludedElements,n=(e.id,e.element);t.forEach((function(e){e.setAttribute(te,"")})),n._getmoreitemsid||(n._getmoreitemsid="gm"+ie++);e.id=n._getmoreitemsid,n.setAttribute(ne,e.id)}(e),Array.from(e.excludedElements)};function ae(e){return Array.from(e.attributes).filter((function(e){return!e.name.startsWith("checksum")})).map((function(e){return e.name.replace(/[0-9]/g,"")}))}function se(e){var t,n;return null!==(t=null===(n=e.className)||void 0===n?void 0:n.split(" ").filter((function(e){return e})))&&void 0!==t?t:[]}function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).nodeRepetitionsThreshold,n=void 0===t?20:t;try{return console.time("bettertemplatize"),G=new Set,ce(e,n),console.timeEnd("bettertemplatize"),console.log("[bettertemplatize] templates found:",Array.from(G)),Array.from(G)}catch(r){return console.error("[bettertemplatize] failed during template processing:",r.message),[]}}function ce(e,t){Array.from(e.children).forEach((function(e){if(!(e instanceof SVGElement)){var n=e.children.length;if(n>=t)for(var r=0,i=Array.from(e.children),o=Math.ceil(n*re),a=0;a<n;a++)for(var s=a+1;s<n;s++)try{if(pe(i[a],i[s])&&++r>=o)return void G.add((0,l.Z)({element:e},z))}catch(u){return}ce(e,t)}}))}var le=.8,de=.5,fe=.8,he=5;function pe(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=function(t){return t&&(z={attributes:n,classes:r,tagName:e.nodeName}),t};if(e.nodeType!==t.nodeType)return o(!1);if(e instanceof SVGElement||t instanceof SVGElement)return o(!1);if(e.nodeType===Node.TEXT_NODE)return o(!0);if(e.nodeType!==Node.ELEMENT_NODE)return o(!1);var a=e,s=t;if(a.tagName.toLowerCase()!==s.tagName.toLowerCase())return o(!1);var u=ae(a),c=ae(s);if((n=u.filter((function(e){return c.includes(e)}))).length/Math.max(u.length,c.length)<le)return o(!1);var l=se(a),d=se(s);if((r=l.filter((function(e){return d.includes(e)}))).length/Math.max(l.length,d.length)<de)return o(!1);if(i>=he)return o(!0);if(a.shadowRoot&&!s.shadowRoot||!a.shadowRoot&&s.shadowRoot)return o(!1);var f=Array.from(a.shadowRoot?a.shadowRoot.children:a.children),h=Array.from(s.shadowRoot?s.shadowRoot.children:s.children);if(0===f.length&&0===h.length)return o(!0);for(var p=0,v=0;v<Math.min(f.length,h.length);v++)pe(f[v],h[v],i+1)&&p++;return p/Math.max(f.length,h.length)<fe?o(!1):o(!0)}var ve,me=function(e){return e.ARIA_LABEL="aria-label",e.TEXT="text",e}({}),ge=function(e){return e.SVG="svg",e}(ge||{}),ye={markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0},be=function(){function e(){(0,a.Z)(this,e),this.interactableElements=void 0,this.nonInteractableElementsFromSimplifiedDom=void 0,this.interactableElementsFromSimplifiedDom=void 0,this.elementsInSimplifiedDomByChecksumId=void 0,this.selectors=void 0,this.flashingElementsDetector=new J,this.forceIncludeElements=[],this.preMapReducedHTMLSelectors=!0,this.templateNodes=void 0,this.nodeRepetitionsThreshold=void 0,this.reducePercentage=50,this.lastReduceHTMLOptions=void 0,this.defaultReduceHTMLOptions={checkElementInstanceType:!0,extraAllowedAttributes:[],maintainSelectorsMapping:!0,initialChecksumId:"0",forceIncludeFileInput:!1,forceIncludeAttribute:void 0,invalidateCache:!1,svgIntegration:me.ARIA_LABEL,includeFlashingElements:!0,onForceIncludeElement:function(){},limitNodeRepetitions:50,stopFlashingElementsDetection:!1,assignChecksumIdsToAllElements:!0},this.checksumIdCounter=new ee}return(0,s.Z)(e,[{key:"preprocessDocument",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;(0,v.Ey)("[preprocessDocument] querySelectorAllExtended");var t=(0,v.RA)("*",e,{includeHTML:!0});(0,v.MX)("[preprocessDocument] querySelectorAllExtended"),(0,v.Ey)("[preprocessDocument] isElementHidden");var n,r=(0,U.Z)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!this.shouldIgnoreElement(i)){var o=(0,v.GF)(i,ye);i.setAttribute("checksum-data-visible",o.isHidden||o.isTransparent?"false":"true"),!o.isHidden&&o.isTransparent&&i.setAttribute("checksum-data-transparently-visible","true"),o.isBehindTransparentElement&&i.setAttribute("checksum-data-visible-under-transparent-element","true"),o.clickOffset&&i.setAttribute("checksum-data-click-offset","".concat(o.clickOffset.x,";").concat(o.clickOffset.y))}}}catch(a){r.e(a)}finally{r.f()}(0,v.MX)("[preprocessDocument] isElementHidden")}},{key:"markInteractableElements",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.forceIncludeAttribute,o=r.forceIncludeFileInput;(0,v.Ey)("[markInteractableElements]"),this.interactableElements=[];var a=(0,v.w1)(n,e,{allowDisabled:!0,excludeCrossOriginIframes:!1}),s=function(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;if(!t.shouldIgnoreElement(e)){var o,a,s=null===(n=e.getAttribute("checksum-data-click-offset"))||void 0===n?void 0:n.split(";"),u=s&&{x:parseInt(s[0]),y:parseInt(s[1])},c=(a=i,(o=e)._checksumid||(o._checksumid=null!==a&&void 0!==a?a:t.checksumIdCounter.getAndIncrement()),o.setAttribute("checksumid",o._checksumid),o.setAttribute("checksuminteractable","true"),o._checksumid);t.interactableElements.push({checksumId:c,element:e,forced:r,clickOffset:u})}};a.forEach((function(e){return s(e)}));var u=function(e){(0,v.RA)(e,n,{includeHTML:!0}).forEach((function(e){return s(e,!0)}))};i&&u("[".concat(i,"]")),o&&u("input[type='file']"),this.forceIncludeElements.filter((function(e){var t=e.element;return null===t||void 0===t?void 0:t.isConnected})).forEach((function(e){var t=e.element,n=e.checksumid;return s(t,!0,n)})),console.log("Marked ".concat(this.interactableElements.length," interactable elements")),(0,v.MX)("[markInteractableElements]")}},{key:"truthyFilter",value:function(e){return Boolean(e)}},{key:"shouldIgnoreElement",value:function(e){return e.hasAttribute(te)}},{key:"generateSimplifiedDom",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.extraAllowedAttributes,s=void 0===a?[]:a,u=o.checkElementInstanceType,c=void 0===u||u,l=o.forceIncludeAttribute,d=void 0===l?void 0:l,f=o.forceIncludeFileInput,h=void 0!==f&&f,p=o.svgIntegration,m=void 0===p?me.ARIA_LABEL:p,g=o.onForceIncludeElement,y=void 0===g?void 0:g,b=o.contentWindow,w=void 0===b?window:b,k=o.assignChecksumIdsToAllElements,E=void 0===k||k;if(!e)return null;var S,x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e._originalNode=t,E&&(0,v.m7)(e,"Element")&&(0,v.m7)(t,"Element")&&!t.hasAttribute("checksumid")){var n=e,r=t;r._checksumid||(r._checksumid=i.checksumIdCounter.getAndIncrement()),n.setAttribute("checksumid",r._checksumid),i.nonInteractableElementsFromSimplifiedDom.push({checksumId:r._checksumid,element:r})}return e},I=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return x(document.createTextNode(t),n)},C=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return x(document.createElement(t),n)};if(e.nodeType===Node.ELEMENT_NODE){var T=e;if("head"===T.tagName.toLowerCase())return null;if(this.shouldIgnoreElement(T))return null}if(e.nodeType===Node.TEXT_NODE)return e.parentElement&&("false"!==e.parentElement.getAttribute("checksum-data-visible")||e.parentElement.hasAttribute("checksumid"))?"body"===e.parentElement.tagName.toLowerCase()?null:null!==(S=e.textContent)&&void 0!==S&&S.trim()?I(e.textContent+" "):null:null;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(c&&!(0,v.m7)(e,"HTMLElement")&&!(0,v.m7)(e,"SVGElement"))return null;var M=e,N="iframe"===M.tagName.toLowerCase()&&M.contentDocument,A=(0,v.mn)(N?M.contentDocument.documentElement:M,{flattenShadowRootChildren:!0});null===(n=t.esraSelectionRules)||void 0===n||null===(r=n.limitChildren)||void 0===r||r.forEach((function(e){M.matches(e.selector)&&A.length>e.limit&&A.splice(e.limit)}));var _=A.map((function(e){return i.generateSimplifiedDom(e,t,{extraAllowedAttributes:s,checkElementInstanceType:c,forceIncludeAttribute:d,forceIncludeFileInput:h,svgIntegration:m,onForceIncludeElement:y,contentWindow:N?M.contentWindow:w,assignChecksumIdsToAllElements:E})})).filter(this.truthyFilter),D="false"!==M.getAttribute("checksum-data-visible"),R=M.hasAttribute("checksumid"),O=M.hasAttribute("role"),L=this.getElementCustomDescription(M,{enableSVGCustomDescription:!!m}),Z=L.customDescription,F=L.customDescriptionTarget,P=!!Z,V=M.hasAttribute("aria-label")||M.hasAttribute("name")||M.hasAttribute("alt"),B=M.hasAttribute(ne)||this.forceIncludeElements.map((function(e){return e.element})).includes(M)||!!d&&M.hasAttribute(d)||h&&"input"===M.tagName.toLowerCase()&&"file"===M.getAttribute("type"),j=R||D&&(O||V||P||M.matches(["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"].join(",")));if(!(j||B)){if(!_.length)return null;if(1===_.length&&!(0,v.m7)(_[0],"Text"))return _[0]}!j&&B&&(null===y||void 0===y||y(M));var H=function(){if(P&&F===ge.SVG)switch(m){case me.ARIA_LABEL:var e=C("svg");return e.setAttribute("aria-label",Z),{simplifiedNode:e,appendChildren:!1};case me.TEXT:if(M.hasAttribute("checksumid")){var t=C("div");return t.innerText=Z,{simplifiedNode:t,appendChildren:!1}}return{simplifiedNode:I(" [".concat(Z,"] ")),appendChildren:!1}}var n="body"===M.tagName.toLowerCase()&&M.ownerDocument!==document?"div":M.tagName;return{simplifiedNode:C(n)}}(),W=H.simplifiedNode,q=H.appendChildren,G=void 0===q||q;if(!(0,v.m7)(W,"Element"))return W;var z,$=W,Y=["aria-.+","data-name","name","type","placeholder","content","value","role","icon","title","checksumid","checksuminteractable","checksum-get-more-items","checked","disabled","selected","label","required","inputmode","min","max","step","minlength","maxlength","alt","hidden","draggable","ondrop","ondragover","contenteditable","href","(data-)?test(-)?id"].concat(s),Q=M.attributes,X=(0,U.Z)(Q);try{for(X.s();!(z=X.n()).done;){var K,J=z.value,ee=(0,U.Z)(Y);try{for(ee.s();!(K=ee.n()).done;){var te,re=K.value;if(new RegExp("^"+re+"$").test(J.name))$.setAttribute(J.name,null===(te=J.value)||void 0===te||te)}}catch(oe){ee.e(oe)}finally{ee.f()}}}catch(oe){X.e(oe)}finally{X.f()}if(M.isContentEditable?$.setAttribute("contenteditable","true"):["TEXTAREA","INPUT","SELECT"].includes(M.tagName)||"text"!==window.getComputedStyle(M).cursor||$.setAttribute("contenteditable","cursor-text"),(0,v.m7)(M,"HTMLInputElement")&&"checkbox"===M.getAttribute("type"))M.checked&&$.setAttribute("checked","true");else if((0,v.m7)(M,"HTMLInputElement")||(0,v.m7)(M,"HTMLSelectElement"))$.setAttribute("value",M.value);else if((0,v.m7)(M,"HTMLTextAreaElement")&&!M.childNodes.length&&M.value){var ie=I(M.value);$.appendChild(ie)}return G&&_.forEach((function(e){return $.appendChild(e)})),$}},{key:"getElementCustomDescription",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).enableSVGCustomDescription,n=void 0===t||t;return((0,v.m7)(e,"SVGElement")||"svg"===e.tagName.toLowerCase())&&n?{customDescriptionTarget:ge.SVG,customDescription:this.getSVGDescriptionForElement(e)}:{}}},{key:"getSVGDescriptionForElement",value:function(e){var t=this.findSvgElementDescriptionFromBank(e);if(t)return t;var n=e.querySelector("title");return n?n.textContent:void 0}},{key:"findSvgElementDescriptionFromBank",value:function(e){var t;return null===(t=this.getSvgBank().find((function(t){return e.matches("svg:has(".concat(t.selector,")"))})))||void 0===t?void 0:t.description}},{key:"getSvgBank",value:function(){return K}},{key:"restoreDom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;(0,v.RA)("*",e).forEach((function(e){e.removeAttribute("checksum-data-visible"),e.removeAttribute("checksum-data-transparently-visible"),e.removeAttribute("checksum-data-visible-under-transparent-element"),e.removeAttribute("checksumid"),e.removeAttribute("checksuminteractable"),e.removeAttribute("checksum-data-click-offset"),e.removeAttribute(te),e.removeAttribute(ne)}))}},{key:"removeAttribute",value:function(e){(0,v.RA)("*",document).forEach((function(t){t.removeAttribute(e)}))}},{key:"mapAndStoreSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,l,d,f,h;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},r=new X,e.t0=U.Z,e.next=5,r.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom);case 5:e.t1=e.sent,i=(0,e.t0)(e.t1),e.prev=7,i.s();case 9:if((o=i.n()).done){e.next=18;break}if(a=o.value,s=a.checksumId,u=a.element,c=a.clickOffset,l=a.selector,d=a.locator,f=a.parentFramesSelectors,l){e.next=14;break}return console.warn("Unable to get selector for element",u),e.abrupt("continue",16);case 14:h=u,n[s]={element:h,selector:l,locator:d,clickOffset:c,parentFramesSelectors:f,innerText:h.innerText};case 16:e.next=9;break;case 18:e.next=23;break;case 20:e.prev=20,e.t2=e.catch(7),i.e(e.t2);case 23:return e.prev=23,i.f(),e.finish(23);case 26:return e.abrupt("return",n);case 27:case"end":return e.stop()}}),e,this,[[7,20,23,26]])})));return function(){return e.apply(this,arguments)}}()},{key:"shouldFurtherReduce",value:function(e){return!e||e.outerHTML.length>16e3}},{key:"getRepeatingElementsToExclude",value:function(e,t,n){if(e.length<=t)return[];var r=t,i=e.reduce((function(e,t){var n=t._originalNode;return(0,v.PZ)((0,v.m7)(n,"Element")?n:null===n||void 0===n?void 0:n.parentElement)?e.inViewportElements.push(t):e.outOfViewportElements.push(t),e}),{inViewportElements:[],outOfViewportElements:[]}),o=i.inViewportElements,a=i.outOfViewportElements,s=[],u=function(e){var t,i,o=(0,U.Z)(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(i=a,n&&(i.hasAttribute(n)||Array.from(i.querySelectorAll("[".concat(n,"]"))).length>0)||s.push(a),s.length===r)return!0}}catch(u){o.e(u)}finally{o.f()}};return u(a)||u(o),s}},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,d,f,h,p,v,m,g,y,b,w,k=this,E=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=E.length>1&&void 0!==E[1]?E[1]:{},i=E.length>2&&void 0!==E[2]?E[2]:document,console.time("reduceHTML"),o=this.lastReduceHTMLOptions=(0,l.Z)((0,l.Z)({},this.defaultReduceHTMLOptions),r),a=o.maintainSelectorsMapping,s=o.initialChecksumId,u=o.forceIncludeAttribute,c=o.forceIncludeFileInput,d=o.invalidateCache,f=o.includeFlashingElements,h=o.limitNodeRepetitions,p=o.stopFlashingElementsDetection,!(v=O.J.getInstance("reduce",{target:i,monitorInput:!0,invalidate:d,log:!1})).hasCache()){e.next=7;break}return e.abrupt("return",v.get());case 7:m=f?this.flashingElementsDetector.get():void 0,p&&this.flashingElementsDetector.stop(),this.nodeRepetitionsThreshold=h,this.reducePercentage=50,this.templateNodes=void 0,g=function(e){return oe(e,{forceIncludeAttribute:u,forceIncludeFileInput:c,forceIncludeElements:k.forceIncludeElements.map((function(e){return e.element})),limit:Math.min(Math.ceil(e.element.children.length*(k.reducePercentage/100)),e.element.children.length-6)})},console.log("Running pre-templatize"),this.templatize(g),console.log("Preprocessing document..."),this.preprocessDocument(i),this.checksumIdCounter=new ee(null!==s&&void 0!==s?s:"0");case 18:if(console.log("Marking interactable elements..."),this.markInteractableElements(n,i,{forceIncludeAttribute:u,forceIncludeFileInput:c}),console.log("Generating simplified DOM..."),this.nonInteractableElementsFromSimplifiedDom=[],y=this.generateSimplifiedDom(i.documentElement,n,this.lastReduceHTMLOptions)){e.next=26;break}throw new Error("Unable to get simplified DOM");case 26:if(!this.shouldFurtherReduce(y)){e.next=34;break}if(console.log("Will further reduce (".concat(y.outerHTML.length,")...")),this.templatize(g)){e.next=31;break}return console.log("Exceeded maximum html reduction, stopping (html size: ".concat(y.outerHTML.length,")")),e.abrupt("break",37);case 31:this.removeAttribute("checksumid"),e.next=35;break;case 34:return e.abrupt("break",37);case 35:e.next=18;break;case 37:if(console.log("Simplified DOM generated, length:",y.outerHTML.length),b=new Set(Array.from(y.querySelectorAll("[checksumid]")).map((function(e){return e.getAttribute("checksumid")}))),this.interactableElementsFromSimplifiedDom=this.interactableElements.filter((function(e){return b.has(e.checksumId)})),console.log("Found ".concat(this.interactableElementsFromSimplifiedDom.length," interactable elements in simplified DOM vs ").concat(this.interactableElements.length," in original DOM")),console.log("Restoring DOM..."),this.restoreDom(i),this.preMapReducedHTMLSelectors=!!n.preMapReducedHTMLSelectors,!this.preMapReducedHTMLSelectors||!a){e.next=50;break}return console.log("Mapping selectors..."),e.next=48,this.mapAndStoreSelectors();case 48:this.selectors=e.sent,console.log("Done mapping selectors");case 50:return this.elementsInSimplifiedDomByChecksumId=[].concat((0,x.Z)(this.interactableElementsFromSimplifiedDom),(0,x.Z)(this.nonInteractableElementsFromSimplifiedDom)).reduce((function(e,t){return e[t.checksumId]=t,e}),{}),w={reducedDomHTMLElement:y,reducedHTML:y.outerHTML,currentChecksumId:this.checksumIdCounter.get(),flashingHTML:m},v.set(w),console.timeEnd("reduceHTML"),e.abrupt("return",w);case 55:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"templatize",value:function(e){if(this.templateNodes)if(this.reducePercentage<98)this.reducePercentage=Math.min(this.reducePercentage+20,98),console.log("Increasing reduce percentage to",this.reducePercentage);else{if(this.nodeRepetitionsThreshold<=20)return!1;this.reducePercentage=50;var t=this.templateNodes.length;do{this.nodeRepetitionsThreshold-=10,console.log("Reducing node repetitions threshold to",this.nodeRepetitionsThreshold),this.templateNodes=ue(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold})}while(this.templateNodes.length===t&&this.nodeRepetitionsThreshold>20)}else if(this.templateNodes=ue(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold}),0===this.templateNodes.length)return this.templatize(e);var n=Array.from(this.templateNodes).reduce((function(t,n){return t+e(n).length}),0);return console.log("[templatize] ".concat(n," elements marked to ignore for ").concat(this.templateNodes.length," templates")),!0}},{key:"getMoreElementsFromTemplate",value:function(e,t){var n=this;try{var r=this.templateNodes.find((function(t){return t.id===e}));if(!r)throw new Error("Template not found");var i=r.element,o=r.excludedElements;console.log("Preprocessing template node..."),this.preprocessDocument(i),console.log("Marking template interactable elements..."),this.markInteractableElements(t,i,this.lastReduceHTMLOptions);for(var a=[],s=function(){return a.map((function(e){return e.outerHTML})).join("")},u=o.values(),c=function(){var e=u.next().value;if(!e)return 1;var r=Array.from(e.querySelectorAll("[checksumid]")).concat(e._checksumid?[e]:[]);n.interactableElements.filter((function(e){return r.includes(e.element)})).forEach((function(e){n.elementsInSimplifiedDomByChecksumId[e.element._checksumid]=e})),a.push(n.generateSimplifiedDom(e,t,n.lastReduceHTMLOptions)),o.delete(e)};s().length<5280&&!c(););return this.restoreDom(i),{items:s(),hasMoreItems:o.size>0}}catch(xt){return void console.error("[getMoreElementsFromTemplate] error",xt)}}},{key:"getSelectorForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(h.length>1&&void 0!==h[1]?h[1]:{}).forceGenerate,o=void 0!==i&&i,a={selector:n,element:null,innerText:"",locator:"",parentFramesSelectors:[]},this.preMapReducedHTMLSelectors&&!o){e.next=14;break}if(s=new X,u=this.elementsInSimplifiedDomByChecksumId[n]){e.next=7;break}return e.abrupt("return",a);case 7:return e.next=9,s.getSelectorAndLocator(u.element);case 9:return c=e.sent,l=c.selector,d=c.locator,f=c.parentFramesSelectors,e.abrupt("return",{element:u.element,selector:l,locator:d,clickOffset:u.clickOffset,parentFramesSelectors:f,innerText:u.element.innerText});case 14:if(this.selectors[n]||o){e.next=16;break}return e.abrupt("return",this.getSelectorForChecksumId(n,{forceGenerate:!0}));case 16:return e.abrupt("return",null!==(r=this.selectors[n])&&void 0!==r?r:a);case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getElementForChecksumId",value:function(e){var t;return null===(t=this.elementsInSimplifiedDomByChecksumId[e])||void 0===t?void 0:t.element}},{key:"hasInnerTextByChecksumId",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.maxLength,i=void 0===r?void 0:r,o=n.minLength,a=void 0===o?void 0:o;if(!this.preMapReducedHTMLSelectors){var s,u=null===(s=this.elementsInSimplifiedDomByChecksumId[e])||void 0===s?void 0:s.element,c=null===u||void 0===u?void 0:u.innerText;return!!c&&(!(a&&c.length<a)&&!(i&&c.length>i))}return!(null===(t=this.selectors[e])||void 0===t||!t.innerText)}},{key:"getInteractableElements",value:function(){return this.interactableElements}},{key:"getInteractableElementsInReducedHTML",value:function(){return this.interactableElementsFromSimplifiedDom}},{key:"startFlashingElementsDetection",value:function(){return this.flashingElementsDetector.start()}},{key:"addForceIncludeElement",value:function(e){this.forceIncludeElements.push(e),e.element._checksumid=e.checksumid}}]),e}(),we=function(){function e(){(0,a.Z)(this,e),this.esraExtractors=[],this.appSpecificRules=void 0,this.playwrightSelector=new X,this.defaultExtractReducedHtmlAndSelector=!1,this.defaultInspectInteractableElements=!1,this.previousTargetNodeForReducedHTML=void 0,this.currentReducedHTMLChecksumIdAllocationCount="0",this.htmlReducer=new be}return(0,s.Z)(e,[{key:"getSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,y=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=y.length>1&&void 0!==y[1]?y[1]:{}).extractPlaywrightSelector,o=void 0===i||i,a=r.extractEsraMetadata,s=void 0===a||a,u=r.extractReducedHtmlAndSelector,c=void 0===u?this.defaultExtractReducedHtmlAndSelector:u,l=r.inspectInteractableElements,d=void 0===l?this.defaultInspectInteractableElements:l,n){e.next=3;break}return e.abrupt("return",null);case 3:if(console.log("[SessionDigesterSelector] generating for node",n),f={},s&&(console.log("extracting ESRA metadata..."),h=this.getESRAExtractor(n).extract(n),f.esraMetadata=h.toMetadata(),console.log("ESRA metadata extraction complete")),!o){e.next=18;break}return console.log("extracting playwright selector..."),e.next=10,this.playwrightSelector.getSelectorAndLocator(n);case 10:p=e.sent,v=p.selector,m=p.locator,g=p.parentFramesSelectors,f.playwrightSelector=v,f.playwrightLocator=m,f.playwrightParentFramesSelectors=g,console.log("Playwright selector extraction complete");case 18:if(!c){e.next=24;break}return console.log("extracting reduced HTML..."),e.next=22,this.getReducedHTMLAndTargetNodeSelector(n);case 22:f.reducedHTML=e.sent,console.log("Reduced HTML extraction complete");case 24:if(!d){e.next=30;break}return console.log("extracting element inspection..."),e.next=28,this.isElementInteractable(n);case 28:f.interactionFoundOnInspection=e.sent,console.log("Element inspection extraction complete");case 30:return console.log("[SessionDigesterSelector] complete",f),e.abrupt("return",f);case 32:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.playwrightSelector.selector(n));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"setOptions",value:function(e){var t=e.defaultExtractReducedHtmlAndSelector,n=e.defaultInspectInteractableElements;this.defaultExtractReducedHtmlAndSelector=t,this.defaultInspectInteractableElements=n}},{key:"getReducedHTMLAndTargetNodeSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="checksum-target-node",n.setAttribute(r,"true"),i=this.previousTargetNodeForReducedHTML&&this.previousTargetNodeForReducedHTML!==n,this.previousTargetNodeForReducedHTML=n,o=!1,a=function(e){e.hasAttribute(r)&&(o=!0)},e.next=8,this.htmlReducer.reduceHTML(this.appSpecificRules,{initialChecksumId:this.currentReducedHTMLChecksumIdAllocationCount,extraAllowedAttributes:[r],checkElementInstanceType:!1,maintainSelectorsMapping:!1,forceIncludeAttribute:r,invalidateCache:i,onForceIncludeElement:a},n.ownerDocument);case 8:return s=e.sent,u=s.reducedDomHTMLElement,c=s.reducedHTML,l=s.currentChecksumId,n.removeAttribute(r),this.currentReducedHTMLChecksumIdAllocationCount=l,d=u.matches("[".concat(r,"=true]"))?u:u.querySelector("[".concat(r,"=true]")),f=d?d.getAttribute("checksumid"):void 0,e.abrupt("return",{html:c,selector:f,targetForceIncluded:o});case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getESRAExtractor",value:function(e){var t=this.esraExtractors.find((function(t){return t.isSameDocument(e.ownerDocument)}));if(t)return t;var n=new V(e.ownerDocument);return this.esraExtractors.push(n),n}},{key:"isElementInteractable",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.htmlReducer.getInteractableElements())||!r.length){e.next=3;break}return e.abrupt("return",r.some((function(e){return e.element===n&&!e.forced})));case 3:return e.next=5,(0,v.w1)(n.ownerDocument,this.appSpecificRules);case 5:return i=e.sent,e.abrupt("return",i.includes(n));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),ke=n(1414),Ee=n(8739),Se=n(1855),xe=n(6301),Ie=n.n(xe),Ce=function(e){(0,B.Z)(i,e);var n=(0,j.Z)(i);function i(e){var t,r=e.sessionMirror,o=e.elementSelector;return(0,a.Z)(this,i),(t=n.call(this)).sessionMirror=void 0,t.elementSelector=void 0,t.numberOfRetries=3,t.currentHref=void 0,t.previousMouseDownData=void 0,t.previousMousePositions=void 0,t.previousMousePositionsNodeSelectors={},t.hasUndefinedFocusNode=!1,t.lastMouseUpTime=0,t.lastMouseDownExtract=void 0,t.allInteractableElementsMetadata={mouseMove:void 0,mouseDown:void 0},t.events=void 0,t.currentEventIndex=-1,t.enableRecordingAvailableInteractableElements=!0,t.useTextInputFastForward=!0,t.textInputFastForwardInitialSelector=void 0,t.appSpecificRules=void 0,t.getBoundingBox=function(e){var n=(0,v.QI)(t.sessionMirror.getNodeById(e),t.appSpecificRules.appSpecificInteractableElementsSelectors);if(n)return null===n||void 0===n?void 0:n.getBoundingClientRect()},t.isPointWithinBoundingBox=function(e,t,n){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom},t.isPointWithinNodeBoundingBox=function(e,n,r){var i=t.getBoundingBox(e);return!!i&&(n>=i.left&&n<=i.right&&r>=i.top&&r<=i.bottom)},t.elementSelector=o,t.sessionMirror=r,t}return(0,s.Z)(i,[{key:"setEvents",value:function(e){this.events=e}},{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward,r=void 0===n||n;this.enableRecordingAvailableInteractableElements=t,this.useTextInputFastForward=r}},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"skipEvents",value:function(e){this.currentEventIndex+=e.length}},{key:"preEvent",value:function(e){++this.currentEventIndex}},{key:"postEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",r);case 2:if(r.availableInteractableElementsAtStart||!this.enableRecordingAvailableInteractableElements||n.type!==ke.tw.IncrementalSnapshot||n.data.source!==ke.yh.MouseInteraction&&n.data.source!==ke.yh.Input&&n.data.source!==ke.yh.MediaInteraction){e.next=6;break}return e.next=5,this.getInteractableElementsMetadata();case 5:r.availableInteractableElementsAtStart=e.sent;case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMeta",value:function(e){if(e.href!==this.currentHref)return this.currentHref=e.href,{eventCode:Se.$.Navigation,url:e.href}}},{key:"getNextUserTriggeredInputEvent",value:function(e){for(var t=this.currentEventIndex+1;t<this.events.length;++t){var n=this.events[t];if(n.type===ke.tw.IncrementalSnapshot&&n.data.source===ke.yh.Input&&n.data.userTriggered)return n;if(n.timestamp>e)return}}},{key:"handleInput",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u,c,d=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.userTriggered){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(o=e.sent,(a=this.getInputEventCode(o,n))!==Se.$.Input||!this.useTextInputFastForward){e.next=18;break}if(this.textInputFastForwardInitialSelector){e.next=11;break}return e.next=10,this.elementSelector.getSelector(o);case 10:this.textInputFastForwardInitialSelector=e.sent;case 11:return s=(0,l.Z)({eventCode:a},this.textInputFastForwardInitialSelector),u=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=d.getNextUserTriggeredInputEvent(i.timestamp+2e3))){e.next=9;break}return r=n.data,e.next=5,d.getNodeById(r.id);case 5:if((a=e.sent)===o){e.next=8;break}return e.abrupt("return",!1);case 8:return e.abrupt("return",d.getInputEventCode(a,r)===Se.$.Input);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=15,u();case 15:if(e.sent){e.next=17;break}this.textInputFastForwardInitialSelector=void 0;case 17:return e.abrupt("return",s);case 18:return e.next=20,this.elementSelector.getSelector(o);case 20:return c=e.sent,e.abrupt("return",(0,l.Z)({eventCode:a},c));case 22:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMouseMove",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.previousMousePositions=n.positions,this.previousMousePositionsNodeSelectors={},!this.isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus()){e.next=39;break}this.previousMousePositionsNodeSelectors={},r={},i=(0,U.Z)(this.previousMousePositions),e.prev=6,i.s();case 8:if((o=i.n()).done){e.next=28;break}if(a=o.value,s=a.id,!r[s]){e.next=13;break}return e.abrupt("continue",26);case 13:return r[s]=!0,e.next=16,this.getNodeById(s);case 16:return u=e.sent,e.prev=17,e.next=20,this.elementSelector.getSelector(u);case 20:this.previousMousePositionsNodeSelectors[s]=e.sent,e.next=26;break;case 23:e.prev=23,e.t0=e.catch(17),console.warn("error with extracting selector for node during previousMousePositionsNodeSelectors mapping",u,e.t0);case 26:e.next=8;break;case 28:e.next=33;break;case 30:e.prev=30,e.t1=e.catch(6),i.e(e.t1);case 33:return e.prev=33,i.f(),e.finish(33);case 36:return e.next=38,this.getInteractableElementsMetadata();case 38:this.allInteractableElementsMetadata.mouseMove=e.sent;case 39:case"end":return e.stop()}}),e,this,[[6,30,33,36],[17,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===ke.tw.IncrementalSnapshot)switch(t.data.source){case ke.yh.MouseMove:return!1;case ke.yh.MouseInteraction:switch(t.data.type){case ke.Y2.Click:case ke.Y2.MouseDown:return!0;case ke.Y2.Focus:return-1===t.data.id}}}return!1}},{key:"handleMouseDown",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNodeById(n.id);case 2:return r=e.sent,e.prev=3,e.t0=r,e.next=7,this.elementSelector.getSelector(r);case 7:return e.t1=e.sent,this.lastMouseDownExtract={node:e.t0,selector:e.t1},e.next=11,this.getInteractableElementsMetadata();case 11:this.allInteractableElementsMetadata.mouseDown=e.sent,e.next=17;break;case 14:e.prev=14,e.t2=e.catch(3),console.warn("error with extracting selector for node during handleMouseDown",r,e.t2);case 17:this.previousMouseDownData=n;case 18:case"end":return e.stop()}}),e,this,[[3,14]])})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseUp",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.lastMouseUpTime=r.timestamp;case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isLastMouseDownValidForClick",value:function(e){return!!this.lastMouseDownExtract&&e-this.lastMouseUpTime<10}},{key:"invalidateLastMouseDown",value:function(){this.lastMouseUpTime=0,this.lastMouseDownExtract=void 0,this.allInteractableElementsMetadata.mouseDown=void 0}},{key:"handleFocus",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.hasUndefinedFocusNode=-1===n.id;case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return o=this.isLastMouseDownValidForClick(i.timestamp),a=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var r,a,s,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=19;break}return e.t0=l.Z,e.t1=(0,l.Z)({},u.lastMouseDownExtract.selector),e.t2={},e.next=6,u.elementSelector.getSelector(u.lastMouseDownExtract.node,{extractEsraMetadata:!1});case 6:if(e.t4=r=e.sent,e.t3=null===e.t4,e.t3){e.next=10;break}e.t3=void 0===r;case 10:if(!e.t3){e.next=14;break}e.t5=void 0,e.next=15;break;case 14:e.t5=r.playwrightSelector;case 15:return e.t6=e.t5,e.t7=u.allInteractableElementsMetadata.mouseDown,e.t8={playwrightSelectorForSnapshot:e.t6,availableInteractableElementsAtStart:e.t7},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t8));case 19:return a=u.getNodeIdForClick(n,i),e.next=22,u.getNodeById(a);case 22:if(s=e.sent,!u.previousMousePositionsNodeSelectors[a]){e.next=42;break}return e.t9=l.Z,e.t10=(0,l.Z)({},u.previousMousePositionsNodeSelectors[a]),e.t11={},e.next=29,u.elementSelector.getSelector(s,{extractEsraMetadata:!1});case 29:if(e.t13=c=e.sent,e.t12=null===e.t13,e.t12){e.next=33;break}e.t12=void 0===c;case 33:if(!e.t12){e.next=37;break}e.t14=void 0,e.next=38;break;case 37:e.t14=c.playwrightSelector;case 38:return e.t15=e.t14,e.t16=u.allInteractableElementsMetadata.mouseMove,e.t17={playwrightSelectorForSnapshot:e.t15,availableInteractableElementsAtStart:e.t16},e.abrupt("return",(0,e.t9)(e.t10,e.t11,e.t17));case 42:return e.abrupt("return",u.elementSelector.getSelector(s));case 43:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=6,a();case 6:return s=e.sent,this.invalidateLastMouseDown(),e.abrupt("return",(0,l.Z)({eventCode:Se.$.Click},s));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getNextMouseMoveEvent",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===ke.tw.IncrementalSnapshot&&t.data.source===ke.yh.MouseMove)return t}}},{key:"getNodeIdForClick",value:function(e,t){var n=this;if(this.hasUndefinedFocusNode&&this.previousMouseDownData&&this.previousMouseDownData.id!==e.id){var r={next:function(){var e=n.getNextMouseMoveEvent();if(e){var r=e.data,i=(0,x.Z)(r.positions).reverse().find((function(n){return e.timestamp+n.timeOffset<t.timestamp}));if(i)return i.id}}(),previous:function(){if(n.previousMousePositions){var e=(0,x.Z)(n.previousMousePositions).reverse().find((function(e){return!0}));if(e)return e.id}}(),point:function(){try{var t=n.sessionMirror.getNodeById(e.id),r=Array.from((0,v.mn)(t)).filter((function(e){return"none"===window.getComputedStyle(e).pointerEvents})),i=[];if(r.length){r.forEach((function(e){var t=e,n=t.getAttribute("style");i.push(n),t.setAttribute("style",n+";pointer-events:auto !important")}));var o=document.querySelector("iframe").contentDocument.elementFromPoint(e.x,e.y);if(r.forEach((function(e,t){e.setAttribute("style",i[t])})),o){var a=n.sessionMirror.getMeta(o);if(a)return a.id}}}catch(xt){console.warn("element from point calc error",xt)}}(),original:e.id},i=r.next||r.previous||e.id;return r.point&&function(){if(i===r.point)return!1;var t=n.sessionMirror.getNodeById(i);return n.isPointWithinBoundingBox(e.x,e.y,t.getBoundingClientRect())}()?r.point:i}return e.id}},{key:"getNodeById",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).retriesLeft,o=void 0===i?this.numberOfRetries:i,a=r.useCompoundInteractableDetection,s=void 0===a||a,o){e.next=4;break}return console.error("no node"),e.abrupt("return",null);case 4:if(u=this.sessionMirror.getNodeById(n)){e.next=9;break}return e.next=8,Ie()(100*(this.numberOfRetries-o+1));case 8:return e.abrupt("return",this.getNodeById(n,{retriesLeft:o-1,useCompoundInteractableDetection:s}));case 9:return e.abrupt("return",s?(0,v.QI)(u,this.appSpecificRules.appSpecificInteractableElementsSelectors):u);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getInputEventCode",value:function(e,t){switch(e.getAttribute("type")){case"checkbox":case"radio":return t.isChecked?Se.$.Check:Se.$.UnCheck;default:return Se.$.Input}}},{key:"getInteractableElementsMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o,a,s;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.enableRecordingAvailableInteractableElements){e.next=2;break}return e.abrupt("return",[]);case 2:return n=document.querySelector("iframe").contentWindow,i=n.document,console.log("Getting all interactable elements..."),o=(0,v.w1)(i,this.appSpecificRules),console.log("Got ".concat(o.length," interactable elements")),console.log("Extracting ESRA metadata for all interactable elements..."),a=new V(i),e.next=11,Promise.all(o.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.extract(n).toMetadata(),e.abrupt("return",{esraMetadata:r});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 11:return s=e.sent,console.log("Done processing all interactable elements..."),e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),i}(Ee.E),Te=n(7666),Me=n(885),Ne=n(3246),Ae=n(5512),_e=n(7326);!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(ve||(ve={}));var De=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function Re(e){var t=[];for(var n in e){var r=e[n];if("string"===typeof r){var i=Pe(n);t.push("".concat(i,": ").concat(r,";"))}}return t.join(" ")}var Oe=/-([a-z])/g,Le=/^--[a-zA-Z0-9-]+$/,Ze=function(e){return Le.test(e)?e:e.replace(Oe,(function(e,t){return t?t.toUpperCase():""}))},Fe=/\B([A-Z])/g,Pe=function(e){return e.replace(Fe,"-$1").toLowerCase()},Ve=function(){function e(){(0,a.Z)(this,e),this.parentElement=null,this.parentNode=null,this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.ELEMENT_NODE=qe.ELEMENT_NODE,this.TEXT_NODE=qe.TEXT_NODE}return(0,s.Z)(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),e}();function Be(e){return function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(e,r,i){var o;return(0,a.Z)(this,n),(o=t.call(this)).nodeType=qe.DOCUMENT_TYPE_NODE,o.RRNodeType=ve.DocumentType,o.name=e,o.publicId=r,o.systemId=i,o.nodeName=e,o.textContent=null,o}return(0,s.Z)(n,[{key:"toString",value:function(){return"RRDocumentType"}}]),n}(e)}function je(e){return function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=qe.ELEMENT_NODE,r.RRNodeType=ve.Element,r.attributes={},r.shadowRoot=null,r.tagName=e.toUpperCase(),r.nodeName=e.toUpperCase(),r}return(0,s.Z)(n,[{key:"textContent",get:function(){var e="";return this.childNodes.forEach((function(t){return e+=t.textContent})),e},set:function(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}},{key:"classList",get:function(){var e=this;return new Ge(this.attributes.class,(function(t){e.attributes.class=t}))}},{key:"id",get:function(){return this.attributes.id||""}},{key:"className",get:function(){return this.attributes.class||""}},{key:"style",get:function(){var e=this,t=this.attributes.style?function(e){var t={},n=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[Ze(r[0].trim())]=r[1].trim())}})),t}(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=function(r,i,o){if(!n.test(r)){var a=Ze(r);i?t[a]=i:delete t[a],"important"===o&&(t[a]+=" !important"),e.attributes.style=Re(t)}},t.removeProperty=function(r){if(n.test(r))return"";var i=Ze(r),o=t[i]||"";return delete t[i],e.attributes.style=Re(t),o},t}},{key:"getAttribute",value:function(e){return this.attributes[e]||null}},{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"setAttributeNS",value:function(e,t,n){this.setAttribute(t,n)}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"appendChild",value:function(e){return ze(this,e)}},{key:"insertBefore",value:function(e,t){return $e(this,e,t)}},{key:"removeChild",value:function(e){return Ye(this,e)}},{key:"attachShadow",value:function(e){var t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}},{key:"dispatchEvent",value:function(e){return!0}},{key:"toString",value:function(){var e="";for(var t in this.attributes)e+="".concat(t,'="').concat(this.attributes[t],'" ');return"".concat(this.tagName," ").concat(e)}}]),n}(e)}function He(e){return function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=qe.TEXT_NODE,r.nodeName="#text",r.RRNodeType=ve.Text,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRText text=".concat(JSON.stringify(this.data))}}]),n}(e)}function Ue(e){return function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=qe.COMMENT_NODE,r.nodeName="#comment",r.RRNodeType=ve.Comment,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRComment text=".concat(JSON.stringify(this.data))}}]),n}(e)}function We(e){return function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeName="#cdata-section",r.nodeType=qe.CDATA_SECTION_NODE,r.RRNodeType=ve.CDATA,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRCDATASection data=".concat(JSON.stringify(this.data))}}]),n}(e)}var qe,Ge=(0,s.Z)((function e(t,n){var r=this;if((0,a.Z)(this,e),this.classes=[],this.add=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var a=o[i],s=String(a);r.classes.indexOf(s)>=0||r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))},this.remove=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.classes=r.classes.filter((function(e){return-1===t.indexOf(e)})),r.onChange&&r.onChange(r.classes.join(" "))},t){var i,o=t.trim().split(/\s+/);(i=this.classes).push.apply(i,(0,x.Z)(o))}this.onChange=n}));function ze(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function $e(e,t,n){if(!n)return ze(e,t);if(n.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===n||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=n.previousSibling,n.previousSibling=t,t.nextSibling=n,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function Ye(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}!function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(qe||(qe={}));var Qe={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Xe={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},Ke=null;function Je(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.mirror||t.ownerDocument.mirror;e=function(e,t,n,r){var i;n.afterAppend&&!Ke&&(Ke=new WeakSet,setTimeout((function(){Ke=null}),0));if(!nt(e,t)){var o=tt(t,n.mirror,r);null===(i=e.parentNode)||void 0===i||i.replaceChild(o,e),e=o}switch(t.RRNodeType){case ve.Document:if(!rt(e,t,n.mirror,r)){var a=r.getMeta(t);a&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,a),null===Ke||void 0===Ke||Ke.add(e))}break;case ve.Element:var s=e,u=t;switch(u.tagName){case"IFRAME":var c=e.contentDocument;if(!c)break;Je(c,t.contentDocument,n,r)}u.shadowRoot&&(s.shadowRoot||s.attachShadow({mode:"open"}),et(s.shadowRoot,u.shadowRoot,n,r)),function(e,t,n){var r=e.attributes,i=t.attributes,o=function(){var r=i[a],o=n.getMeta(t);if((null===o||void 0===o?void 0:o.isSVG)&&Qe[a])e.setAttributeNS(Qe[a],a,r);else if("CANVAS"===t.tagName&&"rr_dataURL"===a){var s=document.createElement("img");s.src=r,s.onload=function(){var t=e.getContext("2d");t&&t.drawImage(s,0,0,s.width,s.height)}}else{if("IFRAME"===t.tagName&&"srcdoc"===a)return 1;e.setAttribute(a,r)}};for(var a in i)o();for(var s=0,u=Array.from(r);s<u.length;s++){var c=u[s].name;c in i||e.removeAttribute(c)}t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}(s,u,r)}return e}(e,t,n,r),et(e,t,n,r),function(e,t,n){var r;switch(t.RRNodeType){case ve.Document:var i=t.scrollData;i&&n.applyScroll(i,!0);break;case ve.Element:var o=e,a=t;switch(a.scrollData&&n.applyScroll(a.scrollData,!0),a.inputData&&n.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":var s=e,u=a;void 0!==u.paused&&(u.paused?s.pause():s.play()),void 0!==u.muted&&(s.muted=u.muted),void 0!==u.volume&&(s.volume=u.volume),void 0!==u.currentTime&&(s.currentTime=u.currentTime),void 0!==u.playbackRate&&(s.playbackRate=u.playbackRate),void 0!==u.loop&&(s.loop=u.loop);break;case"CANVAS":var c=t;if(null!==c.rr_dataURL){var l=document.createElement("img");l.onload=function(){var e=o.getContext("2d");e&&e.drawImage(l,0,0,l.width,l.height)},l.src=c.rr_dataURL}c.canvasMutations.forEach((function(t){return n.applyCanvas(t.event,t.mutation,e)}));break;case"STYLE":var d=o.sheet;d&&t.rules.forEach((function(e){return n.applyStyleSheetMutation(e,d)}))}break;case ve.Text:case ve.Comment:case ve.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}(null===Ke||void 0===Ke?void 0:Ke.has(e))&&(Ke.delete(e),null===(r=n.afterAppend)||void 0===r||r.call(n,e,n.mirror.getId(e)))}(e,t,n)}function et(e,t,n,r){var i=Array.from(e.childNodes),o=t.childNodes;if(0!==i.length||0!==o.length){for(var a=0,s=i.length-1,u=0,c=o.length-1,l=i[a],d=i[s],f=o[u],h=o[c],p=void 0,v=void 0;a<=s&&u<=c;)if(void 0===l)l=i[++a];else if(void 0===d)d=i[--s];else if(rt(l,f,n.mirror,r))l=i[++a],f=o[++u];else if(rt(d,h,n.mirror,r))d=i[--s],h=o[--c];else if(rt(l,h,n.mirror,r)){try{e.insertBefore(l,d.nextSibling)}catch(xt){console.warn(xt)}l=i[++a],h=o[--c]}else if(rt(d,f,n.mirror,r)){try{e.insertBefore(d,l)}catch(xt){console.warn(xt)}d=i[--s],f=o[++u]}else{if(!p){p={};for(var m=a;m<=s;m++){var g=i[m];g&&n.mirror.hasNode(g)&&(p[n.mirror.getId(g)]=m)}}var y=i[v=p[r.getId(f)]];if(void 0!==v&&y&&rt(y,f,n.mirror,r)){try{e.insertBefore(y,l)}catch(xt){console.warn(xt)}i[v]=void 0}else{var b=tt(f,n.mirror,r);"#document"===e.nodeName&&l&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(e.removeChild(l),n.mirror.removeNodeFromMap(l),l=i[++a]);try{e.insertBefore(b,l||null)}catch(xt){console.warn(xt)}}f=o[++u]}if(a>s){var w=o[c+1],k=null;for(w&&(k=n.mirror.getNode(r.getId(w)));u<=c;++u){var E=tt(o[u],n.mirror,r);try{e.insertBefore(E,k)}catch(xt){console.warn(xt)}}}else if(u>c)for(;a<=s;a++){var S=i[a];if(S&&S.parentNode===e)try{e.removeChild(S),n.mirror.removeNodeFromMap(S)}catch(xt){console.warn(xt)}}for(var x=e.firstChild,I=t.firstChild;null!==x&&null!==I;)Je(x,I,n,r),x=x.nextSibling,I=I.nextSibling}}function tt(e,t,n){var r=n.getId(e),i=n.getMeta(e),o=null;if(r>-1&&(o=t.getNode(r)),null!==o&&nt(o,e))return o;switch(e.RRNodeType){case ve.Document:o=new Document;break;case ve.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case ve.Element:var a=e.tagName.toLowerCase();a=Xe[a]||a,o=i&&"isSVG"in i&&(null===i||void 0===i?void 0:i.isSVG)?document.createElementNS(Qe.svg,a):document.createElement(e.tagName);break;case ve.Text:o=document.createTextNode(e.data);break;case ve.Comment:o=document.createComment(e.data);break;case ve.CDATA:o=document.createCDATASection(e.data)}i&&t.add(o,Object.assign({},i));try{null===Ke||void 0===Ke||Ke.add(o)}catch(xt){}return o}function nt(e,t){return e.nodeType===t.nodeType&&(e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName)}function rt(e,t,n,r){var i=n.getId(e),o=r.getId(t);return-1!==i&&i===o&&nt(e,t)}var it=function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).UNSERIALIZED_STARTING_ID=-2,r._unserializedId=r.UNSERIALIZED_STARTING_ID,r.mirror=new mt,r.scrollData=null,e&&(r.mirror=e),r}return(0,s.Z)(n,[{key:"unserializedId",get:function(){return this._unserializedId--}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new ot(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t,n=e.toUpperCase();switch(n){case"AUDIO":case"VIDEO":t=new st(n);break;case"IFRAME":t=new lt(n,this.mirror);break;case"CANVAS":t=new ut(n);break;case"STYLE":t=new ct(n);break;default:t=new at(n)}return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new ft(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new ht(e);return t.ownerDocument=this,t}},{key:"createTextNode",value:function(e){var t=new dt(e);return t.ownerDocument=this,t}},{key:"destroyTree",value:function(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}},{key:"open",value:function(){(0,Y.Z)((0,Q.Z)(n.prototype),"open",this).call(this),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}]),n}(function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call(this,i)).nodeType=qe.DOCUMENT_NODE,e.nodeName="#document",e.compatMode="CSS1Compat",e.RRNodeType=ve.Document,e.textContent=null,e.ownerDocument=(0,_e.Z)(e),e}return(0,s.Z)(n,[{key:"documentElement",get:function(){return this.childNodes.find((function(e){return e.RRNodeType===ve.Element&&"HTML"===e.tagName}))||null}},{key:"body",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===ve.Element&&"BODY"===e.tagName})))||null}},{key:"head",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===ve.Element&&"HEAD"===e.tagName})))||null}},{key:"implementation",get:function(){return this}},{key:"firstElementChild",get:function(){return this.documentElement}},{key:"appendChild",value:function(e){var t=e.RRNodeType;if((t===ve.Element||t===ve.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===t})))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ".concat(t===ve.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var n=ze(this,e);return n.parentElement=null,n}},{key:"insertBefore",value:function(e,t){var n=e.RRNodeType;if((n===ve.Element||n===ve.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===n})))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ".concat(n===ve.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var r=$e(this,e,t);return r.parentElement=null,r}},{key:"removeChild",value:function(e){return Ye(this,e)}},{key:"open",value:function(){this.firstChild=null,this.lastChild=null}},{key:"close",value:function(){}},{key:"write",value:function(e){var t;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===e?t="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===e&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){var n=this.createDocumentType("html",t,"");this.open(),this.appendChild(n)}}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new(Be(Ve))(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t=new(je(Ve))(e);return t.ownerDocument=this,t}},{key:"createElementNS",value:function(e,t){return this.createElement(t)}},{key:"createTextNode",value:function(e){var t=new(He(Ve))(e);return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new(Ue(Ve))(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new(We(Ve))(e);return t.ownerDocument=this,t}},{key:"toString",value:function(){return"RRDocument"}}]),n}(Ve)),ot=Be(Ve),at=function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).inputData=null,e.scrollData=null,e}return(0,s.Z)(n)}(je(Ve)),st=function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n)}(function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"attachShadow",value:function(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}},{key:"play",value:function(){this.paused=!1}},{key:"pause",value:function(){this.paused=!0}}]),n}(at)),ut=function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rr_dataURL=null,e.canvasMutations=[],e}return(0,s.Z)(n,[{key:"getContext",value:function(){return null}}]),n}(at),ct=function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rules=[],e}return(0,s.Z)(n)}(at),lt=function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(e,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e)).contentDocument=new it,i.contentDocument.mirror=r,i}return(0,s.Z)(n)}(at),dt=He(Ve),ft=Ue(Ve),ht=We(Ve);function pt(e,t,n,r){var i,o;switch(e.nodeType){case qe.DOCUMENT_NODE:r&&"IFRAME"===r.nodeName?i=r.contentDocument:(i=t).compatMode=e.compatMode;break;case qe.DOCUMENT_TYPE_NODE:var a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break;case qe.ELEMENT_NODE:for(var s=e,u=(o=s)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),c=i=t.createElement(u),l=0,d=Array.from(s.attributes);l<d.length;l++){var f=d[l],h=f.name,p=f.value;c.attributes[h]=p}s.scrollLeft&&(c.scrollLeft=s.scrollLeft),s.scrollTop&&(c.scrollTop=s.scrollTop);break;case qe.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case qe.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case qe.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case qe.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}var v=n.getMeta(e);return t instanceof it&&(v||(v=gt(i,t.unserializedId),n.add(e,v)),t.mirror.add(i,Object.assign({},v))),i}function vt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new De,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new it;return function e(r,i){var o=pt(r,n,t,i);if(null!==o)if("IFRAME"!==(null===i||void 0===i?void 0:i.nodeName)&&r.nodeType!==qe.DOCUMENT_FRAGMENT_NODE&&(null===i||void 0===i||i.appendChild(o),o.parentNode=i,o.parentElement=i),"IFRAME"===r.nodeName){var a=r.contentDocument;a&&e(a,o)}else r.nodeType!==qe.DOCUMENT_NODE&&r.nodeType!==qe.ELEMENT_NODE&&r.nodeType!==qe.DOCUMENT_FRAGMENT_NODE||(r.nodeType===qe.ELEMENT_NODE&&r.shadowRoot&&e(r.shadowRoot,o),r.childNodes.forEach((function(t){return e(t,o)})))}(e,null),n}var mt=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function gt(e,t){switch(e.RRNodeType){case ve.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case ve.DocumentType:var n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case ve.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case ve.Text:case ve.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case ve.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function yt(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map((function(e){e(n)})),(r=e.get("*"))&&r.slice().map((function(e){e(t,n)}))}}}function bt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,"undefined"===typeof e?this.scrollLeft:~~e,"undefined"===typeof t?this.scrollTop:~~t)}else{if("number"===typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=function(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function u(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!==typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=l(e,"Y")&&d(e,"Y"),n=l(e,"X")&&d(e,"X");return t||n}function h(t){var n,r,o,s,u=(a()-t.startTime)/i;s=u=u>1?1:u,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,r,i){var s,c,l,d,f=a();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,l=e.scrollY||e.pageYOffset,d=o.scroll):(s=n,c=n.scrollLeft,l=n.scrollTop,d=u),h({scrollable:s,method:d,startTime:f,startX:c,startY:l,x:r,y:i})}}var wt,kt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,a.Z)(this,e),this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n.speed}return(0,s.Z)(e,[{key:"addAction",value:function(e){var t=!0===this.raf;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{var n=this.findActionIndex(e);this.actions.splice(n,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}},{key:"start",value:function(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}},{key:"rafCheck",value:function(){var e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){var t=this.actions[0];if(!(this.timeOffset>=t.delay))break;this.actions.shift(),t.doAction()}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}},{key:"clear",value:function(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}},{key:"setSpeed",value:function(e){this.speed=e}},{key:"isActive",value:function(){return null!==this.raf}},{key:"findActionIndex",value:function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r+1;n=r-1}}return t}}]),e}();function Et(e,t){if(e.type===ke.tw.IncrementalSnapshot&&e.data.source===ke.yh.MouseMove&&e.data.positions&&e.data.positions.length){var n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}function St(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(wt||(wt={}));var xt={type:"xstate.init"};function It(e){return void 0===e?[]:[].concat(e)}function Ct(e){return{type:"xstate.assign",assignment:e}}function Tt(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function Mt(e){return function(t){return e===t}}function Nt(e){return"string"==typeof e?{type:e}:e}function At(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Mt(e)}}function _t(e,t,n){var r=t,i=!1;return[e.filter((function(e){if("xstate.assign"===e.type){i=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(i){t[i]="function"==typeof e.assignment[i]?e.assignment[i](r,n):e.assignment[i]})),r=t,!1}return!0})),r,i]}function Dt(e,t){void 0===t&&(t={});var n=St(_t(It(e.states[e.initial].entry).map((function(e){return Tt(e,t.actions)})),e.context,xt),2),r=n[0],i=n[1],o={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Mt(e.initial)},transition:function(t,n){var r,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,u=a.context,c=Nt(n),l=e.states[s];if(l.on){var d=It(l.on[c.type]);try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),h=f.next();!h.done;h=f.next()){var p=h.value;if(void 0===p)return At(s,u);var v="string"==typeof p?{target:p}:p,m=v.target,g=v.actions,y=void 0===g?[]:g,b=v.cond,w=void 0===b?function(){return!0}:b,k=void 0===m,E=null!=m?m:s,S=e.states[E];if(w(u,c)){var x=St(_t((k?It(y):[].concat(l.exit,y,S.entry).filter((function(e){return e}))).map((function(e){return Tt(e,o._options.actions)})),u,c),3),I=x[0],C=x[1],T=x[2],M=null!=m?m:s;return{value:M,context:C,actions:I,changed:m!==s||I.length>0||T,matches:Mt(M)}}}}catch(St){r={error:St}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}return At(s,u)}};return o}var Rt=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function Ot(e){var t=e.initialState,n=wt.NotStarted,r=new Set,i={_machine:e,send:function(i){n===wt.Running&&(t=e.transition(t,i),Rt(t,Nt(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var o="object"==typeof r?r:{context:e.config.context,value:r};t={value:o.value,actions:[],context:o.context,matches:Mt(o.value)}}return n=wt.Running,Rt(t,xt),i},stop:function(){return n=wt.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function Lt(e,t){var n=t.getCastFn,r=t.applyEventsSynchronously,i=t.emitter,o=Dt({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ct({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:Ct((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),Object.assign(Object.assign({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,o=e.timer,a=e.events,s=e.baselineTime,u=e.lastPlayedEvent;o.clear();var c,l=(0,U.Z)(a);try{for(l.s();!(c=l.n()).done;){Et(c.value,s)}}catch(g){l.e(g)}finally{l.f()}var d=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===ke.tw.Meta&&r.timestamp<=t)return e.slice(n)}return e}(a,s),f=null===u||void 0===u?void 0:u.timestamp;(null===u||void 0===u?void 0:u.type)===ke.tw.IncrementalSnapshot&&u.data.source===ke.yh.MouseMove&&(f=u.timestamp+(null===(t=u.data.positions[0])||void 0===t?void 0:t.timeOffset)),s<(f||0)&&i.emit(ke.SA.PlayBack);var h,p=new Array,v=(0,U.Z)(d);try{var m=function(){var e=h.value;if(f&&f<s&&(e.timestamp<=f||e===u))return 1;if(e.timestamp<s)p.push(e);else{var t=n(e,!1);o.addAction({doAction:function(){t()},delay:e.delay})}};for(v.s();!(h=v.n()).done;)m()}catch(g){v.e(g)}finally{v.f()}r(p),i.emit(ke.SA.Flush),o.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:Ct((function(e){return Object.assign(Object.assign({},e),{lastPlayedEvent:null})})),startLive:Ct({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:Ct((function(e,t){var r=e.baselineTime,i=e.timer,o=e.events;if("ADD_EVENT"===t.type){var a=t.payload.event;Et(a,r);var s=o.length-1;if(!o[s]||o[s].timestamp<=a.timestamp)o.push(a);else{for(var u=-1,c=0;c<=s;){var l=Math.floor((c+s)/2);o[l].timestamp<=a.timestamp?c=l+1:s=l-1}-1===u&&(u=c),o.splice(u,0,a)}var d=a.timestamp<r,f=n(a,d);d?f():i.isActive()&&i.addAction({doAction:function(){f()},delay:a.delay})}return Object.assign(Object.assign({},e),{events:o})}))}});return Ot(o)}var Zt=n(1737),Ft=n(5647),Pt=n(3464),Vt=new Map;function Bt(e,t){var n=Vt.get(e);return n||(n=new Map,Vt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function jt(e,n,r){var i=this;return function(o){return(0,Ne.m)(i,void 0,void 0,(0,t.Z)().mark((function i(){var a,s,u,c,l,d,f,h,p,v,m;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o||"object"!==typeof o||!("rr_type"in o)){t.next=55;break}if(r&&(r.isUnchanged=!1),"ImageBitmap"!==o.rr_type||!("args"in o)){t.next=11;break}return t.next=5,jt(e,n,r)(o.args);case 5:return a=t.sent,t.next=8,createImageBitmap.apply(null,a);case 8:return t.abrupt("return",t.sent);case 11:if(!("index"in o)){t.next=18;break}if(!r&&null!==n){t.next=14;break}return t.abrupt("return",o);case 14:return s=o.rr_type,u=o.index,t.abrupt("return",Bt(n,s)[u]);case 18:if(!("args"in o)){t.next=31;break}return c=o.rr_type,l=o.args,d=window[c],t.t0=Ft.Z,t.t1=d,t.t2=x.Z,t.next=26,Promise.all(l.map(jt(e,n,r)));case 26:return t.t3=t.sent,t.t4=(0,t.t2)(t.t3),t.abrupt("return",(0,t.t0)(t.t1,t.t4));case 31:if(!("base64"in o)){t.next=35;break}return t.abrupt("return",(0,Pt.J)(o.base64));case 35:if(!("src"in o)){t.next=47;break}if(!(f=e.get(o.src))){t.next=41;break}return t.abrupt("return",f);case 41:return(h=new Image).src=o.src,e.set(o.src,h),t.abrupt("return",h);case 45:t.next=53;break;case 47:if(!("data"in o)||"Blob"!==o.rr_type){t.next=53;break}return t.next=50,Promise.all(o.data.map(jt(e,n,r)));case 50:return p=t.sent,v=new Blob(p,{type:o.type}),t.abrupt("return",v);case 53:t.next=60;break;case 55:if(!Array.isArray(o)){t.next=60;break}return t.next=58,Promise.all(o.map(jt(e,n,r)));case 58:return m=t.sent,t.abrupt("return",m);case 60:return t.abrupt("return",o);case 61:case"end":return t.stop()}}),i)})))}}function Ht(e,t){try{return t===ke.FX.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(xt){return null}}var Ut=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Wt(e,t){if(null===t||void 0===t?void 0:t.constructor){var n=t.constructor.name;if(Ut.includes(n)){var r=Bt(e,n);r.includes(t)||r.push(t)}}}function qt(e){var n=e.mutation,r=e.target,i=e.type,o=e.imageMap,a=e.errorHandler;return(0,Ne.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=Ht(r,i)){e.next=4;break}return e.abrupt("return");case 4:if(!n.setter){e.next=7;break}return s[n.property]=n.args[0],e.abrupt("return");case 7:return u=s[n.property],e.next=10,Promise.all(n.args.map(jt(o,s)));case 10:c=e.sent,l=u.apply(s,c),Wt(s,l),!1,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),a(n,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}function Gt(e){var n=e.event,r=e.mutations,i=e.target,o=e.imageMap,a=e.errorHandler;return(0,Ne.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=i.getContext("2d")){e.next=4;break}return a(r[0],new Error("Canvas context is null")),e.abrupt("return");case 4:return u=r.map((function(e){return(0,Ne.m)(c,void 0,void 0,(0,t.Z)().mark((function n(){return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e.args.map(jt(o,s))));case 1:case"end":return t.stop()}}),n)})))})),e.next=7,Promise.all(u);case 7:e.sent.forEach((function(e,t){var i=r[t];try{if(i.setter)return void(s[i.property]=i.args[0]);var u=s[i.property];"drawImage"===i.property&&"string"===typeof i.args[0]?(o.get(n),u.apply(s,i.args)):u.apply(s,e)}catch(c){a(i,c)}}));case 9:case"end":return e.stop()}}),e)})))}function zt(e){var n=e.event,r=e.mutation,i=e.target,o=e.imageMap,a=e.canvasEventMap,s=e.errorHandler;return(0,Ne.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var u,c,l,d;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,u=a.get(n)||r,c="commands"in u?u.commands:[u],![ke.FX.WebGL,ke.FX.WebGL2].includes(r.type)){e.next=13;break}l=0;case 5:if(!(l<c.length)){e.next=12;break}return d=c[l],e.next=9,qt({mutation:d,type:r.type,target:i,imageMap:o,errorHandler:s});case 9:l++,e.next=5;break;case 12:return e.abrupt("return");case 13:return e.next=15,Gt({event:n,mutations:c,target:i,imageMap:o,errorHandler:s});case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),s(r,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}var $t=function(){function e(t){var n=this;(0,a.Z)(this,e),this.mediaMap=new Map,this.metadataCallbackMap=new Map,this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(ke.SA.Start,this.start.bind(this)),this.emitter.on(ke.SA.SkipStart,this.start.bind(this)),this.emitter.on(ke.SA.Pause,this.pause.bind(this)),this.emitter.on(ke.SA.Finish,this.pause.bind(this)),this.speedService.subscribe((function(){n.syncAllMediaElements()}))}return(0,s.Z)(e,[{key:"syncAllMediaElements",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pause:!1};this.mediaMap.forEach((function(n,r){e.syncTargetWithState(r),t.pause&&r.pause()}))}},{key:"start",value:function(){this.syncAllMediaElements()}},{key:"pause",value:function(){this.syncAllMediaElements({pause:!0})}},{key:"seekTo",value:function(e){var t=e.time,n=e.target,r=e.mediaState;if(r.isPlaying){var i=(t-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in n&&n.duration;if(Number.isNaN(o))return void this.waitForMetadata(n);var a=r.currentTimeAtLastInteraction+i;n.loop&&!1!==o&&(a%=o),n.currentTime=a}else n.pause(),n.currentTime=r.currentTimeAtLastInteraction}},{key:"waitForMetadata",value:function(e){var t=this;if(!this.metadataCallbackMap.has(e)&&"addEventListener"in e){var n=function(){t.metadataCallbackMap.delete(e);var n=t.mediaMap.get(e);n&&t.seekTo({time:t.getCurrentTime(),target:e,mediaState:n})};this.metadataCallbackMap.set(e,n),e.addEventListener("loadedmetadata",n,{once:!0})}}},{key:"getMediaStateFromMutation",value:function(e){var t,n,r,i,o,a=e.target,s=e.timeOffset,u=e.mutation,c=this.mediaMap.get(a),l=u.type,d=u.playbackRate,f=u.currentTime,h=u.muted,p=u.volume,v=u.loop;return{isPlaying:0===l||1!==l&&((null===c||void 0===c?void 0:c.isPlaying)||null!==a.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(t=null!==f&&void 0!==f?f:null===c||void 0===c?void 0:c.currentTimeAtLastInteraction)&&void 0!==t?t:0,lastInteractionTimeOffset:s,playbackRate:null!==(n=null!==d&&void 0!==d?d:null===c||void 0===c?void 0:c.playbackRate)&&void 0!==n?n:1,volume:null!==(r=null!==p&&void 0!==p?p:null===c||void 0===c?void 0:c.volume)&&void 0!==r?r:1,muted:null!==(i=null!==h&&void 0!==h?h:null===c||void 0===c?void 0:c.muted)&&void 0!==i?i:null===a.getAttribute("muted"),loop:null!==(o=null!==v&&void 0!==v?v:null===c||void 0===c?void 0:c.loop)&&void 0!==o?o:null===a.getAttribute("loop")}}},{key:"syncTargetWithState",value:function(e){var t=this.mediaMap.get(e);if(t){var n=t.muted,r=t.loop,i=t.volume,o=t.isPlaying,a=this.service.state.matches("paused"),s=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==i&&(e.volume=i),e.muted=n,e.loop=r,e.playbackRate!==s&&(e.playbackRate=s),o&&!a?e.play():e.pause()}catch(u){this.warn("Failed to replay media interactions: ".concat(u.message||u))}}}},{key:"addMediaElements",value:function(e,t,n){if(["AUDIO","VIDEO"].includes(e.nodeName)){var r=e,i=n.getMeta(r);if(i&&"attributes"in i){var o=this.service.state.matches("paused"),a=i.attributes,s=!1;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==r.getAttribute("autoplay"))&&o&&r.pause();var u=1;"number"===typeof a.rr_mediaPlaybackRate&&(u=a.rr_mediaPlaybackRate);var c=!1;c="boolean"===typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==r.getAttribute("muted");var l=!1;l="boolean"===typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==r.getAttribute("loop");var d=1;"number"===typeof a.rr_mediaVolume&&(d=a.rr_mediaVolume);var f=0;"number"===typeof a.rr_mediaCurrentTime&&(f=a.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:s,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:t,playbackRate:u,volume:d,muted:c,loop:l}),this.syncTargetWithState(r)}}}},{key:"mediaMutation",value:function(e){var t=e.target,n=e.timeOffset,r=e.mutation;this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:n,mutation:r})),this.syncTargetWithState(t)}},{key:"isSupportedMediaElement",value:function(e){return["AUDIO","VIDEO"].includes(e.nodeName)}},{key:"reset",value:function(){this.mediaMap.clear()}}]),e}(),Yt=yt||e,Qt="[replayer]",Xt={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Kt(e){return e.type==ke.tw.IncrementalSnapshot&&(e.data.source==ke.yh.TouchMove||e.data.source==ke.yh.MouseInteraction&&e.data.type==ke.Y2.TouchStart)}var Jt,en=function(){function e(t,n){var r=this;if((0,a.Z)(this,e),this.usingVirtualDom=!1,this.virtualDom=new it,this.mouseTail=null,this.tailPositions=[],this.emitter=Yt(),this.legacy_missingNodeRetryMap={},this.cache=(0,Ae.Df)(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=(0,Ae.bZ)(),this.styleMirror=new Zt.ug,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=function(e){r.iframe.style.display="inherit";for(var t=0,n=[r.mouseTail,r.iframe];t<n.length;t++){var i=n[t];i&&(i.setAttribute("width",String(e.width)),i.setAttribute("height",String(e.height)))}},this.applyEventsSynchronously=function(e){var t,n=(0,U.Z)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;switch(i.type){case ke.tw.DomContentLoaded:case ke.tw.Load:case ke.tw.Custom:continue;case ke.tw.FullSnapshot:case ke.tw.Meta:case ke.tw.Plugin:case ke.tw.IncrementalSnapshot:}r.getCastFn(i,!0)()}}catch(o){n.e(o)}finally{n.f()}},this.getCastFn=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.type){case ke.tw.DomContentLoaded:case ke.tw.Load:break;case ke.tw.Custom:t=function(){r.emitter.emit(ke.SA.CustomEvent,e)};break;case ke.tw.Meta:t=function(){return r.emitter.emit(ke.SA.Resize,{width:e.data.width,height:e.data.height})};break;case ke.tw.FullSnapshot:t=function(){var t;if(r.firstFullSnapshot){if(r.firstFullSnapshot===e)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.mediaManager.reset(),r.styleMirror.reset(),r.rebuildFullSnapshot(e,n),null===(t=r.iframe.contentWindow)||void 0===t||t.scrollTo(e.data.initialOffset)};break;case ke.tw.IncrementalSnapshot:t=function(){if(r.applyIncremental(e,n),!n&&(e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){var t,i=(0,U.Z)(r.service.state.context.events);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(!(o.timestamp<=e.timestamp)&&r.isUserInteraction(o)){o.delay-e.delay>r.config.inactivePeriodThreshold*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=o);break}}}catch(u){i.e(u)}finally{i.f()}if(r.nextUserInteractionEvent){var a=r.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/5e3),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:s}),r.emitter.emit(ke.SA.SkipStart,s)}}}}return function(){t&&t();var i,o=(0,U.Z)(r.config.plugins||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.handler&&a.handler(e,n,{replayer:r})}}catch(c){o.e(c)}finally{o.f()}r.service.send({type:"CAST_EVENT",payload:{event:e}});var s=r.service.state.context.events.length-1;if(!r.config.liveMode&&e===r.service.state.context.events[s]){var u=50;e.type===ke.tw.IncrementalSnapshot&&e.data.source===ke.yh.MouseMove&&e.data.positions.length&&(u+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout((function(){s<r.service.state.context.events.length-1||(r.backToNormal(),r.service.send("END"),r.emitter.emit(ke.SA.Finish))}),u)}r.emitter.emit(ke.SA.EventCast,e)}},!(null===n||void 0===n?void 0:n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Xt,useVirtualDom:!0,logger:console};this.config=Object.assign({},i,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(ke.SA.Resize,this.handleResize),this.setupDom();var o,s=(0,U.Z)(this.config.plugins||[]);try{for(s.s();!(o=s.n()).done;){var u=o.value;u.getMirror&&u.getMirror({nodeMirror:this.mirror})}}catch(v){s.e(v)}finally{s.f()}this.emitter.on(ke.SA.Flush,(function(){if(r.usingVirtualDom){var e={mirror:r.mirror,applyCanvas:function(e,t,n){zt({event:e,mutation:t,target:n,imageMap:r.imageMap,canvasEventMap:r.canvasEventMap,errorHandler:r.warnCanvasMutationFailed.bind(r)})},applyInput:r.applyInput.bind(r),applyScroll:r.applyScroll.bind(r),applyStyleSheetMutation:function(e,t){e.source===ke.yh.StyleSheetRule?r.applyStyleSheetRule(e,t):e.source===ke.yh.StyleDeclaration&&r.applyStyleDeclaration(e,t)},afterAppend:function(e,t){var n,i=(0,U.Z)(r.config.plugins||[]);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.onBuild&&o.onBuild(e,{id:t,replayer:r})}}catch(v){i.e(v)}finally{i.f()}}};if(r.iframe.contentDocument)try{Je(r.iframe.contentDocument,r.virtualDom,e,r.virtualDom.mirror)}catch(xt){console.warn(xt)}if(r.virtualDom.destroyTree(),r.usingVirtualDom=!1,Object.keys(r.legacy_missingNodeRetryMap).length)for(var t in r.legacy_missingNodeRetryMap)try{var n=r.legacy_missingNodeRetryMap[t],i=tt(n.node,r.mirror,r.virtualDom.mirror);Je(i,n.node,e,r.virtualDom.mirror),n.node=i}catch(u){r.warn(u)}r.constructedStyleMutations.forEach((function(e){r.applyStyleSheetMutation(e)})),r.constructedStyleMutations=[],r.adoptedStyleSheets.forEach((function(e){r.applyAdoptedStyleSheet(e)})),r.adoptedStyleSheets=[]}if(r.mousePos&&(r.moveAndHover(r.mousePos.x,r.mousePos.y,r.mousePos.id,!0,r.mousePos.debugData),r.mousePos=null),!0===r.touchActive?r.mouse.classList.add("touch-active"):!1===r.touchActive&&r.mouse.classList.remove("touch-active"),r.touchActive=null,r.lastMouseDownEvent){var o=(0,Me.Z)(r.lastMouseDownEvent,2),a=o[0],s=o[1];a.dispatchEvent(s)}r.lastMouseDownEvent=null,r.lastSelectionData&&(r.applySelection(r.lastSelectionData),r.lastSelectionData=null)})),this.emitter.on(ke.SA.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset(),r.styleMirror.reset(),r.mediaManager.reset()}));var c=new kt([],{speed:this.config.speed});this.service=Lt({events:t.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:c,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(ke.SA.StateChange,{player:e})})),this.speedService=Ot(Dt({id:"speed",context:{normalSpeed:-1,timer:c},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:Ct({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(ke.SA.StateChange,{speed:e})})),this.mediaManager=new $t({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var l=this.service.state.context.events.find((function(e){return e.type===ke.tw.Meta})),d=this.service.state.context.events.find((function(e){return e.type===ke.tw.FullSnapshot}));if(l){var f=l.data,h=f.width,p=f.height;setTimeout((function(){r.emitter.emit(ke.SA.Resize,{width:h,height:p})}),0)}d&&setTimeout((function(){var e;r.firstFullSnapshot||(r.firstFullSnapshot=d,r.rebuildFullSnapshot(d),null===(e=r.iframe.contentWindow)||void 0===e||e.scrollTo(d.data.initialOffset))}),1),this.service.state.context.events.find(Kt)&&this.mouse.classList.add("touch-device")}return(0,s.Z)(e,[{key:"timer",get:function(){return this.service.state.context.timer}},{key:"on",value:function(e,t){return this.emitter.on(e,t),this}},{key:"off",value:function(e,t){return this.emitter.off(e,t),this}},{key:"setConfig",value:function(e){var t=this;Object.keys(e).forEach((function(n){e[n],t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal(),"undefined"!==typeof e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),"undefined"!==typeof e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}},{key:"getMetaData",value:function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}},{key:"getCurrentTime",value:function(){return this.timer.timeOffset+this.getTimeOffset()}},{key:"getTimeOffset",value:function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp}},{key:"getMirror",value:function(){return this.mirror}},{key:"play",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:n}}),null===(t=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.getElementsByTagName("html")[0])||void 0===t||t.classList.remove("rrweb-paused"),this.emitter.emit(ke.SA.Start)}},{key:"pause",value:function(e){var t,n;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"===typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(n=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.getElementsByTagName("html")[0])||void 0===n||n.classList.add("rrweb-paused"),this.emitter.emit(ke.SA.Pause)}},{key:"resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(ke.SA.Resume)}},{key:"destroy",value:function(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(ke.SA.Destroy)}},{key:"startLive",value:function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}},{key:"addEvent",value:function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Kt(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))}},{key:"enableInteract",value:function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}},{key:"disableInteract",value:function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}},{key:"resetCache",value:function(){this.cache=(0,Ae.Df)()}},{key:"setupDom",value:function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(bt(this.iframe.contentWindow,this.iframe.contentDocument),(0,Zt.OK)(this.iframe.contentWindow))}},{key:"rebuildFullSnapshot",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var r=[],i=function(n,i){if(t.collectIframeAndAttachDocument(r,n),t.mediaManager.isSupportedMediaElement(n)){var o=t.service.state.context.events;t.mediaManager.addMediaElements(n,e.timestamp-o[0].timestamp,t.mirror)}var a,s=(0,U.Z)(t.config.plugins||[]);try{for(s.s();!(a=s.n()).done;){var u=a.value;u.onBuild&&u.onBuild(n,{id:i,replayer:t})}}catch(c){s.e(c)}finally{s.f()}};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),(0,Ae.VU)(e.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror}),i(this.iframe.contentDocument,e.data.node.id);for(var o=function(){var e=s[a],n=e.mutationInQueue,r=e.builtNode;t.attachDocumentToIframe(n,r),t.newDocumentQueue=t.newDocumentQueue.filter((function(e){return e!==n}))},a=0,s=r;a<s.length;a++)o();var u=this.iframe.contentDocument,c=u.documentElement,l=u.head;this.insertStyleRules(c,l),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(ke.SA.FullsnapshotRebuilded,e),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}},{key:"insertStyleRules",value:function(e,t){var n,r,i=(r=this.config.blockClass,[".".concat(r," { background: currentColor }"),"noscript { display: none !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,gt(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:ke.yh.StyleSheetRule,adds:i.map((function(e,t){return{rule:e,index:t}}))})}else{var a=document.createElement("style");e.insertBefore(a,t);for(var s=0;s<i.length;s++)null===(n=a.sheet)||void 0===n||n.insertRule(i[s],s)}}},{key:"attachDocumentToIframe",value:function(e,t){var n=this,r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=function(e,o){n.collectIframeAndAttachDocument(i,e);var a=r.getMeta(e);if((null===a||void 0===a?void 0:a.type)===Ae.Jq.Element&&"HTML"===(null===a||void 0===a?void 0:a.tagName.toUpperCase())){var s=t.contentDocument,u=s.documentElement,c=s.head;n.insertStyleRules(u,c)}if(!n.usingVirtualDom){var l,d=(0,U.Z)(n.config.plugins||[]);try{for(d.s();!(l=d.n()).done;){var f=l.value;f.onBuild&&f.onBuild(e,{id:o,replayer:n})}}catch(h){d.e(h)}finally{d.f()}}};(0,Ae.GQ)(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(var a=function(){var e=u[s],t=e.mutationInQueue,r=e.builtNode;n.attachDocumentToIframe(t,r),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==t}))},s=0,u=i;s<u.length;s++)a()}},{key:"collectIframeAndAttachDocument",value:function(e,t){var n=this;if((0,Zt.Cj)(t,this.mirror)){var r=this.newDocumentQueue.find((function(e){return e.parentId===n.mirror.getId(t)}));r&&e.push({mutationInQueue:r,builtNode:t})}}},{key:"waitForStylesheetLoad",value:function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(ke.SA.Start,a),this.emitter.on(ke.SA.Pause,a);var s=function(){t.emitter.off(ke.SA.Start,a),t.emitter.off(ke.SA.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(ke.SA.LoadStylesheetEnd),r&&clearTimeout(r),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(ke.SA.LoadStylesheetStart),r=setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}}},{key:"preloadAllImages",value:function(){return(0,Ne.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var n,r,i,o,a,s=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.service.state,n=function(){s.service.state},this.emitter.on(ke.SA.Start,n),this.emitter.on(ke.SA.Pause,n),r=[],i=(0,U.Z)(this.service.state.context.events),e.prev=6,a=(0,t.Z)().mark((function e(){var n;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=o.value).type===ke.tw.IncrementalSnapshot&&n.data.source===ke.yh.CanvasMutation&&(r.push(s.deserializeAndPreloadCanvasEvents(n.data,n)),("commands"in n.data?n.data.commands:[n.data]).forEach((function(e){s.preloadImages(e,n)})));case 2:case"end":return e.stop()}}),e)})),i.s();case 9:if((o=i.n()).done){e.next=13;break}return e.delegateYield(a(),"t0",11);case 11:e.next=9;break;case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),i.e(e.t1);case 18:return e.prev=18,i.f(),e.finish(18);case 21:return e.abrupt("return",Promise.all(r));case 22:case"end":return e.stop()}}),e,this,[[6,15,18,21]])})))}},{key:"preloadImages",value:function(e,t){if("drawImage"===e.property&&"string"===typeof e.args[0]&&!this.imageMap.has(t)){var n=document.createElement("canvas"),r=n.getContext("2d"),i=null===r||void 0===r?void 0:r.createImageData(n.width,n.height);null===i||void 0===i||i.data,JSON.parse(e.args[0]),null===r||void 0===r||r.putImageData(i,0,0)}}},{key:"deserializeAndPreloadCanvasEvents",value:function(e,n){return(0,Ne.m)(this,void 0,void 0,(0,t.Z)().mark((function r(){var i,o,a,s=this;return(0,t.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.canvasEventMap.has(n)){r.next=13;break}if(i={isUnchanged:!0},!("commands"in e)){r.next=9;break}return r.next=5,Promise.all(e.commands.map((function(e){return(0,Ne.m)(s,void 0,void 0,(0,t.Z)().mark((function n(){var r;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.args.map(jt(this.imageMap,null,i)));case 2:return r=t.sent,t.abrupt("return",Object.assign(Object.assign({},e),{args:r}));case 4:case"end":return t.stop()}}),n,this)})))})));case 5:o=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{commands:o})),r.next=13;break;case 9:return r.next=11,Promise.all(e.args.map(jt(this.imageMap,null,i)));case 11:a=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{args:a}));case 13:case"end":return r.stop()}}),r,this)})))}},{key:"applyIncremental",value:function(e,t){var n,r,i,o=this,a=e.data;switch(a.source){case ke.yh.Mutation:try{this.applyMutation(a,t)}catch(b){this.warn("Exception in mutation ".concat(b.message||b),a)}break;case ke.yh.Drag:case ke.yh.TouchMove:case ke.yh.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(n){var r={doAction:function(){o.moveAndHover(n.x,n.y,n.id,t,a)},delay:n.timeOffset+e.timestamp-o.service.state.context.baselineTime};o.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case ke.yh.MouseInteraction:if(-1===a.id)break;var u=new Event((0,Ae.UR)(ke.Y2[a.type])),c=this.mirror.getNode(a.id);if(!c)return this.debugNodeNotFound(a,a.id);this.emitter.emit(ke.SA.MouseInteraction,{type:a.type,target:c});var l=this.config.triggerFocus;switch(a.type){case ke.Y2.Blur:"blur"in c&&c.blur();break;case ke.Y2.Focus:l&&c.focus&&c.focus({preventScroll:!0});break;case ke.Y2.Click:case ke.Y2.TouchStart:case ke.Y2.TouchEnd:case ke.Y2.MouseDown:case ke.Y2.MouseUp:t?(a.type===ke.Y2.TouchStart?this.touchActive=!0:a.type===ke.Y2.TouchEnd&&(this.touchActive=!1),a.type===ke.Y2.MouseDown?this.lastMouseDownEvent=[c,u]:a.type===ke.Y2.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===ke.Y2.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,t,a),a.type===ke.Y2.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===ke.Y2.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===ke.Y2.TouchEnd?this.mouse.classList.remove("touch-active"):c.dispatchEvent(u));break;case ke.Y2.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(u)}break;case ke.yh.Scroll:if(-1===a.id)break;if(this.usingVirtualDom){var d=this.virtualDom.mirror.getNode(a.id);if(!d)return this.debugNodeNotFound(a,a.id);d.scrollData=a;break}this.applyScroll(a,t);break;case ke.yh.ViewportResize:this.emitter.emit(ke.SA.Resize,{width:a.width,height:a.height});break;case ke.yh.Input:if(-1===a.id)break;if(this.usingVirtualDom){var f=this.virtualDom.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);f.inputData=a;break}this.applyInput(a);break;case ke.yh.MediaInteraction:var h=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!h)return this.debugNodeNotFound(a,a.id);var p=h,v=this.service.state.context.events;this.mediaManager.mediaMutation({target:p,timeOffset:e.timestamp-v[0].timestamp,mutation:a});break;case ke.yh.StyleSheetRule:case ke.yh.StyleDeclaration:this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&(null===(r=this.virtualDom.mirror.getNode(a.id))||void 0===r||r.rules.push(a)):this.applyStyleSheetMutation(a);break;case ke.yh.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var m=this.virtualDom.mirror.getNode(a.id);if(!m)return this.debugNodeNotFound(a,a.id);m.canvasMutations.push({event:e,mutation:a})}else{var g=this.mirror.getNode(a.id);if(!g)return this.debugNodeNotFound(a,a.id);zt({event:e,mutation:a,target:g,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case ke.yh.Font:try{var y=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(y)}catch(b){this.warn(b)}break;case ke.yh.Selection:if(t){this.lastSelectionData=a;break}this.applySelection(a);break;case ke.yh.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a)}}},{key:"applyMutation",value:function(e,t){var n=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,vt(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(var r in this.legacy_missingNodeRetryMap)try{var i=this.legacy_missingNodeRetryMap[r],o=pt(i.node,this.virtualDom,this.mirror);o&&(i.node=o)}catch(v){this.warn(v)}var a=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter((function(t){return!!a.getNode(t.id)||(n.warnNodeNotFound(e,t.id),!1)})),e.removes.forEach((function(t){var r,i=a.getNode(t.id);if(i){var o=a.getNode(t.parentId);if(!o)return n.warnNodeNotFound(e,t.parentId);if(t.isShadow&&(0,Zt.He)(o)&&(o=o.shadowRoot),a.removeNodeFromMap(i),o)try{o.removeChild(i),n.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===o.nodeName&&(null===(r=o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}catch(v){if(!(v instanceof DOMException))throw v;n.warn("parent could not remove child in mutation",o,i,e)}}}));var s=Object.assign({},this.legacy_missingNodeRetryMap),u=[],c=function(e){var t,r;if(!n.iframe.contentDocument)return n.warn("Looks like your replayer has been destroyed.");var i=a.getNode(e.parentId);if(!i)return e.node.type===Ae.Jq.Document?n.newDocumentQueue.push(e):u.push(e);e.node.isShadow&&((0,Zt.He)(i)||i.attachShadow({mode:"open"}),i=i.shadowRoot);var o=null,c=null;if(e.previousId&&(o=a.getNode(e.previousId)),e.nextId&&(c=a.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=a.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return u.push(e);if(!e.node.rootId||a.getNode(e.node.rootId)){var l=e.node.rootId?a.getNode(e.node.rootId):n.usingVirtualDom?n.virtualDom:n.iframe.contentDocument;if((0,Zt.Cj)(i,a))n.attachDocumentToIframe(e,i);else{var d=function(e,t){if(!n.usingVirtualDom){var r,i=(0,U.Z)(n.config.plugins||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.onBuild&&o.onBuild(e,{id:t,replayer:n})}}catch(a){i.e(a)}finally{i.f()}}},f=(0,Ae.GQ)(e.node,{doc:l,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache,afterAppend:d});if(-1!==e.previousId&&-1!==e.nextId){var h=a.getMeta(i);if(h&&h.type===Ae.Jq.Element&&"textarea"===h.tagName&&e.node.type===Ae.Jq.Text){var p,v=Array.isArray(i.childNodes)?i.childNodes:Array.from(i.childNodes),m=(0,U.Z)(v);try{for(m.s();!(p=m.n()).done;){var g=p.value;g.nodeType===i.TEXT_NODE&&i.removeChild(g)}}catch(k){m.e(k)}finally{m.f()}}else if((null===h||void 0===h?void 0:h.type)===Ae.Jq.Document){var y=i;e.node.type===Ae.Jq.DocumentType&&(null===(t=y.childNodes[0])||void 0===t?void 0:t.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),"HTML"===f.nodeName&&y.documentElement&&y.removeChild(y.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?i.insertBefore(f,o.nextSibling):c&&c.parentNode?i.contains(c)?i.insertBefore(f,c):i.insertBefore(f,null):i.appendChild(f),d(f,e.node.id),n.usingVirtualDom&&"#text"===f.nodeName&&"STYLE"===i.nodeName&&(null===(r=i.rules)||void 0===r?void 0:r.length)>0&&(i.rules=[]),(0,Zt.Cj)(f,n.mirror)){var b=n.mirror.getId(f),w=n.newDocumentQueue.find((function(e){return e.parentId===b}));w&&(n.attachDocumentToIframe(w,f),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==w})))}(e.previousId||e.nextId)&&n.legacy_resolveMissingNode(s,i,f,e)}else s[e.node.id]={node:f,mutation:e}}}};e.adds.forEach((function(e){c(e)}));for(var l=Date.now();u.length;){var d=(0,Zt.s6)(u);if(u.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}var f,h=(0,U.Z)(d);try{for(h.s();!(f=h.n()).done;){var p=f.value;a.getNode(p.value.parentId)?(0,Zt.Fn)(p,(function(e){c(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",p)}}catch(m){h.e(m)}finally{h.f()}}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),(0,Zt.E2)(e.texts).forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}if(i.textContent=t.value,n.usingVirtualDom){var o=i.parentNode;(null===(r=null===o||void 0===o?void 0:o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}})),e.attributes.forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}var o=function(){if("string"===typeof s){var e=t.attributes[s];if(null===e)i.removeAttribute(s);else if("string"===typeof e)try{if("_cssText"===s&&("LINK"===i.nodeName||"STYLE"===i.nodeName))try{var o=a.getMeta(i);Object.assign(o.attributes,t.attributes);var u=(0,Ae.GQ)(o,{doc:i.ownerDocument,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache}),c=i.nextSibling,l=i.parentNode;if(u&&l)return l.removeChild(i),l.insertBefore(u,c),a.replace(t.id,u),1}catch(xt){}if("value"===s&&"TEXTAREA"===i.nodeName){var d=i;d.childNodes.forEach((function(e){return d.removeChild(e)}));var f=null===(r=i.ownerDocument)||void 0===r?void 0:r.createTextNode(e);f&&d.appendChild(f)}else i.setAttribute(s,e)}catch(v){n.warn("An error occurred may due to the checkout feature.",v)}else if("style"===s){var h=e,p=i;for(var m in h)if(!1===h[m])p.style.removeProperty(m);else if(h[m]instanceof Array){var g=h[m];p.style.setProperty(m,g[0],g[1])}else{var y=h[m];p.style.setProperty(m,y)}}}};for(var s in t.attributes)if(o())break}))}},{key:"applyScroll",value:function(e,t){var n,r,i=this.mirror.getNode(e.id);if(!i)return this.debugNodeNotFound(e,e.id);var o=this.mirror.getMeta(i);if(i===this.iframe.contentDocument)null===(n=this.iframe.contentWindow)||void 0===n||n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((null===o||void 0===o?void 0:o.type)===Ae.Jq.Document)null===(r=i.defaultView)||void 0===r||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}},{key:"applyInput",value:function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(n){}}},{key:"applySelection",value:function(e){var t=this;try{var n=new Set,r=e.ranges.map((function(e){var r=e.start,i=e.startOffset,o=e.end,a=e.endOffset,s=t.mirror.getNode(r),u=t.mirror.getNode(o);if(s&&u){var c=new Range;c.setStart(s,i),c.setEnd(u,a);var l=s.ownerDocument,d=null===l||void 0===l?void 0:l.getSelection();return d&&n.add(d),{range:c,selection:d}}}));n.forEach((function(e){return e.removeAllRanges()})),r.forEach((function(e){var t;return e&&(null===(t=e.selection)||void 0===t?void 0:t.addRange(e.range))}))}catch(i){}}},{key:"applyStyleSheetMutation",value:function(e){var t,n=null;e.styleId?n=this.styleMirror.getStyle(e.styleId):e.id&&(n=(null===(t=this.mirror.getNode(e.id))||void 0===t?void 0:t.sheet)||null),n&&(e.source===ke.yh.StyleSheetRule?this.applyStyleSheetRule(e,n):e.source===ke.yh.StyleDeclaration&&this.applyStyleDeclaration(e,n))}},{key:"applyStyleSheetRule",value:function(e,t){var n,r,i,o;if(null===(n=e.adds)||void 0===n||n.forEach((function(e){var n=e.rule,r=e.index;try{if(Array.isArray(r)){var i=(0,Zt._X)(r),o=i.positions,a=i.index;(0,Zt.md)(t.cssRules,o).insertRule(n,a)}else{var s=void 0===r?void 0:Math.min(r,t.cssRules.length);null===t||void 0===t||t.insertRule(n,s)}}catch(xt){}})),null===(r=e.removes)||void 0===r||r.forEach((function(e){var n=e.index;try{if(Array.isArray(n)){var r=(0,Zt._X)(n),i=r.positions,o=r.index;(0,Zt.md)(t.cssRules,i).deleteRule(o||0)}else null===t||void 0===t||t.deleteRule(n)}catch(xt){}})),e.replace)try{null===(i=t.replace)||void 0===i||i.call(t,e.replace)}catch(xt){}if(e.replaceSync)try{null===(o=t.replaceSync)||void 0===o||o.call(t,e.replaceSync)}catch(xt){}}},{key:"applyStyleDeclaration",value:function(e,t){e.set&&(0,Zt.md)(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority);e.remove&&(0,Zt.md)(t.rules,e.index).style.removeProperty(e.remove.property)}},{key:"applyAdoptedStyleSheet",value:function(e){var t,n=this,r=this.mirror.getNode(e.id);if(r){null===(t=e.styles)||void 0===t||t.forEach((function(e){var t,i=null,o=null;if((0,Zt.He)(r)?o=(null===(t=r.ownerDocument)||void 0===t?void 0:t.defaultView)||null:"#document"===r.nodeName&&(o=r.defaultView),o)try{i=new o.CSSStyleSheet,n.styleMirror.add(i,e.styleId),n.applyStyleSheetRule({source:ke.yh.StyleSheetRule,adds:e.rules},i)}catch(xt){}}));var i=0;!function e(t,r){var o=r.map((function(e){return n.styleMirror.getStyle(e)})).filter((function(e){return null!==e}));(0,Zt.He)(t)?t.shadowRoot.adoptedStyleSheets=o:"#document"===t.nodeName&&(t.adoptedStyleSheets=o),o.length!==r.length&&i<10&&(setTimeout((function(){return e(t,r)}),0+100*i),i++)}(r,e.styleIds)}}},{key:"legacy_resolveMissingNode",value:function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var u=a.node,c=a.mutation;t.insertBefore(u,n),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(s){var l=s.node,d=s.mutation;t.insertBefore(l,n.nextSibling),delete e[d.node.id],delete this.legacy_missingNodeRetryMap[d.node.id],(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(e,t,l,d)}}},{key:"moveAndHover",value:function(e,t,n,r,i){var o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(i,n);var a=(0,Zt.vD)(o,this.iframe),s=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left="".concat(s,"px"),this.mouse.style.top="".concat(u,"px"),r||this.drawMouseTail({x:s,y:u}),this.hoverElements(o)}},{key:"drawMouseTail",value:function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?Xt:Object.assign({},Xt,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,o=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=r,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}}},{key:"hoverElements",value:function(e){var t;null===(t=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")})),this.lastHoveredRootNode=e.getRootNode();for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}},{key:"isUserInteraction",value:function(e){return e.type===ke.tw.IncrementalSnapshot&&(e.data.source>ke.yh.Mutation&&e.data.source<=ke.yh.Input)}},{key:"backToNormal",value:function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(ke.SA.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}},{key:"warnNodeNotFound",value:function(e,t){this.warn("Node with id '".concat(t,"' not found. "),e)}},{key:"warnCanvasMutationFailed",value:function(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}},{key:"debugNodeNotFound",value:function(e,t){this.debug("Node with id '".concat(t,"' not found. "),e)}},{key:"warn",value:function(){var e;if(this.config.showWarning){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).warn.apply(e,[Qt].concat(n))}}},{key:"debug",value:function(){var e;if(this.config.showDebug){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).log.apply(e,[Qt].concat(n))}}}]),e}(),tn=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.events=[],this.castedEvents=[],this.isLive=!0,this.liveEvents=void 0,this.currentTraveledTimestamp=void 0,this.replayer=void 0,this.onEventCast=void 0,this.config={enableInteract:!1},this.useTimestampCompression=!0,this.startOptions=void 0,this.fastForward=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i,o,a,s,u,c,d,f=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f.length>1&&void 0!==f[1]&&f[1]||n.isLive){e.next=4;break}return(i=n.liveEvents).push.apply(i,(0,x.Z)(r)),e.abrupt("return");case 4:o=r.sort((function(e,t){return e.timestamp-t.timestamp})),n.useTimestampCompression&&(a=Date.now(),o=o.map((function(e,t){var r;return(0,l.Z)((0,l.Z)({},e),{},{timestamp:a+t,originalTimestamp:null!==(r=n.getOriginalTimestamp(e))&&void 0!==r?r:e.timestamp})}))),n.events=[].concat((0,x.Z)(n.events),(0,x.Z)(o)),s=new Promise((function(e){n.onEventCast=function(t){n.castedEvents.push(t),n.castedEvents.length===n.events.length&&(n.onEventCast=void 0,e())}})),u=(0,U.Z)(o);try{for(u.s();!(c=u.n()).done;)d=c.value,n.replayer.addEvent(d)}catch(t){u.e(t)}finally{u.f()}return e.abrupt("return",s);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.stop=function(){n.replayer.destroy()},this.getOriginalTimestamp=function(e){return e.originalTimestamp},this.getNodeById=function(e){return n.replayer.getMirror().getNode(e)},this.getMeta=function(e){return n.replayer.getMirror().getMeta(e)},this.config=(0,l.Z)((0,l.Z)({},this.config),i)}return(0,s.Z)(e,[{key:"start",value:function(e){var t=this;this.startOptions=e;var n=e.firstEventTimestamp,r=e.speed,i=void 0===r?8:r,o=e.useTimestampCompression,a=void 0===o||o;this.replayer=new en([],{mouseTail:!1,pauseAnimation:!1,speed:i,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0}),this.config.enableInteract?this.replayer.enableInteract():this.replayer.disableInteract(),this.useTimestampCompression=a,this.replayer.startLive(this.useTimestampCompression?Date.now():n),this.replayer.on("event-cast",(function(e){t.onEventCast&&t.onEventCast(e)}))}},{key:"goBack",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u=this,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).sleepAfter,o=void 0===i?1e3:i,a=r.beforeTimestamp,s=void 0!==a&&a,this.currentTraveledTimestamp!==n){e.next=3;break}return e.abrupt("return");case 3:return this.currentTraveledTimestamp=n,this.isLive&&(this.liveEvents=this.events),this.stop(),this.events=[],this.castedEvents=[],this.start(this.startOptions),this.isLive=!1,e.next=12,this.fastForward(this.liveEvents.filter((function(e){return s?u.getOriginalTimestamp(e)<n:u.getOriginalTimestamp(e)<=n})),!0);case 12:if(!o){e.next=15;break}return e.next=15,Ie()(o);case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"goLive",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>0&&void 0!==r[0]?r[0]:1e3,!this.isLive){e.next=3;break}return e.abrupt("return");case 3:return this.stop(),this.currentTraveledTimestamp=void 0,this.events=[],this.castedEvents=[],this.start(this.startOptions),this.isLive=!0,e.next=11,this.fastForward(this.liveEvents);case 11:if(!n){e.next=14;break}return e.next=14,Ie()(n);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),nn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.eventProcessor=void 0,this.sessionReplayer=void 0,this.eventHandlers=void 0,this.sessionReplayer=new tn(t),this.eventProcessor=new Te.u({eventHandlers:new Ee.E})}return(0,s.Z)(e,[{key:"setEventHandlers",value:function(e){this.eventHandlers=e,this.eventProcessor.setHandlers(this.eventHandlers)}},{key:"start",value:function(e){this.sessionReplayer.start(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.preCastEvent(n);case 2:return e.next=4,this.sessionReplayer.fastForward([n]);case 4:return e.next=6,this.eventProcessor.processEvent(n);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"skipEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.skipEvents(n);case 2:return e.next=4,this.sessionReplayer.fastForward(n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"stop",value:function(){this.sessionReplayer.stop()}}]),e}(),rn=function(e){(0,B.Z)(i,e);var n=(0,j.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).pageIdentifiers=void 0,e.elementSelector=new we,e.appSpecificRules=void 0,e.setEventHandlers(new Ce({sessionMirror:e.sessionReplayer,elementSelector:e.elementSelector})),e}return(0,s.Z)(i,[{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward;this.eventHandlers.setConfiguration({enableRecordingAvailableInteractableElements:t,useTextInputFastForward:n})}},{key:"setEvents",value:function(e){this.eventHandlers.setEvents(e)}},{key:"setOptions",value:function(e){this.elementSelector.setOptions({defaultExtractReducedHtmlAndSelector:e.extractReducedHTML,defaultInspectInteractableElements:e.inspectInteractables})}},{key:"setAppRules",value:function(e){this.appSpecificRules=e,this.elementSelector.setAppRules(e),this.eventHandlers.setAppRules(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Y.Z)((0,Q.Z)(i.prototype),"handleEvent",this).call(this,n);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),i}(nn),on=n(4925),an=function(e){return e.TextElementAppear="text_element_appear",e.TextElementDisappear="text_element_disappear",e.PageUrlChange="page_url_change",e.Custom="custom_assertion",e}({}),sn=function(){function e(t){var n=this;(0,a.Z)(this,e),this.urlChangeEventCallback=void 0,this.currentURL=void 0,this.originalPushState=void 0,this.originalReplaceState=void 0,this.onURLChange=function(){try{var e=Date.now();setTimeout((function(){var t=window.location.href;if(t!==n.currentURL){n.currentURL=t;var r={url:t,timestamp:e};n.urlChangeEventCallback(r)}}))}catch(xt){}},this.urlChangeEventCallback=t}return(0,s.Z)(e,[{key:"startMonitoring",value:function(){this.toggleWindowEventListeners(!0),this.overrideHistoryStateChanges(),this.currentURL=window.location.href}},{key:"stopMonitoring",value:function(){this.toggleWindowEventListeners(!1),this.restoreHistoryStateChanges()}},{key:"toggleWindowEventListeners",value:function(t){var n=this,r=t?"addEventListener":"removeEventListener";e.WINDOW_EVENTS.forEach((function(e){window[r](e,n.onURLChange)}))}},{key:"overrideHistoryStateChanges",value:function(){var e=this;this.originalPushState=window.history.pushState,this.originalReplaceState=window.history.replaceState,this.originalPushState&&(window.history.pushState=function(){e.onURLChange();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.originalPushState.apply(window.history,n)}),this.originalReplaceState&&(window.history.replaceState=function(){e.onURLChange();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.originalReplaceState.apply(window.history,n)})}},{key:"restoreHistoryStateChanges",value:function(){this.originalPushState&&(window.history.pushState=this.originalPushState),this.originalReplaceState&&(window.history.replaceState=this.originalReplaceState)}}]),e}();sn.WINDOW_EVENTS=["popstate","locationchange","hashchange"],function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Jt||(Jt={}));new WeakMap;var un=/(max|min)-device-(width|height)/,cn=(new RegExp(un.source,"g"),/([^\\]):hover/);new RegExp(cn.source,"g");var ln=function(e){return e.replace(/\u200b/g,"").trim().replace(/\s+/g," ")};function dn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,n=t.get(e);if(void 0!==n)return n;if(n={full:"",normalized:"",immediate:[]},e instanceof Element&&e.getElementsByTagName("*").length>100)return n;if(!function(e){var t=e.ownerDocument;return"SCRIPT"===e.nodeName||"NOSCRIPT"===e.nodeName||"STYLE"===e.nodeName||t.head&&t.head.contains(e)}(e)){var r="";if(e instanceof HTMLInputElement&&("submit"===e.type||"button"===e.type))n={full:e.value,normalized:ln(e.value),immediate:[e.value]};else{for(var i=e.firstChild;i;i=i.nextSibling)i.nodeType===Node.TEXT_NODE?(n.full+=i.nodeValue||"",r+=i.nodeValue||""):(r&&n.immediate.push(r),r="",i.nodeType===Node.ELEMENT_NODE&&(n.full+=dn(i,t).full));r&&n.immediate.push(r),e.shadowRoot&&(n.full+=dn(e.shadowRoot,t).full),n.full&&(n.normalized=ln(n.full))}}return t.set(e,n),n}var fn,hn=function(e,t){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,t):void 0},pn=function(e){var t=e.ownerDocument.createRange();t.selectNode(e);var n=t.getBoundingClientRect();return n.width>0&&n.height>0};function vn(e){var t=hn(e);if(!t)return!0;if("contents"===t.display){for(var n=e.firstChild;n;n=n.nextSibling){if(1===n.nodeType&&vn(n))return!0;if(3===n.nodeType&&pn(n))return!0}return!1}if(!function(e,t){var n;if(!(t=null!==(n=t)&&void 0!==n?n:hn(e)))return!0;if(Element.prototype.checkVisibility){if(!e.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!1}))return!1}else{var r=e.closest("details,summary");if(r!==e&&"DETAILS"===(null===r||void 0===r?void 0:r.nodeName)&&!r.open)return!1}return"visible"===t.visibility}(e,t))return!1;var r=e.getBoundingClientRect();return r.width>0&&r.height>0}var mn=function(e){(0,B.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r,i=e.sessionMirror,o=e.elementSelectorGenerator,s=e.assertionsConfig;return(0,a.Z)(this,n),(r=t.call(this)).sessionMirror=void 0,r.elementSelectorGenerator=void 0,r.urlObserver=void 0,r.assertionsConfig=void 0,r.isMonitoring=void 0,r.assertions=[],r.urlChangeCount=0,r.previousDomState=void 0,r.currentDomState=void 0,r.elementSelectorGenerator=o,r.sessionMirror=i,r.isMonitoring=!1,r.assertionsConfig=s,r.urlObserver=new sn(r.handleUrlChange.bind((0,_e.Z)(r))),r}return(0,s.Z)(n,[{key:"startMonitoring",value:function(){this.isMonitoring=!0,this.urlChangeCount=0,this.urlObserver.startMonitoring(),this.previousDomState=this.calculateDomState(),this.currentDomState=this.previousDomState}},{key:"calculateDomState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this.getChangedRrwebNodeIds(e),r=this.getElementByNodeId(t),i=this.getParentNodeIdByNodeId(t),o=this.getElementVisibilityByElementId(t),a=this.getMaxDistanceToTextNodeByNodeId(),s=this.getInnerTextByResolvedVisibleNodeId(t,o,i,a);return{nodeByNodeId:r,visibilityByElementId:o,parentNodeIdByNodeId:i,innerTextByResolvedVisibleNodeId:s,resolvedVisibleNodesIdsByInnerText:n.groupMapByValue(s),childrenNodeIdsByNodeId:n.groupMapByValue(i),maxDistanceToTextNodeByNodeId:a}}},{key:"createMapByNodeId",value:function(e,t,n){var r=this,i=new Map(e),o=new Set(t),a=Array.from(o),s=function(e){var t=r.getRrwebNodeId(e);void 0===t||o.has(t)||(o.add(t),a.push(t))};t.forEach((function(e){var t=r.getNodeById(e);if(t)for(var n=0;n<3&&t.parentElement&&(t.parentElement&&!(t.parentElement instanceof HTMLBodyElement));n++)t=t.parentElement,s(t)}));for(var u=0;u<a.length;u++){var c=a[u],l=this.getNodeById(c);if(l){var d=n(c,l);d!==e.get(c)&&(null===d?i.delete(c):i.set(c,d),this.getRelatedNodes(l).forEach(s))}else i.delete(c)}return i}},{key:"getElementByNodeId",value:function(e){var t,n;return this.createMapByNodeId(null!==(t=null===(n=this.previousDomState)||void 0===n?void 0:n.nodeByNodeId)&&void 0!==t?t:new Map,e,(function(e,t){return t}))}},{key:"getParentNodeIdByNodeId",value:function(e){var t,n,r=this;return this.createMapByNodeId(null!==(t=null===(n=this.previousDomState)||void 0===n?void 0:n.parentNodeIdByNodeId)&&void 0!==t?t:new Map,e,(function(e,t){if(!(t instanceof HTMLBodyElement)){if(!t.isConnected)return null;if(t.parentElement)return r.getRrwebNodeId(t.parentElement)}}))}},{key:"getElementVisibilityByElementId",value:function(e){var t,n;return this.createMapByNodeId(null!==(t=null===(n=this.previousDomState)||void 0===n?void 0:n.visibilityByElementId)&&void 0!==t?t:new Map,e,(function(e,t){if(t.nodeType===Node.ELEMENT_NODE)return vn(t)}))}},{key:"getInnerTextByResolvedVisibleNodeId",value:function(e,t,n,r){var i,o,a=this,s=null!==(i=null===(o=this.previousDomState)||void 0===o?void 0:o.innerTextByResolvedVisibleNodeId)&&void 0!==i?i:new Map,u=new Map;return this.createMapByNodeId(s,e,(function(e,i){var o,s,c;if(i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE){if(!(i.nodeType===Node.ELEMENT_NODE?t.get(e):n.get(e)&&t.get(n.get(e))))return null;var l=i.nodeType===Node.ELEMENT_NODE&&(null!==(o=r.get(e))&&void 0!==o?o:0)<=a.assertionsConfig.maxDistanceFromTextNode?dn(i,u).normalized:null!==(s=null===(c=i.textContent)||void 0===c?void 0:c.trim())&&void 0!==s?s:"";return 0===l.length||l.length>a.assertionsConfig.assertionsTextMaxLength||(i.nodeType===Node.ELEMENT_NODE?Array.from(i.childNodes).filter((function(e){return e.nodeType===Node.ELEMENT_NODE})):[]).some((function(e){return dn(e,u).normalized===l}))?null:l}}))}},{key:"getRelatedNodes",value:function(e){return e.childNodes?Array.from(e.childNodes):[]}},{key:"getRrwebNodeId",value:function(e){var t,n=null===(t=this.sessionMirror.getMeta(e))||void 0===t?void 0:t.id;if(n)return n;console.log("no meta for node",e)}},{key:"filterCoveredBranches",value:function(e,t,n){var r,i=this;if(1===e.maxDepthFromTextNode)return!0;var o=function(e){return n.innerTextByResolvedVisibleNodeId.has(i.getRrwebNodeId(e))},a=e.element;if((null!==(r=n.childrenNodeIdsByNodeId.get(e.nodeId))&&void 0!==r?r:[]).map((function(e){return n.nodeByNodeId.get(e)})).filter((function(e){return e.nodeType===Node.TEXT_NODE&&o(e)})).length>0)return!0;var s=Array.from(a.children).filter((function(e){return e instanceof HTMLElement})).filter(o);if(0===s.length)return!1;var u=s.filter((function(e){return t.some((function(t){return t.element===e}))}));return u.length!==s.length}},{key:"filterCoveredLeaves",value:function(e,t,n){var r=n.parentNodeIdByNodeId.get(e.nodeId);return!t.find((function(e){return e.nodeId===r}))}},{key:"filterUniqueTextAssertionsByTagPriority",value:function(e){var t=new Map;return e.forEach((function(e){var r=e.text,i=t.get(r);(!i||n.getTagPrecedenceIndex(e.element)<n.getTagPrecedenceIndex(i.element))&&t.set(r,e)})),Array.from(t.values())}},{key:"createAssertionsForAllElementsWithText",value:function(e,t,r,i,o){var a,s,u=this,c=null!==(a=r.resolvedVisibleNodesIdsByInnerText.get(e))&&void 0!==a?a:[],l=new Set(null!==(s=t.resolvedVisibleNodesIdsByInnerText.get(e))&&void 0!==s?s:[]);return c.filter((function(e){return!l.has(e)})).filter((function(e){var t=r.nodeByNodeId.get(e);return(null===t||void 0===t?void 0:t.nodeType)===Node.ELEMENT_NODE&&!n.EXCLUDED_TAGS_FOR_ASSERTION.includes(t.tagName)})).filter((function(e){var n=r.maxDistanceToTextNodeByNodeId.get(e),i=t.maxDistanceToTextNodeByNodeId.get(e);return n<=u.assertionsConfig.maxDistanceFromTextNode&&(!i||i<=u.assertionsConfig.maxDistanceFromTextNode)})).map((function(t){var n=r.nodeByNodeId.get(t),a=u.getLowestAncestorIdWithSameVisibility(n,i);return{type:i,text:e,element:n,nodeId:t,tag:n.tagName.toLowerCase(),timestamp:o,domTreeRootId:a,maxDepthFromTextNode:r.maxDistanceToTextNodeByNodeId.get(t)}}))}},{key:"generateAssertionsForNextTexts",value:function(e,t,r,i){var o,a=this,s=Array.from(r.resolvedVisibleNodesIdsByInnerText.keys()).filter((function(e){return!t.resolvedVisibleNodesIdsByInnerText.has(e)})).filter(this.assertionsConfig.usePlaywrightGetByText?n.canTextWorkInExactLocator:function(){return!0});if(s.length){var u=s.flatMap((function(n){return a.createAssertionsForAllElementsWithText(n,t,r,e,i)}));this.assertionsConfig.removeCoveredBranches&&(u=u.filter((function(e){return a.filterCoveredBranches(e,u,r)}))),this.assertionsConfig.removeCoveredLeaves&&(u=u.filter((function(e){return a.filterCoveredLeaves(e,u,r)}))),u=this.filterUniqueTextAssertionsByTagPriority(u);var c=this.groupAssertionByDomRoot(u);(o=this.assertions).push.apply(o,(0,x.Z)(c.map((function(e){return e.sort(n.sortByTagPrecedenceThenYPosition)}))))}}},{key:"getLowestAncestorIdWithSameVisibility",value:function(e,t){for(var n,r=this.getRrwebNodeId(e),i=t===an.TextElementAppear;e.parentElement;){var o,a=this.getRrwebNodeId(e.parentElement);if((null!==(o=this.currentDomState.visibilityByElementId.get(a))&&void 0!==o&&o)!==i)break;e=e.parentElement,r=a}return null!==(n=r)&&void 0!==n?n:-1}},{key:"groupAssertionByDomRoot",value:function(e){var t=new Map;return e.forEach((function(e){var n;t.set(e.domTreeRootId,[].concat((0,x.Z)(null!==(n=t.get(e.domTreeRootId))&&void 0!==n?n:[]),[e]))})),Array.from(t.values())}},{key:"isTextVisibilityChanged",value:function(){var e,t;return e=new Set(this.previousDomState.resolvedVisibleNodesIdsByInnerText.keys()),t=new Set(this.currentDomState.resolvedVisibleNodesIdsByInnerText.keys()),(0,x.Z)(e).some((function(e){return!t.has(e)}))||(0,x.Z)(t).some((function(t){return!e.has(t)}))}},{key:"generateAssertions",value:function(){var e=this;return this.log("possible assertions count before filtering",this.countPossibleAssertions()),this.filterAssertionsWithSameText(),this.validateAssertionsVisibilityInCurrentDom(),this.filterUrlChangeAssertionsBeforeLast(),this.log("possible assertions count after filtering",this.countPossibleAssertions()),this.getAssertionsDomSlicing().map((function(t,n){return e.assertions[n].slice(0,t)})).flat()}},{key:"getAssertionsDomSlicing",value:function(){var e=this,t=function(e){return e.reduce((function(e,t){return e+t}),0)},n=this.assertions.map((function(t){return Math.min(t.length,e.assertionsConfig.maxAssertionsPerDomTree)}));if(t(n)<=this.assertionsConfig.maxAssertions)return n;for(var r=this.assertions.map((function(){return 1})),i=0;i<this.assertions.length&&t(r)<this.assertionsConfig.maxAssertions;i++)r[i]<n[i]&&r[i]++,i===this.assertions.length-1&&(i=0);return r}},{key:"filterAssertionsWithSameText",value:function(){var e,t=new Map,n=(0,U.Z)(this.assertions);try{for(n.s();!(e=n.n()).done;){var r,i=e.value,o=(0,U.Z)(i);try{for(o.s();!(r=o.n()).done;){var a,s=r.value;if(s.type!==an.PageUrlChange){var u=s.text;t.set(u,(null!==(a=t.get(u))&&void 0!==a?a:0)+1)}}}catch(l){o.e(l)}finally{o.f()}}}catch(l){n.e(l)}finally{n.f()}for(var c=0;c<this.assertions.length;c++)this.assertions[c]=this.assertions[c].filter((function(e){return e.type===an.PageUrlChange||1===t.get(e.text)})),0===this.assertions[c].length&&(this.assertions.splice(c,1),c--)}},{key:"validateAssertionsVisibilityInCurrentDom",value:function(){for(var e=this,t=0;t<this.assertions.length;t++)this.assertions[t]=this.assertions[t].filter((function(t){var n=e.validateAssertionVisibilityInCurrentDom(t);return n||e.log("Assertion removed due to visibility validation",t),n}))}},{key:"validateAssertionVisibilityInCurrentDom",value:function(e){if(e.type===an.PageUrlChange)return!0;if(!this.assertionsConfig.usePlaywrightGetByText)return!0;var t=e.text,r=[];try{r=n.getElementsByTextWithPlaywright(t)}catch(xt){return!1}if(r.length>1)return!1;if(0===r.length)return e.type===an.TextElementDisappear;var i=r[0];return e.type===(vn(i)?an.TextElementAppear:an.TextElementDisappear)}},{key:"filterUrlChangeAssertionsBeforeLast",value:function(){var e=this.assertions.map((function(e,t){return{assertionTree:e,index:t}})).filter((function(e){var t;return(null===(t=e.assertionTree[0])||void 0===t?void 0:t.type)===an.PageUrlChange})).map((function(e){return e.index}));e.length<=1||(e.pop(),this.assertions=this.assertions.filter((function(t,n){return!e.includes(n)})))}},{key:"countPossibleAssertions",value:function(){return this.assertions.reduce((function(e,t){return e+t.length}),0)}},{key:"stopMonitoringAndGenerateAssertions",value:function(){var e=this.generateAssertions();return this.stopMonitoring(),e}},{key:"stopMonitoring",value:function(){this.isMonitoring=!1,this.urlObserver.stopMonitoring(),this.assertions=[],this.urlChangeCount=0,this.previousDomState=void 0,this.currentDomState=void 0}},{key:"handleMutation",value:function(e,t){this.isMonitoring&&(this.processMutationData(e),this.currentDomState=this.calculateDomState(e),this.isTextVisibilityChanged()&&(this.log("mutation data",e),this.generateAssertionsForNextTexts(an.TextElementDisappear,this.currentDomState,this.previousDomState,t.timestamp),this.generateAssertionsForNextTexts(an.TextElementAppear,this.previousDomState,this.currentDomState,t.timestamp),this.previousDomState=this.currentDomState))}},{key:"processMutationData",value:function(e){try{var t=function(e){var t={};return e.filter((function(e){var n=e.parentId;return t[n]=n in t?t[n]+1:0,t[n]<=50}))};e.adds=t(e.adds),e.removes=t(e.removes)}catch(xt){console.error("Error while filtering mutation data")}}},{key:"handleUrlChange",value:function(e){if(this.isMonitoring){this.urlChangeCount++;var t={type:an.PageUrlChange,url:e.url,urlChangeCount:this.urlChangeCount};this.log("new url change assertion",t),this.assertions.push([t])}}},{key:"getNodesByDepthDesc",value:function(){for(var e=[],t=[document.body];t.length>0;)e.push.apply(e,(0,x.Z)(t)),t=t.flatMap((function(e){return e.nodeType===Node.ELEMENT_NODE&&"svg"===e.tagName?[]:Array.from(e.childNodes).filter((function(e){return n.TRACKED_NODE_TYPES.includes(e.nodeType)}))}));return e.reverse()}},{key:"getMaxDistanceToTextNodeByNodeId",value:function(){var e=this,t=new Map;return this.getNodesByDepthDesc().forEach((function(r){var i=e.getRrwebNodeId(r);if(n.TRACKED_NODE_TYPES.includes(r.nodeType))if(r.nodeType===Node.TEXT_NODE){var o,a;(null!==(o=null===(a=r.textContent)||void 0===a?void 0:a.trim())&&void 0!==o?o:"")&&t.set(i,0)}else{var s=Array.from(r.childNodes).map((function(n){return t.get(e.getRrwebNodeId(n))})).filter((function(e){return void 0!==e}));s.length>0&&t.set(i,1+Math.max.apply(Math,(0,x.Z)(s)))}})),t}},{key:"getNodeById",value:function(e){var t,n,r;return null!==(t=this.sessionMirror.getNodeById(e))&&void 0!==t?t:null===(n=this.previousDomState)||void 0===n||null===(r=n.nodeByNodeId)||void 0===r?void 0:r.get(e)}},{key:"getInitialRrwebNodeIds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return[this.getRrwebNodeId(e)].concat((0,x.Z)(Array.from(e.childNodes).flatMap(this.getInitialRrwebNodeIds.bind(this))))}},{key:"filterAddsToTrackedNode",value:function(e){var t=this,n=new Map(e.map((function(e){return[e.node.id,e.parentId]})));return e.filter((function(e){return t.currentDomState.nodeByNodeId.has(function(e){for(;n.has(e);)e=n.get(e);return e}(e.node.id))}))}},{key:"getAllDescendantsIds",value:function(e){var t=this.currentDomState.childrenNodeIdsByNodeId.get(e);return t?[].concat((0,x.Z)(t),(0,x.Z)(t.flatMap(this.getAllDescendantsIds.bind(this)))):[]}},{key:"getChangedRrwebNodeIds",value:function(e){var t=this;if(!e)return new Set(this.getInitialRrwebNodeIds());var r=e.adds.filter((function(e){return e.node.type===Jt.Element&&!n.UNTRACKED_TAGS.includes(e.node.tagName)||e.node.type===Jt.Text}));r=this.filterAddsToTrackedNode(r);var i=function(e){var n=e.id;return t.currentDomState.nodeByNodeId.has(n)},o=e.removes.filter(i),a=o.flatMap((function(e){var n=e.id;return[n].concat((0,x.Z)(t.getAllDescendantsIds(n)))})),s=o.map((function(e){return e.parentId}));return new Set([].concat((0,x.Z)(r.flatMap((function(e){return[e.node.id,e.parentId]}))),(0,x.Z)(a),(0,x.Z)(s),(0,x.Z)(e.attributes.filter(i).flatMap((function(e){var n=e.id;return[n].concat((0,x.Z)(t.getAllDescendantsIds(n)))}))),(0,x.Z)(e.texts.filter(i).flatMap((function(e){var n,r,i=e.id;return[null===(n=t.currentDomState)||void 0===n||null===(r=n.parentNodeIdByNodeId)||void 0===r?void 0:r.get(i),i]})))).filter((function(e){return void 0!==e})))}},{key:"log",value:function(){var e;n.LOG_TO_CONSOLE&&(e=console).log.apply(e,arguments)}}],[{key:"groupMapByValue",value:function(e){var t=new Map;return e.forEach((function(e,n){var r=t.get(e)||[];t.set(e,[].concat((0,x.Z)(r),[n]))})),t}},{key:"canTextWorkInExactLocator",value:function(e){return n.getElementsByTextWithPlaywright(e).length<2}},{key:"getElementsByTextWithPlaywright",value:function(e){return window.playwright.getByText(e,{exact:!0}).elements}},{key:"sortByTagPrecedenceThenYPosition",value:function(e,t){var r=e.type===an.TextElementAppear,i=e.element,o=t.element,a=5e3*(n.getTagPrecedenceIndex(i)-n.getTagPrecedenceIndex(o));return r&&(a+=i.getBoundingClientRect().top-o.getBoundingClientRect().top),a}}]),n}(Ee.E);fn=mn,mn.LOG_TO_CONSOLE=!1,mn.TAG_PRECEDENCE_ORDERING=["h1","h2","h3","h4","h5","h6","a","span","div"],mn.UNTRACKED_TAGS=["script","style"],mn.TRACKED_NODE_TYPES=[Node.ELEMENT_NODE,Node.DOCUMENT_NODE,Node.TEXT_NODE],mn.EXCLUDED_TAGS_FOR_ASSERTION=["OPTION"],mn.getTagPrecedenceIndex=function(e){var t,n=fn.TAG_PRECEDENCE_ORDERING.indexOf(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase());return-1===n?fn.TAG_PRECEDENCE_ORDERING.length:n};var gn=n(408),yn=["aria-label","aria-labelledby","label","title","alt"];function bn(e){var t,n;return null!==(t=e._debugSource)&&void 0!==t&&t.fileName?null===(n=e._debugSource)||void 0===n?void 0:n.fileName:""}function wn(e,t){if("Unknown"===e)return!1;if("string"!==typeof e)return!1;if(e[0]!==e[0].toUpperCase())return!1;if(t.type.$$typeof===Symbol.for("react.context")||t.type.$$typeof===Symbol.for("react.forward_ref")||t.type.$$typeof===Symbol.for("react.memo")||t.type.$$typeof===Symbol.for("react.profiler")||t.type.$$typeof===Symbol.for("react.suspense"))return!1;var n=bn(t);return!/.*\/node_modules\//.test(n)&&e!==n&&!/^(?!.*src).*$/.test(n)}function kn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return["",{}];var n=e.type,r=n?n.name||n:"Unknown",i="";if(wn(r,e)){i+="<".concat(r,">");var o=bn(e);t[r]=o}if(e.child){var a=kn(e.child,t),s=(0,Me.Z)(a,2),u=s[0],c=s[1];i+=u,t=(0,l.Z)((0,l.Z)({},t),c)}if(wn(r,e)&&(i+="</".concat(r,">")),e.sibling){var d=kn(e.sibling,t),f=(0,Me.Z)(d,2),h=f[0],p=f[1];i+=h,t=(0,l.Z)((0,l.Z)({},t),p)}return[i,t]}function En(e){var t,n=null===(t=e._reactRootContainer)||void 0===t?void 0:t._internalRoot.current;return n||console.log("No react tree in element",e),kn(n)}var Sn=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"setPrefix",value:function(e){}}]),e}();Sn.original={};var xn,In=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.map((function(e){return e.target}))},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collectElement:!0};(0,a.Z)(this,e),this.filterElements=t,this.observeOptions=n,this.options=r,this.elements=void 0,this.observer=void 0,this.mutationEventListeners=[]}return(0,s.Z)(e,[{key:"addEventListener",value:function(e,t){this.mutationEventListeners.push({selector:e,listener:t})}},{key:"startListening",value:function(){var e=this;this.elements=[],this.observer=new MutationObserver((function(t){e.options.collectElement&&(e.elements=[].concat((0,x.Z)(e.elements),(0,x.Z)(e.filterElements(t)))),e.mutationEventListeners.length&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE){var n=t;e.mutationEventListeners.forEach((function(e){n.matches(e.selector)?e.listener(n):n.querySelectorAll(e.selector).forEach((function(t){e.listener(t)}))}))}}))}))})),this.observer.observe(document.body,this.observeOptions)}},{key:"stopListening",value:function(){return this.observer.disconnect(),this.elements}}]),e}();function Cn(e){var t=e.filter((function(e){return e.addedNodes.length>0})).reduce((function(e,t){return[].concat((0,x.Z)(e),(0,x.Z)(t.addedNodes))}),[]),n=e.filter((function(e){return"attributes"===e.type&&"style"===e.attributeName&&e.target instanceof HTMLElement&&/display\s*:\s*none/.test(e.oldValue)&&(0,v.Zl)(e.target).visible})).map((function(e){return e.target}));return[].concat((0,x.Z)(t),(0,x.Z)(n))}function Tn(e){xn=!1;var t=Mn(e);return xn?t:null}var Mn=function e(t){var n=function(e){var t=window.getComputedStyle(e).backgroundImage;if(t&&"none"!==t){var n=t.match(/url\("(.+)"\)/);if(n)return xn=!0,"BGIMG:".concat(e.tagName.toLowerCase()+n[1])}for(var r=0,i=["::before","::after"];r<i.length;r++){var o=i[r],a=window.getComputedStyle(e,o).content.replace(/['"]/g,""),s=window.getComputedStyle(e,o).fontFamily;if("none"!==a&&""!==a){xn=!0;var u=a.charCodeAt(0).toString(16).padStart(4,"0");return"FONT:".concat(e.tagName.toLowerCase()+s+u)}}return e.tagName.toLowerCase()};if(t&&t.nodeType!==Node.TEXT_NODE&&t.tagName){var r=t instanceof SVGElement?function(e){if(!(e.tagName.toLowerCase()in h))return e.tagName.toLowerCase();var t=h[e.tagName.toLowerCase()].map((function(t){return"".concat(t,":").concat(e.getAttribute(t))})).join(",");return t?(xn=!0,"SVG:".concat(t)):e.tagName.toLowerCase()}(t):t instanceof HTMLImageElement?function(e){xn=!0;var t=n(e);return"IMG:".concat(e.src)+(t!==e.tagName.toLowerCase()?"(".concat(t,")"):"")}(t):n(t);if(t.childNodes.length>0){var i=Array.from(t.childNodes).map(e).filter(Boolean).join("+");i&&i.length>0&&(r+="("+i+")")}return r}};function Nn(e,t){var n,r=function(e,t){for(var n=new Set;e;)n.add(e),e=e.parentNode;for(;t;){if(n.has(t))return t;t=t.parentNode}return null}(e,t),i=0;if(!r)return 99999;for(n=e;n&&n!==r;)i++,n=n.parentNode;for(n=t;n&&n!==r;)i++,n=n.parentNode;return i}var An=function(){function e(t,n){(0,a.Z)(this,e),this.rawDbName=t,this.storeName=n,this.db=null,this._dbName=void 0}return(0,s.Z)(e,[{key:"getDBName",value:function(){if(!this._dbName){if(!window.name){var e,t=null!==(e=window.sessionStorage.getItem("nextTabIndex"))&&void 0!==e?e:"0";window.name=t,window.sessionStorage.setItem("nextTabIndex","".concat(parseInt(t)+1))}this._dbName="".concat(this.rawDbName,"-").concat(window.name)}return this._dbName}},{key:"open",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return new Promise((function(n,r){var i=indexedDB.open(e.getDBName(),t);i.onupgradeneeded=function(t){e.db=i.result,e.db.objectStoreNames.contains(e.storeName)||e.db.createObjectStore(e.storeName)},i.onsuccess=function(t){e.db=i.result,n(e.db)},i.onerror=function(e){console.log("IndexedDBClient.open() error",e,i.error),r(i.error)}}))}},{key:"count",value:function(){var e=this;return new Promise((function(t,n){if(e.db){var r=e.db.transaction([e.storeName]).objectStore(e.storeName).count();r.onsuccess=function(){return t(r.result)},r.onerror=function(){return n(r.error)}}else n("Database has not been initialized")}))}},{key:"set",value:function(e,t){var n=this;return new Promise((function(r,i){if(n.db){var o=n.db.transaction([n.storeName],"readwrite").objectStore(n.storeName).add(e,t);o.onsuccess=function(){return r()},o.onerror=function(){return i(o.error)}}else i("Database has not been initialized")}))}},{key:"get",value:function(e,t,n){var r=this;return new Promise((function(i,o){if(r.db){var a=r.db.transaction([r.storeName]).objectStore(r.storeName),s=e?a.getAll(t,n):a.get(t);s.onsuccess=function(){return i(s.result)},s.onerror=function(){return o(s.error)}}else o("Database has not been initialized")}))}},{key:"getOne",value:function(e){return this.get(!1,e)}},{key:"getAll",value:function(e,t){return this.get(!0,e,t)}}]),e}(),_n=["element","innerText"],Dn=function(e){(0,B.Z)(i,e);var n=(0,j.Z)(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)(this,i),Sn.setPrefix("$checksum"),(e=n.call(this)).options={skipElementHighlighting:!1},e.elementSelector=void 0,e.testIdCounter=0,e.currentESRASelector=void 0,e.lastHighlights=[],e.assertionGenerator=void 0,e.initialized=!1,e.htmlReducer=void 0,e.appSpecificRules=void 0,e.config=void 0,e.rrwebEventsIndexedDB=void 0,e.rrwebEventsLoaded=!1,e.loadRRwebEvents=[],e.rrwebCrossFrameEventIdCounter=0,e.mutationDetector=void 0,e.elementSelector=new X,e.options=(0,l.Z)((0,l.Z)({},e.options),t),e.htmlReducer=new be,e}return(0,s.Z)(i,[{key:"init",value:function(e){var t,n,r,i,o=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=s.assertionGenerator,c=void 0===u||u,d=s.sessionRecorder,f=void 0===d||d,h=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.appSpecificRules=e,this.config=a,this.options=(0,l.Z)((0,l.Z)({},this.options),h),!this.initialized){this.initialized=!0;var p,v,m=f||c;if(m&&(p=new gn.L((function(e){return o.onRRwebEvent(e),o.eventProcessor.processEvent(e)})),this.initRRwebEvents()),c)this.assertionGenerator=new mn({sessionMirror:p,elementSelectorGenerator:this.elementSelector,assertionsConfig:null!==(v=this.config.assertionsConfig)&&void 0!==v?v:{maxAssertionsPerDomTree:2,maxAssertions:10,assertionsTextMaxLength:200,maxDistanceFromTextNode:2,removeCoveredLeaves:!1,removeCoveredBranches:!1,usePlaywrightGetByText:!0}});m&&p.start(),c&&this.setEventHandlers(this.assertionGenerator),q.limitChildren=null!==(t=null===(n=this.appSpecificRules)||void 0===n||null===(r=n.esraSelectionRules)||void 0===r?void 0:r.limitChildren)&&void 0!==t?t:[],q.timeout=this.config.esraTimeout,null!==(i=this.config.logPrefix)&&void 0!==i&&i.length&&Sn.setPrefix(this.config.logPrefix)}}},{key:"getElementSelector",value:function(){return this.elementSelector}},{key:"getLastSelectionLogs",value:function(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}},{key:"getBestMatchingElementSimilarityScore",value:function(e){return this.currentESRASelector=new q(e),this.currentESRASelector.selectOne().score}},{key:"extractESRAMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new V(document).extract(n).toMetadata());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"select",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.elementSelector.selector(n,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getSelectionDataForSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.elementSelector.selector(n,r);case 3:if(a=e.sent){e.next=7;break}return console.warn("could not find element for selector: "+n),e.abrupt("return",null);case 7:return e.next=9,this.elementSelector.getSelectorAndLocator(a,{testIdSelector:null===(i=this.appSpecificRules)||void 0===i||null===(o=i.esraSelectionRules)||void 0===o?void 0:o.testIdSelector});case 9:return s=e.sent,u=s.locator,e.next=13,this.extractESRAMetadata(a);case 13:return c=e.sent,e.abrupt("return",{generatedLocator:u,esraMetadata:c,selector:n,parentFramesSelectors:r});case 17:return e.prev=17,e.t0=e.catch(0),console.log("getMetadataForSelector exception",e.t0),e.abrupt("return");case 21:case"end":return e.stop()}}),e,this,[[0,17]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=h.length>1&&void 0!==h[1]?h[1]:{minSelectionScore:.3}).minSelectionScore,o=r.cachedSelector,a=r.staticMetadata,s=h.length>2&&void 0!==h[2]&&h[2],e.prev=2,!o){e.next=8;break}return console.log("Trying to locate using cached selector",o),e.next=7,this.elementSelector.selector(o);case 7:u=e.sent;case 8:if(u||(console.log("Trying to locate using ESRA",n),w(a)&&console.log("and static data",a),this.currentESRASelector=new q(n,a),(d=this.currentESRASelector.selectOne({minSelectionScore:i})).score>=i?(u=d.candidate,c=d.score,l=d.clickOffset):console.log("Best matching element was below threshold",d)),console.log(u?["Located with score ".concat(c),u]:"Element not located"),u){e.next=12;break}return e.abrupt("return");case 12:return s&&new P.t(u).scrollIntoView(),this.highlightElement(u),e.next=16,this.makeMatchingElementSelectionData(u,c);case 16:return f=e.sent,l&&(f.clickOffset=l),e.abrupt("return",f);case 21:return e.prev=21,e.t0=e.catch(2),console.log("getMatchingElementSelectionData exception",e.t0),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[2,21]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getAllInteractableElementsForLastSelectQuery",value:function(){var e=this,n=this.currentESRASelector.getFinalCandidates();return Promise.all(n.map(function(){var n=(0,r.Z)((0,t.Z)().mark((function n(r){return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=r.esraMetadata,t.next=3,e.makeMatchingElementSelectionData(r.candidate,r.score);case 3:return t.t1=t.sent,t.abrupt("return",{esraMetadata:t.t0,selectionData:t.t1});case 5:case"end":return t.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()))}},{key:"getInteractableElementsRaw",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,v.w1)());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getInteractableElements",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,v.w1)(),i=new V(document),e.abrupt("return",Promise.all(n.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.extract(n).toMetadata(),e.next=3,o.makeMatchingElementSelectionData(n);case 3:return a=e.sent,e.abrupt("return",{esraMetadata:r,selectionData:a});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getCurrentESRASelector",value:function(){return this.currentESRASelector}},{key:"startFlashingElementsDetection",value:function(){return this.htmlReducer.startFlashingElementsDetection()}},{key:"startMonitoringForAssertions",value:function(){return this.assertionGenerator.startMonitoring()}},{key:"generateAssertions",value:function(){return this.assertionGenerator.generateAssertions()}},{key:"stopMonitoringAndGenerateAssertions",value:function(){return this.assertionGenerator?this.assertionGenerator.stopMonitoringAndGenerateAssertions():(console.warn("Assertion generator not initialized, returning empty assertions"),[])}},{key:"stopMonitoring",value:function(){this.assertionGenerator.stopMonitoring()}},{key:"onRRwebEvent",value:function(e){this.rrwebEventsLoaded?this.rrwebEventsIndexedDB.set(e,this.rrwebCrossFrameEventIdCounter++):this.loadRRwebEvents.push(e)}},{key:"initRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.rrwebEventsIndexedDB=new An("checksum","rrwebEvents"),e.prev=1,e.next=4,this.rrwebEventsIndexedDB.open();case 4:e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(1),e.abrupt("return");case 9:return e.next=11,this.rrwebEventsIndexedDB.count();case 11:this.rrwebCrossFrameEventIdCounter=e.sent,this.loadRRwebEvents.forEach((function(e){n.rrwebEventsIndexedDB.set(e,n.rrwebCrossFrameEventIdCounter++)})),this.rrwebEventsLoaded=!0;case 14:case"end":return e.stop()}}),e,this,[[1,6]])})));return function(){return e.apply(this,arguments)}}()},{key:"postRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.rrwebEventsLoaded){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.rrwebEventsIndexedDB.getAll();case 4:return r=e.sent,e.abrupt("return",fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.rrwebEventsLoaded){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.rrwebEventsIndexedDB.getAll(IDBKeyRange.lowerBound(n));case 4:return r=e.sent,e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>0&&void 0!==s[0]?s[0]:{},r=s.length>1&&void 0!==s[1]?s[1]:{},i=s.length>2&&void 0!==s[2]?s[2]:document,e.next=5,this.htmlReducer.reduceHTML((0,l.Z)((0,l.Z)({},this.appSpecificRules),n),r,i);case 5:return o=e.sent,r.extractESRAForInterpretationRequiredElements&&(console.log("Extracting ESRA for interpretation required elements..."),a=this.htmlReducer.getInteractableElementsInReducedHTML(),o.elementsForNodeInterpretation=a.reduce((function(e,t){var n,r=t.checksumId,i=t.element;if(!(i instanceof HTMLElement))return e;if(null!==(n=i.innerText)&&void 0!==n&&n.trim().length)return e;var o=new V(document).extract(i).toMetadata();return[].concat((0,x.Z)(e),[{checksumId:r,esraMetadata:o}])}),[]),console.log("Done with ESRA extraction for interpretation required elements")),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getMoreItemsForTemplate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.htmlReducer.getMoreElementsFromTemplate(e,(0,l.Z)((0,l.Z)({},this.appSpecificRules),t))}},{key:"displayInterpretationForElements",value:function(e){var t=this;this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach((function(n){var r=n.checksumId,i=n.element,o=e[r];o&&(i.isConnected?t.highlightElement(i,{text:o,textType:"hover",clear:!1,textStyle:{width:"120px"}}):console.log("Element ".concat(r," is not connected to the DOM, skipping display")))}))}},{key:"overlayInteractableElementsWithChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,d,f,h,p,m=this,g=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(n=g.length>0&&void 0!==g[0]?g[0]:{}).reduceBeforeRender,i=void 0!==r&&r,o=n.mode,a=void 0===o?"full":o,s=n.textPosition,u=void 0===s?"tag"===a?"above":void 0:s,c=n.shouldFlipHighlightTextOutsideViewport,d=void 0===c||c,f=n.scrollIntoView,h=void 0!==f&&f,this.clearHighlights(),!i){e.next=5;break}return e.next=5,this.reduceHTML();case 5:p=function(e,t,n){if(t.isConnected){var r=t.getBoundingClientRect(),i=r.width,o=r.height;if(!(i<=0||o<=0)){var s=function(e){var t=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return e?t[e%t.length]:"red"}(n);m.highlightElement(t,(0,l.Z)((0,l.Z)({text:e,clear:!1,highlightStyle:{outline:"tag"===a?"3px dashed ".concat(s):"none"}},u?{textPosition:u}:{}),{},{textStyle:function(e){switch(a){case"tag":return{background:e,width:"initial",left:"-2px",border:"3px dashed ".concat(e),"font-weight":"bold"};case"full":return{background:"black",height:"100%"}}}(s),shouldFlipHighlightTextOutsideViewport:d}))}}else console.log("Element ".concat(e," is not connected to the DOM, skipping display"))},this.htmlReducer.getInteractableElementsInReducedHTML().filter((function(e){return!(0,v.GF)(e.element,(0,l.Z)((0,l.Z)({},ye),{},{scrollIntoView:h})).isHidden})).forEach((function(e,t){var n=e.checksumId,r=e.element;p(n,r,t)}));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getElementForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.htmlReducer.getSelectorForChecksumId(n);case 2:if(e.t1=r=e.sent,e.t0=null===e.t1,e.t0){e.next=6;break}e.t0=void 0===r;case 6:if(!e.t0){e.next=10;break}e.t2=void 0,e.next=11;break;case 10:e.t2=r.element;case 11:return e.abrupt("return",e.t2);case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSelectorForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.htmlReducer.getSelectorForChecksumId(n);case 2:return r=e.sent,r.element,r.innerText,i=(0,on.Z)(r,_n),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"hasInnerTextByChecksumId",value:function(e){return this.htmlReducer.hasInnerTextByChecksumId(e)}},{key:"getSelectorByPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=document.elementFromPoint(n,r),e.next=3,this.elementSelector.getSelectorAndLocator(i);case 3:return o=e.sent,a=o.selector,s=o.locator,u=o.parentFramesSelectors,e.abrupt("return",{selector:a,locator:s,parentFramesSelectors:u});case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isInput",value:function(e){var t=(0,v.RA)(e);if(t.length)return["input","textarea"].includes(t[0].tagName.toLowerCase())}},{key:"querySelectorExtended",value:function(e){return(0,v.RA)(e)}},{key:"getReactTree",value:function(e){return En(e)}},{key:"isHidden",value:function(e,t){return(0,v.GF)(e,t)}},{key:"showGrid",value:function(){this.removeGrid();var e=document.createElement("style");e.id="checksum_grid_style",e.innerHTML='\n .checksum_grid {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAJ1JREFUaEPtksEJgDAUxX73H1oRxAECkSrppacXaNI1M8f84Kz7Idf95XP0kM3yVWSzIFORikgG+lqSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddKwIpJYjK0IVicNKyKJxdiKYHXSsCKSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddLwKSLx38Oej8ZiASoSUGMAAAAASUVORK5CYII=");\n background-repeat: repeat;\n background-size: 20px;\n background-position: 0px 0px;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n z-index: 1000;\n }\n',document.body.prepend(e);var t=document.createElement("div");t.classList.add("checksum_grid"),document.body.prepend(t)}},{key:"removeGrid",value:function(){var e=document.querySelector("#checksum_grid_style");e&&e.remove();var t=document.querySelector(".checksum_grid");t&&t.remove()}},{key:"clearHighlights",value:function(){this.lastHighlights.length&&(this.lastHighlights.forEach((function(e){return e.remove()})),this.lastHighlights=[])}},{key:"highlightElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.highlightStyle,r=void 0===n?{}:n,i=t.textStyle,o=void 0===i?{}:i,a=t.mousePosition,s=t.text,u=t.textType,c=void 0===u?"static":u,l=t.textPosition,d=void 0===l?"overlap":l,f=t.textWidthType,h=void 0===f?"rect":f,p=t.clear,m=void 0===p||p,g=t.shouldFlipHighlightTextOutsideViewport,y=void 0===g||g,b=t.pointerEvents,w=t.classNames,k=void 0===w?[]:w;if(!this.options.skipElementHighlighting&&(m&&this.clearHighlights(),e)){var E=e.ownerDocument,S=(0,v.$s)(e),I=e.getBoundingClientRect(),C=E.createElement("div");if(C.style.outline="2px dashed rgba(255,0,0,.75)",C.style.position=S?"fixed":"absolute",C.style.left=I.left+"px",C.style.top=I.top+"px",C.style.width=I.right-I.left+"px",C.style.height=I.bottom-I.top+"px",C.style.pointerEvents=null!==b&&void 0!==b?b:"none",C.style.zIndex="2147483647",C.className=["checksum-dom-cache-ignore"].concat((0,x.Z)(k)).join(" "),this.mergeStyle(C,r),a){var T=E.createElement("div");if(T.style.position="absolute",T.style.left=+a.x-16+"px",T.style.top=+a.y-16+"px",T.style.color="#004DFF",T.className=["checksum-dom-cache-ignore","mouse-cross"].concat((0,x.Z)(k)).join(" "),T.style.zIndex="2147483648",!E.head.querySelector("style[role=mouse-location]")){var M=E.head.appendChild(E.createElement("style"));M.setAttribute("role","mouse-location"),M.innerHTML=".mouse-cross:before, .mouse-cross:after {position: absolute;left: 15px;content: ' ';height: 33px;width: 3px;background-color: #004DFF;}.mouse-cross:before {transform: rotate(0deg);}.mouse-cross:after {transform: rotate(-90deg);}"}E.body.appendChild(T),this.lastHighlights.push(T)}var N=E.createElement("div");s&&(N.className=["checksum-dom-cache-ignore"].concat((0,x.Z)(k)).join(" "),N.innerText=s,N.style.fontSize="12px",N.style.width="rect"===h?"".concat(I.width,"px"):"auto",N.style.background="#000000a1",N.style.color="white",N.style.padding="5px",N.style.position="absolute",N.style.pointerEvents="none",N.style.userSelect="none","above"===d?N.style.bottom="".concat(I.height,"px"):"below"===d&&(N.style.top="".concat(I.height,"px")),this.mergeStyle(N,o),C.appendChild(N),C.style.pointerEvents=null!==b&&void 0!==b?b:"none","hover"===c&&(N.style.display="none",C.addEventListener("mouseover",(function(){N.style.display="block"})),C.addEventListener("mouseout",(function(){N.style.display="none"})))),E.body.appendChild(C),"above"===d&&(0,v.ZS)(N)>0?(N.style.bottom="initial",N.style.top="".concat(I.height,"px")):"below"===d&&(0,v._N)(N)>0&&(N.style.top="initial",N.style.bottom="".concat(I.height,"px")),this.lastHighlights.push(C),y&&this.flipHighlightTextPositionOutsideViewport(N,d,I.height)}}},{key:"flipHighlightTextPositionOutsideViewport",value:function(e,t,n){"above"===t&&(0,v.ZS)(e)>0?(e.style.bottom="initial",e.style.top="".concat(n,"px")):"below"===t&&(0,v._N)(e)>0&&(e.style.top="initial",e.style.bottom="".concat(n,"px"))}},{key:"getNodeSelector",value:function(e){return(new we).getSelector(e)}},{key:"startListeningForHTMLChanges",value:function(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new In(Cn),this.mutationDetector.startListening()}},{key:"stopListeningForHTMLChanges",value:function(e){return this.mutationDetector.stopListening().map((function(e){var t,n;return null===(t=null!==(n=e.innerText)&&void 0!==n?n:e.textContent)||void 0===t?void 0:t.trim()}))}},{key:"recordScrollPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getElementForChecksumId(n);case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:(i=new P.t(r)).getScrollableParentsPositions(),r._checksumScrollHelper=i;case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"restoreScrollPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getElementForChecksumId(n);case 2:if((r=e.sent)&&"_checksumScrollHelper"in r){e.next=5;break}return e.abrupt("return");case 5:r._checksumScrollHelper.restore(),delete r._checksumScrollHelper;case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getElementCaptioningKeyForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.htmlReducer.getElementForChecksumId(n)){e.next=4;break}return console.warn("Element with checksumId ".concat(n," not found")),e.abrupt("return");case 4:return e.abrupt("return",Tn(r));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"determineClosestNode",value:function(e,t,n){return Nn(e,n)-Nn(t,n)}},{key:"addForceIncludeElement",value:function(e,t){this.htmlReducer.addForceIncludeElement({element:e,checksumid:t})}},{key:"shouldCaptionElement",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{recursive:!0}).recursive,n=this.htmlReducer.getElementForChecksumId(e);if(!n)return!1;for(var r,i=yn,o=!1,a=n,s=function(){var e=function(){var e;return o?a=null===(e=a)||void 0===e?void 0:e.parentElement:o=!0,a}();return i.some((function(t){return e.getAttribute(t)}))||e.querySelectorAll("[checksuminteractable]").length>0||1===i.filter((function(t){return e.querySelectorAll("[".concat(t,"]"))})).length?{v:!1}:t&&function(e){var t=e.parentElement;if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;var n=t.getBoundingClientRect(),r=n.width,i=n.height,o=e.getBoundingClientRect(),a=o.width,s=o.height;return Math.abs(r-a)<15&&Math.abs(i-s)<15}(e)?void 0:0};0!==(r=s());)if(r)return r.v;return!0}},{key:"mergeStyle",value:function(e,t){for(var n in t)e.style[n]=t[n]}},{key:"makeMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i,o){var a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,k,E,S,x,I,C,T;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,f=this.setAndGetTestId(n),h=this.getVisibleParent(n),p=this.setAndGetTestId(h),v=this.getElementAtCenterOfElement(n),m=this.setAndGetTestId(v),g={element:f,visibleElement:p===f?void 0:p,atPointElement:m===f||m===p?void 0:m},e.next=9,this.elementSelector.getSelectorAndLocator(n,{testIdSelector:null===(a=this.appSpecificRules)||void 0===a||null===(s=a.esraSelectionRules)||void 0===s?void 0:s.testIdSelector});case 9:return y=e.sent,e.next=12,this.elementSelector.getSelectorAndLocator(v,{testIdSelector:null===(u=this.appSpecificRules)||void 0===u||null===(c=u.esraSelectionRules)||void 0===c?void 0:c.testIdSelector});case 12:return b=e.sent,e.next=15,this.elementSelector.getSelectorAndLocator(h,{testIdSelector:null===(l=this.appSpecificRules)||void 0===l||null===(d=l.esraSelectionRules)||void 0===d?void 0:d.testIdSelector});case 15:return w=e.sent,k={element:null===y||void 0===y?void 0:y.selector,visibleElement:null===w||void 0===w?void 0:w.selector,atPointElement:null===b||void 0===b?void 0:b.selector},E={element:null===y||void 0===y?void 0:y.parentFramesSelectors,visibleElement:null===w||void 0===w?void 0:w.parentFramesSelectors,atPointElement:null===b||void 0===b?void 0:b.parentFramesSelectors},x={element:(S=function(e){return{tag:e.tagName.toLowerCase()}})(n),visibleElement:g.visibleElement?S(h):void 0,atPointElement:g.atPointElement?S(v):void 0},I=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r!==n||!o){e.next=2;break}return e.abrupt("return",o);case 2:return i=new V(document),e.abrupt("return",i.extract(r).toMetadata());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=23,I(n);case 23:if(e.t0=e.sent,!g.visibleElement){e.next=30;break}return e.next=27,I(h);case 27:e.t1=e.sent,e.next=31;break;case 30:e.t1=void 0;case 31:if(e.t2=e.t1,!g.atPointElement){e.next=38;break}return e.next=35,I(v);case 35:e.t3=e.sent,e.next=39;break;case 38:e.t3=void 0;case 39:return e.t4=e.t3,C={element:e.t0,visibleElement:e.t2,atPointElement:e.t4},T=null===y||void 0===y?void 0:y.locator,e.abrupt("return",{testIds:g,selectors:k,parentFramesSelectors:E,elementData:x,score:i,esraMetadata:C,generatedLocator:T});case 45:return e.prev=45,e.t5=e.catch(0),console.log("[makeMatchingElementSelectionData] exception",e.t5),e.abrupt("return",{testIds:{element:void 0},selectors:{element:void 0},parentFramesSelectors:{element:void 0},elementData:{element:void 0},esraMetadata:{element:void 0},generatedLocator:void 0});case 49:case"end":return e.stop()}}),e,this,[[0,45]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"getElementAtCenterOfElement",value:function(e){var t=e.getBoundingClientRect(),n=t.x,r=t.y,i=e.ownerDocument.elementFromPoint(n,r);return i instanceof HTMLElement?i:void 0}},{key:"setAndGetTestId",value:function(e){if(e){var t=e.getAttribute("data-checksum-testid");if(t)return t;var n=(this.testIdCounter++).toString();return e.setAttribute("data-checksum-testid",n),n}}},{key:"getVisibleParent",value:function(e){return e instanceof HTMLElement?null!==e.offsetParent?e:this.getVisibleParent((0,v.nq)(e)):e}}]),i}(nn),Rn=function(){function e(){(0,a.Z)(this,e),this.goals=void 0,this.goals={}}return(0,s.Z)(e,[{key:"init",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"recordGoalFinished",value:function(e){var t;console.log("Goal reached: ".concat(e)),this.goals[e]||(this.goals[e]=0),this.goals[e]+=1,null===(t=window.checksumai)||void 0===t||t.capture("goal_reached",{goalName:e})}},{key:"getGoals",value:function(){return this.goals}}]),e}(),On=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"findSequence",value:function(e,t,n){for(var r=0;r<=e.length-t.length;r++){var i=this.findMatch(r,e,t,n);if(null!==i)return i}return null}},{key:"findMatch",value:function(e,t,n,r){for(var i={},o=[],a=0;a<n.length;a++){var s=t[e+a],u=n[a];if(!this.matchItem(u,s,i,null!==r&&void 0!==r?r:s))return null;o.push(s)}return{items:o,token_values:i}}},{key:"matchItem",value:function(e,t,n,r){if(Array.isArray(e)&&Array.isArray(t))return this.matchArray(e,t,n,r);if("object"===typeof e&&null!==e&&"object"===typeof t&&null!==t){for(var i in e){var o=e[i],a=t[i];if("string"===typeof o&&o.startsWith("$")){if(void 0===n[o])n[o]={value:a,item:r};else if(n[o].value!==a)return!1}else if("object"===typeof o&&null!==o){if(!this.matchItem(o,a,n,r))return!1}else if(o!==a)return!1}return!0}return e===t}},{key:"matchArray",value:function(e,t,n,r){for(var i=0;i<=t.length-e.length;i++){var o=t.slice(i,i+e.length),a=this.findSequence(o,e,r);if(a){for(var s in a.token_values)if(void 0===n[s])n[s]={value:a.token_values[s].value,item:r};else if(n[s].value!==a.token_values[s].value)return!1;return!0}}return!1}},{key:"runExample",value:function(){var t=(new e).findSequence([{x:"banana",id:"1gf3",class:"fruit",index:"3",details:{a:1,b:2,nested:{key:"value1"}},arr:[{a:3,b:2},{a:1,b:2}]},{y:"apple",id:"4gs2",class:"fruit",parentIndex:"3",index:"7",details:{a:1,b:2,nested:{key:"value1"}}}],[{class:"$1",index:"$2",details:{a:1,b:"$3",nested:{key:"$4"}},arr:[{a:1,b:"$5"}]},{class:"$1",parentIndex:"$2",details:{a:1,b:"$3",nested:{key:"$4"}}}]);console.log(t)}}]),e}(),Ln=n(4228),Zn=function(e){(0,B.Z)(i,e);var n=(0,j.Z)(i);function i(e){var o,s=e.sessionReplayer,u=e.elementSelector;return(0,a.Z)(this,i),(o=n.call(this)).sessionReplayer=void 0,o.elementSelector=void 0,o.events=[],o.interactions=[],o.lastInteractionEventIndex=0,o.sequences=[],o.sequenceMatcher=new On,o.inputFilter=void 0,o.clickFilter=void 0,o.releasePendingInputAction=function(){clearTimeout(o.inputFilter.timeout),o.addInteraction(o.inputFilter.action),o.inputFilter=void 0},o.releasePendingClickActions=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];clearTimeout(o.clickFilter.timeout),e&&o.clickFilter.actions.forEach((function(e){return o.addInteraction(e)})),o.clickFilter=void 0},o.dragAndDropSequence={events:[{type:ke.tw.IncrementalSnapshot,data:{source:ke.yh.MouseInteraction,type:ke.Y2.MouseDown}},{type:ke.tw.IncrementalSnapshot,data:{source:ke.yh.Mutation,adds:[{parentId:"$dropzoneId",node:{id:"$draggableId"}}],removes:[{id:"$draggableId"}]}}],handler:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,a,s,u,c,l,d,f,h;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.token_values,i=r.$dropzoneId,a=r.$draggableId,s=n.items,e.next=3,o.sessionReplayer.goBack(a.item.timestamp);case 3:return u=a.value,e.next=6,o.getNodeById(u);case 6:if(c=e.sent){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,o.elementSelector.getSelector(c);case 11:return l=e.sent,e.next=14,o.sessionReplayer.goBack(i.item.timestamp);case 14:return d=i.value,e.next=17,o.getNodeById(d);case 17:if(f=e.sent){e.next=20;break}return e.abrupt("return");case 20:return e.next=22,o.elementSelector.getSelector(f);case 22:return h=e.sent,console.log("Drag and drop",l.playwrightLocator,h.playwrightLocator),e.abrupt("return",[o.makePageAction(Se.$.DragAndDrop,s[0],l,{dropTarget:{selector:h.playwrightSelector,locator:h.playwrightLocator,parentFramesSelectors:h.playwrightParentFramesSelectors,esraMetadata:h.esraMetadata}})]);case 25:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},o.maxNumberOfGetNodeRetries=3,o.sessionReplayer=s,o.elementSelector=u,o.buildSequences(),o}return(0,s.Z)(i,[{key:"getInteractions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.interactions.slice(e)}},{key:"preEvent",value:function(e){this.inputFilter&&this.isActionEvent(e)&&!this.isConsecutiveInputEvent(e)&&this.releasePendingInputAction(),this.clickFilter&&this.isActionEvent(e)&&!this.isConsecutiveClickEvent(e)&&this.releasePendingClickActions(),this.events.push(e)}},{key:"postEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.performSequenceSearch();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("performSequenceSearch",e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleInput",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=u.length>2&&void 0!==u[2]&&u[2],!this.inputFilter){e.next=5;break}return this.inputFilter.action.fillValue=n.text,this.inputFilter.timeout=this.setInputWaitTimeout(),e.abrupt("return");case 5:if(n.userTriggered){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.getNodeById(n.id);case 9:if(o=e.sent){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,this.elementSelector.getSelector(o);case 14:if(a=e.sent,(s=this.makePageAction(this.getInputEventCode(o,n),r,a)).eventCode!==Se.$.Input){e.next=20;break}return s.fillValue=n.text,this.inputFilter={action:s,nodeId:n.id,contenteditable:i,timeout:this.setInputWaitTimeout()},e.abrupt("return");case 20:s.eventCode===Se.$.UploadFiles&&(s.files=[],s.files.push(n.text)),this.addInteraction(s);case 22:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isConsecutiveInputEvent",value:function(e){return!!this.inputFilter&&(this.inputFilter.contenteditable?e.type===ke.tw.Custom&&e.data.tag===Ln.N.ContentEditableInput&&e.data.payload.id===this.inputFilter.nodeId:e.type===ke.tw.IncrementalSnapshot&&e.data.source===ke.yh.Input&&e.data.id===this.inputFilter.nodeId&&!!e.data.userTriggered)}},{key:"setInputWaitTimeout",value:function(){var e;return null!==(e=this.inputFilter)&&void 0!==e&&e.timeout&&clearTimeout(this.inputFilter.timeout),setTimeout(this.releasePendingInputAction,1e3)}},{key:"handleContentEditableInput",value:function(e,t){this.handleInput({userTriggered:!0,id:e.id,text:e.text,isChecked:void 0,source:ke.yh.Input},t,!0)}},{key:"handleKeyStroke",value:function(e,t){}},{key:"handleClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.elementSelector.getSelector(i);case 9:if(o=e.sent,a=this.makePageAction(Se.$.Click,r,o),!this.clickFilter){e.next=14;break}return this.clickFilter.actions.push(a),e.abrupt("return");case 14:this.clickFilter={actions:[a],nodeId:n.id,timeout:this.setClickWaitTimeout()};case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isConsecutiveClickEvent",value:function(e){return!!this.clickFilter&&(e.type===ke.tw.IncrementalSnapshot&&e.data.source===ke.yh.MouseInteraction&&e.data.type===ke.Y2.Click&&e.data.id===this.inputFilter.nodeId)}},{key:"setClickWaitTimeout",value:function(){var e;return null!==(e=this.clickFilter)&&void 0!==e&&e.timeout&&clearTimeout(this.clickFilter.timeout),setTimeout(this.releasePendingClickActions,600)}},{key:"handleDblClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.elementSelector.getSelector(i);case 9:o=e.sent,a=this.makePageAction(Se.$.DoubleClick,r,o),this.addInteraction(a),this.releasePendingClickActions(!1);case 13:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"buildSequences",value:function(){this.sequences.push(this.dragAndDropSequence)}},{key:"performSequenceSearch",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.events.slice(this.lastInteractionEventIndex),r=(0,U.Z)(this.sequences),e.prev=2,r.s();case 4:if((i=r.n()).done){e.next=14;break}if(o=i.value,!(a=this.sequenceMatcher.findSequence(n,o.events))){e.next=12;break}return e.next=10,o.handler(a);case 10:(s=e.sent)&&s.forEach((function(e){return u.addInteraction(e)}));case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return e.next=24,this.sessionReplayer.goLive();case 24:case"end":return e.stop()}}),e,this,[[2,16,19,22]])})));return function(){return e.apply(this,arguments)}}()},{key:"isActionEvent",value:function(e){switch(e.type){case ke.tw.Meta:return!1;case ke.tw.IncrementalSnapshot:switch(e.data.source){case ke.yh.Input:return e.data.userTriggered;case ke.yh.MouseInteraction:case ke.yh.MouseMove:return!0;default:return!1}case ke.tw.Custom:return e.data.tag===Ln.N.ContentEditableInput;default:return!1}}},{key:"addInteraction",value:function(e){this.interactions.push(e),this.lastInteractionEventIndex=this.events.length}},{key:"makePageAction",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,l.Z)({nodeId:this.interactions.length.toString(),eventCode:e,selector:n.playwrightSelector,locator:n.playwrightLocator,parentFramesSelectors:n.playwrightParentFramesSelectors,esraMetadata:n.esraMetadata,pageId:void 0,timestamp:t.timestamp},r)}},{key:"getNodeById",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).retriesLeft,o=void 0===i?this.maxNumberOfGetNodeRetries:i,a=r.useCompoundInteractableDetection,s=void 0===a||a,o){e.next=4;break}return console.error("no node"),e.abrupt("return",null);case 4:if(u=this.sessionReplayer.getNodeById(n)){e.next=9;break}return e.next=8,Ie()(100*(this.maxNumberOfGetNodeRetries-o+1));case 8:return e.abrupt("return",this.getNodeById(n,{retriesLeft:o-1,useCompoundInteractableDetection:s}));case 9:return e.abrupt("return",s?(0,v.QI)(u,[]):u);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getInputEventCode",value:function(e,t){switch(e.getAttribute("type")){case"file":return Se.$.UploadFiles;case"checkbox":case"radio":return t.isChecked?Se.$.Check:Se.$.UnCheck;default:return Se.$.Input}}}]),i}(Ee.E),Fn=function(e){return e.VisualTestGenerationProducer="VisualTestGenerationProducer",e.VisualTestGenerationConsumer="VisualTestGenerationConsumer",e}({}),Pn=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,o=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0;(0,a.Z)(this,e),this.rootDocument=i,this.defaultView=o,this.topLevelInspector=s,this.playwrightElementSelectorGenerator=void 0,this.hoveredElement=void 0,this.hoveredElementSelection=void 0,this.wasHoveredElementSelected=!1,this.selected=[],this.singleSelection=!0,this.subDocumentInspector=null,this.listening=!1,this.onMouseOver=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i,o,a,s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("getRootNode"in(i=r.composedPath()[0]))){e.next=6;break}if((o=i.getRootNode())===n.rootDocument){e.next=6;break}return n.handleSubDocument(o,n.defaultView),e.abrupt("return");case 6:if(!(i instanceof n.defaultView.HTMLIFrameElement)){e.next=9;break}return n.handleSubDocument(i.contentDocument,i.contentDocument.defaultView),e.abrupt("return");case 9:if(n.subDocumentInspector&&n.stopSubDocumentInspector(!0),i instanceof n.defaultView.Element){e.next=12;break}return e.abrupt("return");case 12:if(i!==n.hoveredElement&&!i.matches(".element-inspector-ignore")){e.next=14;break}return e.abrupt("return");case 14:return window.checksum.testGenerator.clearHighlights(),n.hoveredElement&&n.hoveredElement.removeEventListener("click",n.onClick,{capture:!0}),e.next=18,n.playwrightElementSelectorGenerator.getSelectorAndLocator(i);case 18:return a=e.sent,s=a.locator,u=a.selector,c=a.parentFramesSelectors,window.checksum.testGenerator.highlightElement(i,{text:s.replace("frameLocator('iframe').",""),textPosition:"below",textWidthType:"auto",pointerEvents:"none",classNames:["element-inspector-ignore"]}),e.next=25,n.playwrightElementSelectorGenerator.selector(u,c);case 25:(l=e.sent)!==i&&window.checksum.testGenerator.highlightElement(l,{clear:!1,pointerEvents:"none",classNames:["element-inspector-ignore"]}),n.hoveredElement=i,n.hoveredElementSelection={locator:s,selector:u,parentFramesSelectors:c},n.wasHoveredElementSelected=!1,i.addEventListener("click",n.onClick,{capture:!0});case 31:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.onClick=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.stopPropagation(),r.preventDefault(),!n.wasHoveredElementSelected){e.next=4;break}return e.abrupt("return");case 4:n.wasHoveredElementSelected=!0,n.selected.push(n.hoveredElementSelection),n.singleSelection&&(n.topLevelInspector?n.topLevelInspector.stop():n.stop()),console.log("selected",n.selected);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.handleSubDocument=function(t,r){var i;if(n.subDocumentInspector){if(n.subDocumentInspector.rootDocument===t)return!0;n.stopSubDocumentInspector(!0)}return n.subDocumentInspector=new e(t,r,null!==(i=n.topLevelInspector)&&void 0!==i?i:n),n.subDocumentInspector.start(n.singleSelection),!0},this.stopSubDocumentInspector=function(e){n.subDocumentInspector&&(n.subDocumentInspector.stop(e),n.subDocumentInspector=null)},this.playwrightElementSelectorGenerator=new X,o||(this.defaultView=this.rootDocument.nodeType===Node.DOCUMENT_NODE?this.rootDocument.defaultView:window)}return(0,s.Z)(e,[{key:"start",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.singleSelection=e,this.stop(),this.cleanSelection(),this.rootDocument.addEventListener("mouseover",this.onMouseOver),this.listening=!0}},{key:"stop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.listening&&(this.listening=!1,this.subDocumentInspector&&this.stopSubDocumentInspector(e),window.checksum.testGenerator.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0}),this.hoveredElement=null,this.wasHoveredElementSelected=!1,this.rootDocument.removeEventListener("mouseover",this.onMouseOver),e&&this.cleanSelection())}},{key:"cleanSelection",value:function(){this.subDocumentInspector&&this.subDocumentInspector.cleanSelection(),this.selected=[]}},{key:"consumeSelections",value:function(){if(this.subDocumentInspector)return this.subDocumentInspector.consumeSelections();var e=this.selected;return this.cleanSelection(),e}}]),e}(),Vn=function(e){(0,B.Z)(i,e);var n=(0,j.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).elementSelector=new we,e.elementInspector=void 0,e.lengthOfConsumedInteractions=0,e.shouldHandleEvents=!0,e}return(0,s.Z)(i,[{key:"init",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];switch(this.shouldHandleEvents=t,e){case Fn.VisualTestGenerationProducer:break;case Fn.VisualTestGenerationConsumer:this.setEventHandlers(new Zn({sessionReplayer:this.sessionReplayer,elementSelector:this.elementSelector}))}}},{key:"handleEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("starting handleEvents",r),e.prev=1,i=(0,U.Z)(n),e.prev=3,i.s();case 5:if((o=i.n()).done){e.next=13;break}return a=o.value,e.next=9,this.eventProcessor.processEvent(a,this.shouldHandleEvents);case 9:return e.next=11,this.skipEvents([a]);case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),i.e(e.t0);case 18:return e.prev=18,i.f(),e.finish(18);case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(1),console.error(e.t1);case 26:console.log("done handleEvents",r);case 27:case"end":return e.stop()}}),e,this,[[1,23],[3,15,18,21]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"consumeInteractions",value:function(){var e=this.eventHandlers.getInteractions(this.lengthOfConsumedInteractions);return this.lengthOfConsumedInteractions+=e.length,e}},{key:"setShouldHandleEvents",value:function(e){this.shouldHandleEvents=e}},{key:"startInspector",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;this.elementInspector=new Pn(null!==t&&void 0!==t?t:document.querySelector(".replayer-wrapper > iframe").contentDocument),this.elementInspector.start(e)}},{key:"stopInspector",value:function(){this.elementInspector.stop()}},{key:"consumeSelections",value:function(){return this.elementInspector.consumeSelections()}},{key:"goBack",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?this.sessionReplayer.goBack(e,t):this.goLive()}},{key:"goLive",value:function(){return this.sessionReplayer.goLive()}}]),i}(nn);!function(){var e=Element.prototype.addEventListener;Element.prototype.addEventListener=function(t,n,r){e.call(this,t,n,r),this._checksum_eventListenerList||(this._checksum_eventListenerList={}),this._checksum_eventListenerList[t]||(this._checksum_eventListenerList[t]=[]),this._checksum_eventListenerList[t].push(n)}}(),window.checksum||(window.checksum={testGenerator:new Dn,sessionDigester:new rn,goalTracker:new Rn,timeMachine:new Vn});var Bn=!!(0,i.v)().app,jn=(0,i.v)().type||Bn?o.pR.App:void 0;function Hn(){return(Hn=(0,r.Z)((0,t.Z)().mark((function e(){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=jn||o.De.appType,e.next=e.t0===o.pR.App?3:e.t0===o.pR.Script?9:10;break;case 3:return e.next=5,Promise.all([n.e(542),n.e(736)]).then(n.bind(n,9607));case 5:return r=e.sent,(0,r.bootstrapApp)(),e.abrupt("break",10);case 9:return e.abrupt("break",10);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}"true"===(0,i.v)().injectESRA&&(window.esraExtractor=new V(document),window.esraSelector=function(e){return new q(e)},window.esraMetadata=u),function(){Hn.apply(this,arguments)}()}()}();
3
- //# sourceMappingURL=main.dc7f8934.js.map
1
+ /*! For license information please see main.ef218c88.js.LICENSE.txt */
2
+ !function(){var e={603:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});var r={queryParams:void 0},i=function(){return r.queryParams||(r.queryParams=Object.fromEntries(new URLSearchParams(window.location.search).entries())),r.queryParams}},7750:function(e,t,n){"use strict";n.d(t,{k:function(){return c}});var r=n(2982),i=n(5671),o=n(3144),a=n(573),s=n(7873),u=new(function(){function e(){(0,i.Z)(this,e),this.weightsSum=0,this.config={attributes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},classes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},tagName:{decisionWeight:this.makeWeight(.6)},style:{inlineWeight:.6,computedWeight:.4,decisionWeight:this.makeWeight(.4)},innerText:{decisionWeight:this.makeWeight(.6),qualification:{exactMatchMax:20,containsMatchMax:10,maxLength:256,minLength:1},ignoreSimilarityScoreBelow:.6},innerFeatures:{decisionWeight:this.makeWeight(.8)},visualVicinity:{decisionWeight:this.makeWeight(.2)},structuralVicinity:{decisionWeight:this.makeWeight(.2)}}}return(0,o.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"get",value:function(){return this.config}},{key:"weight",value:function(e){return e/this.weightsSum}}]),e}()),c=function(){function e(t){var n=this;(0,i.Z)(this,e),this.targetElementESRAMetadata=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.unqualifiedClasses=[],this.qualifiedInnerText=void 0,this.visualVicinityComparable=[],this.structuralVicinityComparable=[],this.innerFeaturesComparable=[],this.rank=function(e){if(n.isDealBreaker(e))return{score:0,scores:{}};var t=n.tagSimilarity(e),r=n.attributesSimilarity(e),i=n.classSimilarity(e),o=n.styleSimilarity(e),a=n.innerTextSimilarity(e),s=n.innerFeaturesSimilarity(e),c=n.visualVicinitySimilarity(e),l=n.structuralVicinitySimilarity(e),d={tagScore:t,attributesScore:r,classesScore:i,styleScore:o,innerTextScore:a,innerFeaturesScore:s,visualVicinityScore:c,structuralVicinityScore:l,svgsScore:n.svgsSimilarity(e)},f={tagScore:u.weight(u.get().tagName.decisionWeight)*t,attributesScore:u.weight(u.get().attributes.decisionWeight)*r,classesScore:u.weight(u.get().classes.decisionWeight)*i,innerTextScore:u.weight(u.get().innerText.decisionWeight)*a,innerFeaturesScore:u.weight(u.get().innerFeatures.decisionWeight)*s,styleScore:u.weight(u.get().style.decisionWeight)*o,visualVicinityScore:u.weight(u.get().visualVicinity.decisionWeight)*c,structuralVicinityScore:u.weight(u.get().structuralVicinity.decisionWeight)*l};return{score:Object.values(f).reduce((function(e,t){return e+t}),0),scores:d}},this.targetElementESRAMetadata=t,this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}return(0,o.Z)(e,[{key:"getQualifiedAttributes",value:function(){return this.qualifiedAttributes}},{key:"getQualifiedClasses",value:function(){return this.qualifiedClasses}},{key:"getQualifiedInnerText",value:function(){return this.qualifiedInnerText}},{key:"setQualifiedAttributes",value:function(){var e=this.targetElementESRAMetadata.attributes,t=this.makeQualifiedAttributes(e),n=t.qualifiedAttributes,r=t.qualifiedAttributesMap;this.qualifiedAttributes=n,this.qualifiedAttributesMap=r}},{key:"makeQualifiedAttributes",value:function(e,t){var n=Object.keys(e).filter((function(n){if("input"===t)if("value"===n)return!1;var r=e[n];for(var i in r)i.endsWith("Uniqenuess")&&(r[i.replace("Uniqenuess","Uniqueness")]=r[i]);return r.globalUniqueness>u.get().attributes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.get().attributes.qualification.tagUniquenessThreshold})),r=n.reduce((function(t,n){return t[n]=e[n].value,t}),{});return{qualifiedAttributes:n,qualifiedAttributesMap:r}}},{key:"setQualifiedClasses",value:function(){var e=this;this.qualifiedClasses=this.makeQualifiedClasses(this.targetElementESRAMetadata.classes),this.unqualifiedClasses=Object.keys(this.targetElementESRAMetadata.classes).filter((function(t){return!e.qualifiedClasses.includes(t)}))}},{key:"isValidClass",value:function(e){return/^[A-Za-z_-][0-9A-Za-z_-]*$/.test(e)}},{key:"makeQualifiedClasses",value:function(e){var t=this;return Object.keys(e).filter((function(n){var r=e[n];return!!t.isValidClass(n)&&(!n.startsWith("jss")&&!n.startsWith("css-")&&":hover"!==n&&(r.globalUniqueness>u.get().classes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.get().classes.qualification.tagUniquenessThreshold))}))}},{key:"setQualifiedInnerText",value:function(){this.qualifiedInnerText=this.makeQualifiedInnerText(this.targetElementESRAMetadata.innerText)}},{key:"makeQualifiedInnerText",value:function(e){var t,n;return e&&(null===(t=e.content)||void 0===t?void 0:t.length)<=u.get().innerText.qualification.maxLength&&(null===(n=e.content)||void 0===n?void 0:n.length)>=u.get().innerText.qualification.minLength?e:null}},{key:"makeBasicElementPropertiesComparable",value:function(e){var t=this;return e.reduce((function(e,n){var i=n.position?"".concat(n.tag,".").concat(n.position.slice(0,2).join(",")):n.tag,o="".concat(i,"+").concat(n.relativePosition),a=t.makeQualifiedClasses(n.classes).map((function(e){return"".concat(i,".").concat(e)})),u=[];t.makeQualifiedAttributes(n.attributes).qualifiedAttributes.forEach((function(e){u.push("".concat(i,"[").concat(e,"]")),u.push("".concat(i,"[").concat(e,"]=").concat(n.attributes[e].value))}));var c=n.feature?t.makeInnerFeaturesComparable([n.feature],{customTag:i,includeTag:!1,featureTypeWhiteList:[s.EI.SVG]}):[],l=[].concat((0,r.Z)(e),[i,o],(0,r.Z)(a),u,(0,r.Z)(c));return n.text&&(l.push("".concat(i,"<>")),l.push("".concat(i,"<").concat(n.text,">"))),n.distance&&(l.push("".concat(i,"->").concat(n.distance)),l.push("".concat(i,"->[]").concat(t.getDistanceRange(n.distance)))),l}),[])}},{key:"getDistanceRange",value:function(e){for(var t=[10,20,30,40,50,60,70,80,90,100],n=0,r=t;n<r.length;n++){var i=r[n];if(e<i)return i}return t[t.length-1]}},{key:"setVisualVicinityComparable",value:function(){this.visualVicinityComparable=this.makeVisualVicinityComparable(this.targetElementESRAMetadata.visualVicinity)}},{key:"makeVisualVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"setStructuralVicinityComparable",value:function(){this.structuralVicinityComparable=this.makeStructuralVicinityComparable(this.targetElementESRAMetadata.structuralVicinity)}},{key:"makeStructuralVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"makeInnerFeaturesComparable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.customTag,i=void 0===n?void 0:n,o=t.includeTag,a=void 0===o||o,u=t.featureTypeWhiteList,c=void 0===u?void 0:u;return e.reduce((function(e,t){if(c&&!c.includes(t.type)||t.isHidden)return e;var n=null!==i&&void 0!==i?i:t.tag,o=a?[].concat((0,r.Z)(e),[n]):e;switch(t.type){case s.EI.Button:o.push("".concat(n,"[type=").concat(t.buttonType,"]"));break;case s.EI.Input:t.inputType&&o.push("".concat(n,"[type=").concat(t.inputType,"]")),t.placeholder&&o.push("".concat(n,"[placeholder=").concat(t.placeholder,"]"));break;case s.EI.SVG:t.components.forEach((function(e){var t=[];for(var r in e.attributes)t.push("[".concat(r,"=").concat(e.attributes[r],"]"));o.push("".concat(n).concat(t.join("")))}))}return"text"in t&&t.text&&(o.push("".concat(n,"<>")),o.push("".concat(n,"<").concat(t.text,">"))),o}),[])}},{key:"setInnerFeaturesComparable",value:function(){this.innerFeaturesComparable=this.makeInnerFeaturesComparable(this.targetElementESRAMetadata.innerFeatures)}},{key:"isDealBreaker",value:function(e){if("input"===this.targetElementESRAMetadata.tag&&"input"===e.tag){var t=function(e){return e.type?e.type.value:"text"};if(t(this.targetElementESRAMetadata.attributes)!==t(e.attributes))return!0}return!1}},{key:"tagSimilarity",value:function(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}},{key:"attributesSimilarity",value:function(e){var t=this,n=function(e){return[].concat((0,r.Z)(t.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},i=this.makeQualifiedAttributes(e.attributes).qualifiedAttributesMap;return this.jaccard(n(this.qualifiedAttributesMap),n(i))}},{key:"indicativeAttributesSimilarity",value:function(e){return this.qualifiedAttributesMap.placehoder&&e.attributes.placehoder&&this.qualifiedAttributesMap.placehoder===e.attributes.placehoder.value?1:0}},{key:"classSimilarity",value:function(e){return this.jaccard(this.qualifiedClasses,this.makeQualifiedClasses(e.classes))}},{key:"innerTextSimilarity",value:function(e){var t=this;if(!this.targetElementESRAMetadata.innerText&&!e.innerText)return 1;var n=this.makeQualifiedInnerText(e.innerText);if(!this.qualifiedInnerText||!n)return 0;if(this.qualifiedInnerText.content===n.content)return 1;Object.values({email:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,url:/^(http|https):\/\/[^ "]+$/}).forEach((function(e){if(e.test(t.qualifiedInnerText.content)&&e.test(n.content))return.5}));try{return new Date(this.qualifiedInnerText.content),new Date(n.content),.5}catch(i){}var r=function(e){return e.replace(/\d/g,"d").replace(/[a-zA-Z]/g,"s")};return r(this.qualifiedInnerText.content)===r(n.content)?.5:0}},{key:"innerFeaturesSimilarity",value:function(e){return this.jaccard(this.innerFeaturesComparable,this.makeInnerFeaturesComparable(e.innerFeatures))}},{key:"visualVicinitySimilarity",value:function(e){return this.jaccard(this.visualVicinityComparable,this.makeVisualVicinityComparable(e.visualVicinity))}},{key:"structuralVicinitySimilarity",value:function(e){return this.jaccard(this.structuralVicinityComparable,this.makeStructuralVicinityComparable(e.structuralVicinity))}},{key:"styleSimilarity",value:function(e){var t,n,i,o,a=this,s=function(e){return[].concat((0,r.Z)(a.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},c=this.jaccard(s(null!==(t=this.targetElementESRAMetadata.style.inline)&&void 0!==t?t:{}),s(null!==(n=e.style.inline)&&void 0!==n?n:{})),l=this.jaccard(s(null!==(i=this.targetElementESRAMetadata.style.computed)&&void 0!==i?i:{}),s(null!==(o=e.style.computed)&&void 0!==o?o:{}));return c*u.get().style.inlineWeight+l*u.get().style.computedWeight}},{key:"svgsSimilarity",value:function(e){return this.targetElementESRAMetadata.svgs||e.svgs?this.targetElementESRAMetadata.svgs&&e.svgs&&JSON.stringify(this.targetElementESRAMetadata.svgs)===JSON.stringify(e.svgs)?1:0:1}},{key:"keyValueObjectToArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"=",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return Object.keys(e).map((function(r){return"".concat(r).concat(t).concat(function(t){return n?n(e,t):e[t]}(r))}))}},{key:"jaccard",value:function(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,a.$m)(e,t)}}]),e}()},7873:function(e,t,n){"use strict";n.d(t,{BM:function(){return o},EI:function(){return r},Qy:function(){return a},i7:function(){return i}});var r=function(e){return e[e.Media=0]="Media",e[e.NoData=1]="NoData",e[e.Anchor=2]="Anchor",e[e.Button=3]="Button",e[e.Input=4]="Input",e[e.Text=5]="Text",e[e.SVG=6]="SVG",e}({}),i=function(e){return e.Element="element",e.Parent="parent",e.Child="child",e.LeftSibling="left-sibling",e.RightSibling="right-sibling",e}({}),o=function(e){return e.Center="center",e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right",e.TopRight="top-right",e.TopLeft="top-left",e.BottomRight="bottom-right",e.BottomLeft="bottom-left",e}({}),a=function(e){return e[e.Query=0]="Query",e[e.Intersection=1]="Intersection",e[e.Interactables=2]="Interactables",e[e.All=3]="All",e}({})},1855:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});var r=function(e){return e.Click="click",e.DoubleClick="double_click",e.DragAndDrop="drag_and_drop",e.Input="input",e.ClickAndType="click_and_type",e.ClearAndType="clear_and_type",e.Check="check",e.UnCheck="uncheck",e.Hover="hover",e.Navigation="navigation",e.Keystroke="keystroke",e.SelectOption="selectoption",e.UploadFiles="upload_files",e.GetMoreItems="get_more_items",e.Wait="wait",e.SwitchTab="switch_tab",e.CustomCode="custom_code",e}({})},9478:function(e,t,n){"use strict";n.d(t,{De:function(){return o},hj:function(){return i},pR:function(){return r}});var r=function(e){return e.Script="script",e.App="app",e}({}),i=function(e){return e.TodoListApp="todo",e.ReplayerApp="replayer",e.SessionGraphApp="sessiongraph",e}({}),o={appType:"script",testAppName:"todo"}},1209:function(e,t,n){"use strict";n.d(t,{J:function(){return s}});var r=n(1413),i=n(5671),o=n(3144),a=n(458),s=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.target,o=void 0===r?document:r,a=n.disabled,s=void 0!==a&&a,u=n.log,c=void 0===u||u,l=n.name,d=n.monitorInput,f=void 0!==d&&d;(0,i.Z)(this,e),this.target=void 0,this.name=void 0,this.disabled=void 0,this.logActivity=void 0,this.monitorInput=void 0,this.cache=void 0,this.observer=void 0,this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid"],this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"],this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"],this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(","),this.shouldIgnoreMutationRecord=function(e){try{if("attributes"===e.type&&t.ignoreMutationsWithAttributes.includes(e.attributeName))return!0;if("attributes"===e.type&&t.ignoreMutationsWithAttributeRegexPatterns.some((function(t){return new RegExp("^"+t+"$").test(e.attributeName)})))return!0;if("attributes"===e.type&&"class"===e.attributeName){var n=function(e){return e.split(" ").filter((function(e){return![":hover","rrweb-paused"].includes(e)})).sort().join(" ")};return n(e.oldValue)===n(e.target.className)}var r=function(e){return t.ignoreElementsWithClasses.some((function(t){return e.classList.contains(t)}))};if("childList"===e.type&&Array.from(e.addedNodes).every((function(e){return r(e)}))&&Array.from(e.removedNodes).every((function(e){return r(e)})))return!0}catch(i){}return!1},this.monitoredTextElements=[],this.monitorInputEnabledElement=function(e){e.addEventListener("input",(function(e){t.invalidate()}))},this.target=o,this.name=l,this.disabled=s,this.logActivity=c,this.monitorInput=f,this.startObserver()}return(0,o.Z)(e,[{key:"startObserver",value:function(){var e=this;this.observer=new MutationObserver((function(t){t.every(e.shouldIgnoreMutationRecord)||(e.invalidate(),e.monitorInput&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE){var n=t;n.matches(e.inputEnabledSelectors)||n.isContentEditable?e.monitorInputEnabledElement(n):Array.from(n.querySelectorAll("*")).filter((function(t){return t.matches&&t.matches(e.inputEnabledSelectors)||t.isContentEditable})).forEach(e.monitorInputEnabledElement)}}))})))})),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.monitorInput&&this.startInputMonitoring()}},{key:"startInputMonitoring",value:function(){this.monitoredTextElements=(0,a.RA)(this.inputEnabledSelectors),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}},{key:"get",value:function(){return this.log("get","has cache:",!!this.cache),this.cache}},{key:"set",value:function(e){this.disabled||(this.cache=e)}},{key:"hasCache",value:function(){return this.log("hasCache",!!this.cache),!!this.cache}},{key:"invalidate",value:function(){this.set(void 0)}},{key:"log",value:function(){var e;if(this.logActivity){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).log.apply(e,["[DOMMutationDependentCache] ".concat(this.name?"[".concat(this.name,"]"):"",":")].concat(n))}}}],[{key:"getInstance",value:function(t,n){var i,o=this.makeNameForCache(t,null===n||void 0===n?void 0:n.flags);e.instances[o]||(e.instances[o]=new e((0,r.Z)((0,r.Z)({},n),{},{name:null!==(i=null===n||void 0===n?void 0:n.name)&&void 0!==i?i:t})),null!==n&&void 0!==n&&n.initialValue&&e.instances[o].set(null===n||void 0===n?void 0:n.initialValue));var a=e.instances[o];return null!==n&&void 0!==n&&n.invalidate&&a.invalidate(),a}},{key:"invalidateAll",value:function(){Object.values(e.instances).forEach((function(e){return e.invalidate()}))}},{key:"makeNameForCache",value:function(e,t){return"".concat(e).concat(t?JSON.stringify(t):"")}}]),e}();s.instances={}},458:function(e,t,n){"use strict";n.d(t,{$s:function(){return D},C0:function(){return w},Du:function(){return g},Ey:function(){return c},GF:function(){return M},GU:function(){return C},MX:function(){return l},PZ:function(){return x},QI:function(){return m},RA:function(){return b},ZH:function(){return S},ZS:function(){return O},Zl:function(){return I},_N:function(){return L},ko:function(){return N},m7:function(){return R},mn:function(){return k},nq:function(){return E},w1:function(){return v}});var r=n(7762),i=n(885),o=n(1413),a=n(2982),s=n(5034),u=n(1209);window.DOMMutationDependentCache=u.J;var c=function(e){},l=function(e){},d=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]',"label[for]"],f=["pointer","grab","text","vertical-text","zoom-in","zoom-out","help"],h=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle","onMouseEnter"],p=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle","onmouseenter"],v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.allowDisabled,i=void 0!==r&&r,o=n.useDataVisibleAttributes,s=void 0===o||o,v=n.excludeCrossOriginIframes,y=void 0!==v&&v,g=u.J.getInstance("getAllInteractableHTMLElements",{target:e,log:!1}),w=Date.now(),k=function(e){var t=e.reduce((function(e,t){return!i&&t.state.disabled?e:[].concat((0,a.Z)(e),[t.element])}),[]);return console.log("[getAllInteractableHTMLElements] done, took",Date.now()-w,"ms"),t};if(g.hasCache())return k(g.get());var S=b("*",e,{excludeCrossOriginIframes:y});c("[getAllInteractableHTMLElements] items");var E=S.reduce((function(e,n){var r,i="disabled"in n&&n.disabled;return n.matches(d.concat(t.appSpecificInteractableElementsSelectors||[]).filter((function(e){return!!e})).join(","))||f.includes(window.getComputedStyle(n).cursor)||n.isContentEditable&&!(null!==(r=n.parentElement)&&void 0!==r&&r.isContentEditable)||!t.ignoreEventListenersWhenDeterminingInteractability&&(p.some((function(e){return n[e]}))||function(e){if(e._checksum_eventListenerList){var t=e._checksum_eventListenerList;if(p.some((function(e){return t[e.slice(2)]})))return!0}var n=Object.keys(e).find((function(e){return e.startsWith("__reactFiber")})),r=n?e[n]:void 0;return!(!r||!r.memoizedProps)&&h.some((function(e){return r.memoizedProps[e]}))}(n))?[].concat((0,a.Z)(e),[{element:n,disabled:i}]):e}),[]);l("[getAllInteractableHTMLElements] items"),c("[getAllInteractableHTMLElements] getCompoundInteractableRootElement");var x=E.reduce((function(e,n){var r=m(n.element,t.appSpecificInteractableElementsSelectors||[]),i=e.find((function(e){return e.element===r}));return i?!n.disabled&&i.state.disabled&&(i.state.disabled=!1):e.push({element:r,state:{disabled:n.disabled}}),e}),[]);l("[getAllInteractableHTMLElements] getCompoundInteractableRootElement"),c("[getAllInteractableHTMLElements] isElementHidden");var I=x.filter((function(e){var t=e.element;if(s){if(!t)return!1;var n=t.getAttribute("checksum-data-visible");if(n){var r="true"===n,i="true"===t.getAttribute("checksum-data-visible-under-transparent-element"),o="true"===t.getAttribute("checksum-data-transparently-visible");return r&&!i||o}}return!M(t,{markTransparentElementsAsHidden:!1}).isHidden}));return l("[getAllInteractableHTMLElements] isElementHidden"),g.set(I),k(I)},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return e;var n=window.getComputedStyle(e).cursor,r=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!1},r=e;r;){var i=r.parentElement;if(!i||i.nodeType!==Node.ELEMENT_NODE)return r;if(t(i))break;if(window.getComputedStyle(i).cursor!==n)return r;r=i}};try{if("isContentEditable"in e&&e.isContentEditable)return e;if("closest"in e){var i=g(e,d.concat(t).filter((function(e){return!!e})).join(","));if(i&&function(e){try{if(e.matches("label[for]")&&!e.matches(d.concat(t).filter((function(e){return!!e&&"label[for]"!==e})).join(","))){var n=e.getAttribute("for"),r=document.getElementById(n);return!!r&&"input"===r.tagName.toLowerCase()&&["checkbox","radio"].includes(r.getAttribute("type"))}}catch(i){console.error("interactableParentIsValid",e,i)}return!0}(i)){if(i===e)return e;var o=r(e,(function(e){return e===i}));return o||i}}if(["auto","default","context-menu","help","progress","wait"].includes(n))return e;var a=r(e);return a||e}catch(s){return console.error("getCompoundInteractableRootElement",e,s),e}};function y(e){if(!e.src)return!0;var t=window.location.origin;try{return t!==new URL(e.src).origin}catch(n){return!1}}var g=function e(t,n){if(t.matches(n))return t;var r=t.slot;if(r){for(var i=t.parentElement;i;){if(i.shadowRoot){var o=i.shadowRoot.querySelector('slot[name="'.concat(r,'"]'));if(o)return e(o,n)}i=i.parentElement}return null}var a=t.closest(n);if(a)return a;var s=t.getRootNode();return s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e(s.host,n):null},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.excludeCrossOriginIframes,i=void 0!==r&&r,o=n.includeHTML,a=void 0!==o&&o,s=[];return function t(n){!function(t){t.querySelectorAll(e).forEach((function(e){return s.push(e)}))}(n);var r=[];!function e(t){var n;t.shadowRoot&&r.push(t.shadowRoot),null===(n=t.childNodes)||void 0===n||n.forEach((function(t){return e(t)}))}(n),r.forEach((function(e){return t(e)})),n.querySelectorAll("iframe").forEach((function(e){if(!i||!y(e))try{var n=e.contentDocument;n&&t(n)}catch(r){return}}))}(t),a&&t instanceof Document&&t.documentElement.matches(e)&&s.push(t.documentElement),s};function w(e){var t=e.getRootNode();return t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?function(e,t){var n=e.querySelectorAll("slot");if(!n.length)return e.innerText;var r=e.cloneNode(!0),i=r.querySelectorAll("slot");return n.forEach((function(e,t){var n=e.assignedNodes();i[t].innerText=n.map((function(e){switch(e.nodeType){case Node.TEXT_NODE:return e.textContent;case Node.ELEMENT_NODE:return e.innerText}})).filter((function(e){return!!e})).join("\n")})),r.innerText.trim()}(e):e.innerText}var k=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).flattenShadowRootChildren,n=void 0!==t&&t,r=Array.from(e.childNodes);if(e.nodeType===Node.ELEMENT_NODE){var i,o=e;if(o.shadowRoot&&(r=r.filter((function(e){return!e.assignedSlot})),n?r=r.concat(Array.from(o.shadowRoot.childNodes)):r.push(o.shadowRoot)),"slot"===o.tagName.toLowerCase())(i=r).push.apply(i,(0,a.Z)(o.assignedNodes()))}return r},S=function(e){var t,n,r=Array.from(e.children);e.shadowRoot&&(t=r=r.filter((function(e){return!e.assignedSlot}))).push.apply(t,(0,a.Z)(Array.from(e.shadowRoot.children)));"slot"===e.tagName.toLowerCase()&&(n=r).push.apply(n,(0,a.Z)(e.assignedElements()));return r},E=function(e){var t=e.parentElement;if(t)return t;switch(e.nodeType){case Node.ELEMENT_NODE:var n=e;if(n.assignedSlot)return n.assignedSlot;break;case Node.DOCUMENT_FRAGMENT_NODE:return e.host}var r=e.parentNode;if(r)switch(r.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return r.host;case Node.DOCUMENT_NODE:if(window.document===r)return null;var i=Array.from(window.document.querySelectorAll("iframe")).find((function(e){return e.contentDocument===r}));if(i)return i}return null};function x(e){if(!e)return!1;var t=e.getBoundingClientRect();return t.top<=window.innerHeight&&t.left<=window.innerWidth&&t.bottom>=0&&t.right>=0}function I(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=window.getComputedStyle(e),r="0"===n.opacity;return{visible:"hidden"!==n.visibility&&"none"!==n.display&&(!t||!r),isTransparent:r}}function C(e,t){var n,r;return null!==(n=null!==t&&void 0!==t?t:null===e||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)&&void 0!==n?n:window}function M(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.markTransparentElementsAsHidden,u=void 0===a||a,c=n.markElementsHiddenByTransparentElementAsVisible,l=void 0!==c&&c,d=n.scrollIntoView,f=void 0===d||d,h=n.useCache,p=void 0!==h&&h;if(p){var v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=T(t);return n.has(e)?n.get(e):void 0}(e,{markTransparentElementsAsHidden:u,markElementsHiddenByTransparentElementAsVisible:l,scrollIntoView:f});if(v)return v}var m={isHidden:!0},y=function(n){return(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t&&t.restore(),p&&_(e,n,{markTransparentElementsAsHidden:u,markElementsHiddenByTransparentElementAsVisible:l}),(0,o.Z)((0,o.Z)({},m),n)};if(!e)return y({isHidden:!0});var g=I(e="OPTION"===e.tagName&&(e.closest("select")||e.closest("datalist"))||e,u),w=g.visible,k=g.isTransparent;if(m.isTransparent=k,!w)return y({isHidden:!0});if(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.scrollIntoView,i=void 0===r||r,o=e.parentElement,a=window.getComputedStyle(e);if("absolute"===a.position||"fixed"===a.position)return!1;i&&(t=new s.t(e).scrollIntoView());var u=function(e){return t&&t.restore(),e};for(;o;){if(!(o instanceof C(e).Element))return u(!1);var c=window.getComputedStyle(o);if("absolute"===c.position||"fixed"===c.position)return u(!1);var l="hidden"===c.overflowX,d="hidden"===c.overflowY;if((l||d)&&!A(o,e,l,d))return u(!0);o=o.parentElement}return u(!1)}(e,{scrollIntoView:f}))return y({isHidden:!0});try{var S;f&&(t=new s.t(e).scrollIntoView());var x=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView,r=e.ownerDocument,i={top:0,left:0,right:n.innerWidth||r.documentElement.clientWidth,bottom:n.innerHeight||r.documentElement.clientHeight},o={top:Math.max(t.top,i.top),left:Math.max(t.left,i.left),right:Math.min(t.right,i.right),bottom:Math.min(t.bottom,i.bottom)};return o.width=o.right-o.left,o.height=o.bottom-o.top,o.width>0&&o.height>0?o:null}(e);if(!x)return y({isHidden:!0});var N,R=[[x.width/2,x.height/2,!0],[Math.max(.01*x.width,1),Math.max(.01*x.height,1)],[Math.min(.99*x.width,x.width-1),Math.max(.01*x.height,1)],[Math.max(.01*x.width,1),Math.min(.99*x.height,x.height-1)],[Math.min(.99*x.width,x.width-1),Math.min(.99*x.height,x.height-1)]],D=null!==(S=function(e){for(var t=e;t;){if(11===t.nodeType)return[t,t.ownerDocument.defaultView];t=t.parentNode}}(e))&&void 0!==S?S:[e.ownerDocument,e.ownerDocument.defaultView],O=(0,i.Z)(D,2),L=O[0],Z=O[1];if(e instanceof C(e).HTMLInputElement&&e.id&&e.type&&["checkbox","radio"].includes(e.type)){var F=b('label[for="'.concat(e.id,'"]'),L);F.length&&(N=F[0])}for(var P=0,j=R;P<j.length;P++){var V=(0,i.Z)(j[P],3),B=V[0],H=V[1],W=V[2],U=x.left+B>=0&&x.left+B<=Z.innerWidth?x.left+B:B,q=x.top+H>=0&&x.top+H<=Z.innerHeight?x.top+H:H,z=L.elementFromPoint(U,q);if(z===e)return y({isHidden:!1,clickOffset:W?void 0:{x:B,y:H}});if(z){if(!0===W&&z.shadowRoot)return y(M(z,n));for(var G=z;G;){if(G===e||N&&N===G)return y({isHidden:!1,clickOffset:W?void 0:{x:B,y:H}});G=E(G)}if(l)try{var $,Y=L.elementsFromPoint(U,q),Q=(0,r.Z)(Y);try{for(Q.s();!($=Q.n()).done;){var X=$.value;if(X===e)return y({isHidden:!1,clickOffset:W?void 0:{x:B,y:H},isBehindTransparentElement:!0});var K=Z.getComputedStyle(X),J=X.getBoundingClientRect();if("0"!==K.opacity&&"hidden"!==K.visibility&&!/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(K.backgroundColor)||J.width>1.2*x.width||J.height>1.2*x.height)break}}catch(ee){Q.e(ee)}finally{Q.f()}}catch(te){console.error("Error while checking transparent elements over interactable",te)}}}return t&&(t.restore(),t=void 0),N?M(N,n):y({isHidden:!0})}catch(te){throw te}}var T=function(e){var t=u.J.getInstance("isElementHidden",{log:!1,flags:e}),n=t.get();return n||(n=new Map,t.set(n)),n};var _=function(e,t){T(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).set(e,t)};function A(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=e.getBoundingClientRect(),o=t.getBoundingClientRect(),a=i.left<o.right&&i.right>o.left,s=i.top<o.bottom&&i.bottom>o.top;return(!n||a)&&(!r||s)}function N(e,t,n){return e?e.replace(new RegExp(t,"g"),n):e}function R(e,t){try{var n=e.ownerDocument.defaultView;return e instanceof n[t]||e instanceof n.top[t]}catch(r){}return!1}!function(){for(var e=[],t=1;t<=20;t++){var n=t/20;e.push(n)}e.push(0)}();function D(e){try{return"fixed"===getComputedStyle(e).position||!(!e.parentElement||e.parentElement===document.body)&&D(e.parentElement)}catch(t){return console.error("isAncestorOrSelfFixed",t),!1}}function O(e){var t=e.getBoundingClientRect().top;return t<0?-t:0}function L(e){var t=e.getBoundingClientRect().bottom,n=window.innerHeight;return t>n?t-n:0}},8739:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(5671),i=n(3144),o=function(){function e(){(0,r.Z)(this,e)}return(0,i.Z)(e,[{key:"skipEvents",value:function(e){}},{key:"preCastEvent",value:function(e){}},{key:"preEvent",value:function(e){}},{key:"postEvent",value:function(e,t){return t}},{key:"handleMeta",value:function(e,t){}},{key:"handleViewportResize",value:function(e){}},{key:"handleMutation",value:function(e,t){}},{key:"handleInput",value:function(e,t){}},{key:"handleClick",value:function(e,t){}},{key:"handleDblClick",value:function(e,t){}},{key:"handleMouseDown",value:function(e,t){}},{key:"handleMouseUp",value:function(e,t){}},{key:"handleMouseMove",value:function(e,t){}},{key:"handleFocus",value:function(e,t){}},{key:"handleBlur",value:function(e,t){}},{key:"handleContentEditableInput",value:function(e,t){}},{key:"handleKeyStroke",value:function(e,t){}},{key:"handleURLChange",value:function(e,t){}}]),e}()},7666:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r=n(4165),i=n(5861),o=n(5671),a=n(3144),s=n(1414),u=n(4228),c=function(){function e(t){var n=this,a=t.eventHandlers;(0,o.Z)(this,e),this.handlers=void 0,this.preCastEvent=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.handlers.preCastEvent(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.processEvent=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){var i,o,a,s=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!(s.length>1&&void 0!==s[1])||s[1],n.handlers.preEvent(t),!i){e.next=8;break}return e.next=5,n.handleEvent(t);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=void 0;case 9:return o=e.t0,e.next=12,n.handlers.postEvent(t,o);case 12:return a=e.sent,e.abrupt("return",n.handlers.controlledReturn?n.handlers.getReturnValue():a);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.skipEvents=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.handlers.skipEvents(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.handlers=a}return(0,a.Z)(e,[{key:"setHandlers",value:function(e){this.handlers=e}},{key:"handleEvent",value:function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===s.tw.Meta?3:e.t0===s.tw.IncrementalSnapshot?4:e.t0===s.tw.Custom?14:21;break;case 3:return e.abrupt("return",this.handlers.handleMeta(t.data,t));case 4:e.t1=t.data.source,e.next=e.t1===s.yh.ViewportResize?7:e.t1===s.yh.Mutation?8:e.t1===s.yh.Input?9:e.t1===s.yh.MouseInteraction?10:e.t1===s.yh.MouseMove?11:12;break;case 7:return e.abrupt("return",this.handlers.handleViewportResize(t.data,t));case 8:return e.abrupt("return",this.handlers.handleMutation(t.data,t));case 9:return e.abrupt("return",this.handlers.handleInput(t.data,t));case 10:return e.abrupt("return",this.handleMouseInteraction(t.data,t));case 11:return e.abrupt("return",this.handlers.handleMouseMove(t.data,t));case 12:return e.abrupt("break",13);case 13:case 20:case 21:return e.abrupt("break",22);case 14:e.t2=t.data.tag,e.next=e.t2===u.N.ContentEditableInput?17:e.t2===u.N.KeyStroke?18:e.t2===u.N.URLChange?19:20;break;case 17:return e.abrupt("return",this.handlers.handleContentEditableInput(t.data.payload,t));case 18:return e.abrupt("return",this.handlers.handleKeyStroke(t.data.payload,t));case 19:return e.abrupt("return",this.handlers.handleURLChange(t.data.payload,t));case 22:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseInteraction",value:function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t,n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===s.Y2.Click?3:e.t0===s.Y2.DblClick?4:e.t0===s.Y2.MouseDown?5:e.t0===s.Y2.MouseUp?6:e.t0===s.Y2.Focus?7:e.t0===s.Y2.Blur?8:9;break;case 3:return e.abrupt("return",this.handlers.handleClick(t,n));case 4:return e.abrupt("return",this.handlers.handleDblClick(t,n));case 5:return e.abrupt("return",this.handlers.handleMouseDown(t,n));case 6:return e.abrupt("return",this.handlers.handleMouseUp(t,n));case 7:return e.abrupt("return",this.handlers.handleFocus(t,n));case 8:return e.abrupt("return",this.handlers.handleBlur(t,n));case 9:return e.abrupt("break",10);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}()},5034:function(e,t,n){"use strict";n.d(t,{t:function(){return s}});var r=n(7762),i=n(5671),o=n(3144),a=n(458),s=function(){function e(t){(0,i.Z)(this,e),this.element=void 0,this.elRect=void 0,this.initialScrollPositions=void 0,this.element=t,this.elRect=this.element.getBoundingClientRect()}return(0,o.Z)(e,[{key:"scrollIntoView",value:function(){if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!(0,a.PZ)(this.element)){var e,t=(0,r.Z)(this.initialScrollPositions);try{for(t.s();!(e=t.n()).done;){var n=e.value,i=n.element.getBoundingClientRect();if(this.elRect.top<i.top||this.elRect.bottom>i.bottom){var o=this.elRect.top-i.top+n.element.scrollTop;n.element.scrollTop=o}}}catch(s){t.e(s)}finally{t.f()}}return this}},{key:"restore",value:function(){this.initialScrollPositions.forEach((function(e){var t=e.element,n=e.top,r=e.left;try{t.scroll(r,n)}catch(i){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:t,top:n,left:r},i)}}))}},{key:"getScrollableParentsPositions",value:function(){this.initialScrollPositions=[];for(var e=(0,a.nq)(this.element);null!=e;)(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&this.initialScrollPositions.push({element:e,top:e.scrollTop,left:e.scrollLeft}),e=(0,a.nq)(e)}}]),e}()},408:function(e,t,n){"use strict";n.d(t,{L:function(){return he}});var r=n(7762),i=n(3144),o=n(5671),a=n(5512),s=n(885),u=n(2982),c=n(1737),l=n(1414);function d(e){return"__ln"in e}var f,h=function(){function e(){(0,o.Z)(this,e),this.length=0,this.head=null,this.tail=null}return(0,i.Z)(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null===t||void 0===t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&d(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&d(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),e}(),p=function(e,t){return"".concat(e,"@").concat(t)},v=function(){function e(){var t=this;(0,o.Z)(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],n=new Set,i=new h,o=function(e){for(var n=e,r=a.zi;r===a.zi;)r=(n=n&&n.nextSibling)&&t.mirror.getId(n);return r},s=function(r){if(r.parentNode&&(0,c._f)(r)&&"TEXTAREA"!==r.parentNode.tagName){var s=(0,a.Zq)(r.parentNode)?t.mirror.getId((0,c.jB)(r)):t.mirror.getId(r.parentNode),u=o(r);if(-1===s||-1===u)return i.addNode(r);var l=(0,a.eD)(r,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){(0,c.Cj)(e,t.mirror)&&t.iframeManager.addIframe(e),(0,c.qs)(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),(0,c.He)(r)&&t.shadowDomManager.addShadowRoot(r.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});l&&(e.push({parentId:s,nextId:u,node:l}),n.add(l.id))}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());var u,l=(0,r.Z)(t.movedSet);try{for(l.s();!(u=l.n()).done;){var d=u.value;y(t.removes,d,t.mirror)&&!t.movedSet.has(d.parentNode)||s(d)}}catch(T){l.e(T)}finally{l.f()}var f,p=(0,r.Z)(t.addedSet);try{for(p.s();!(f=p.n()).done;){var v=f.value;b(t.droppedSet,v)||y(t.removes,v,t.mirror)?b(t.movedSet,v)?s(v):t.droppedSet.add(v):s(v)}}catch(T){p.e(T)}finally{p.f()}for(var m=null;i.length;){var g=null;if(m){var w=t.mirror.getId(m.value.parentNode),k=o(m.value);-1!==w&&-1!==k&&(g=m)}if(!g)for(var S=i.tail;S;){var E=S;if(S=S.previous,E){var x=t.mirror.getId(E.value.parentNode);if(-1===o(E.value))continue;if(-1!==x){g=E;break}var I=E.value;if(I.parentNode&&I.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var C=I.parentNode.host;if(-1!==t.mirror.getId(C)){g=E;break}}}}if(!g){for(;i.head;)i.removeNode(i.head.value);break}m=g.previous,i.removeNode(g.value),s(g.value)}var M={texts:t.texts.map((function(e){var n=e.node;return n.parentNode&&"TEXTAREA"===n.parentNode.tagName&&t.genTextAreaValueMutation(n.parentNode),{id:t.mirror.getId(n),value:e.value}})).filter((function(e){return!n.has(e.id)})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){var n=e.attributes;if("string"===typeof n.style){var r=JSON.stringify(e.styleDiff),i=JSON.stringify(e._unchangedStyles);r.length<n.style.length&&(r+i).split("var(").length===n.style.split("var(").length&&(n.style=e.styleDiff)}return{id:t.mirror.getId(e.node),attributes:n}})).filter((function(e){return!n.has(e.id)})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};(M.texts.length||M.attributes.length||M.removes.length||M.adds.length)&&(t.texts=[],t.attributes=[],t.attributeMap=new WeakMap,t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(M))}},this.genTextAreaValueMutation=function(e){var n=t.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(n),t.attributeMap.set(e,n)),n.attributes.value=Array.from(e.childNodes,(function(e){return e.textContent||""})).join("")},this.processMutation=function(e){if(!(0,c.WU)(e.target,t.mirror))switch(e.type){case"characterData":var n=e.target.textContent;(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||n===e.oldValue||t.texts.push({value:(0,a.IG)(e.target,t.maskTextClass,t.maskTextSelector,!0)&&n?t.maskTextFn?t.maskTextFn(n,(0,c.rU)(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break;case"attributes":var r=e.target,i=e.attributeName,o=e.target.getAttribute(i);if("value"===i){var s=(0,a.kv)(r);o=(0,a.wR)({element:r,maskInputOptions:t.maskInputOptions,tagName:r.tagName,type:s,value:o,maskInputFn:t.maskInputFn})}if((0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||o===e.oldValue)return;var u=t.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===i&&!t.keepIframeSrcFn(o)){if(r.contentDocument)return;i="rr_src"}if(u||(u={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(u),t.attributeMap.set(e.target,u)),"type"===i&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!(0,a.P8)(r.tagName,i)&&(u.attributes[i]=(0,a.We)(t.doc,(0,a.UR)(r.tagName),(0,a.UR)(i),o),"style"===i)){if(!t.unattachedDoc)try{t.unattachedDoc=document.implementation.createHTMLDocument()}catch(k){t.unattachedDoc=t.doc}var l=t.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(var d=0,f=Array.from(r.style);d<f.length;d++){var h=f[d],v=r.style.getPropertyValue(h),y=r.style.getPropertyPriority(h);v!==l.style.getPropertyValue(h)||y!==l.style.getPropertyPriority(h)?u.styleDiff[h]=""===y?v:[v,y]:u._unchangedStyles[h]=[v,y]}for(var g=0,b=Array.from(l.style);g<b.length;g++){var w=b[g];""===r.style.getPropertyValue(w)&&(u.styleDiff[w]=!1)}}break;case"childList":if((0,c.IT)(e.target,t.blockClass,t.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void t.genTextAreaValueMutation(e.target);e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(n){var r=t.mirror.getId(n),i=(0,a.Zq)(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||(0,c.WU)(n,t.mirror)||!(0,c.nF)(n,t.mirror)||(t.addedSet.has(n)?(m(t.addedSet,n),t.droppedSet.add(n)):t.addedSet.has(e.target)&&-1===r||(0,c.y5)(e.target,t.mirror)||(t.movedSet.has(n)&&t.movedMap[p(r,i)]?m(t.movedSet,n):t.removes.push({parentId:i,id:r,isShadow:!(!(0,a.Zq)(e.target)||!(0,a.DS)(e.target))||void 0})),t.mapRemoves.push(n))}))}},this.genAdds=function(e,n){if(!t.processedNodeManager.inOtherBuffer(e,t)&&!t.addedSet.has(e)&&!t.movedSet.has(e)){if(t.mirror.hasNode(e)){if((0,c.WU)(e,t.mirror))return;t.movedSet.add(e);var r=null;n&&t.mirror.hasNode(n)&&(r=t.mirror.getId(n)),r&&-1!==r&&(t.movedMap[p(t.mirror.getId(e),r)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);(0,c.IT)(e,t.blockClass,t.blockSelector,!1)||(e.childNodes.forEach((function(e){return t.genAdds(e)})),(0,c.He)(e)&&e.shadowRoot.childNodes.forEach((function(n){t.processedNodeManager.add(n,t),t.genAdds(n,e)})))}}}return(0,i.Z)(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function m(e,t){e.delete(t),t.childNodes.forEach((function(t){return m(e,t)}))}function y(e,t,n){return 0!==e.length&&g(e,t,n)}function g(e,t,n){var r=t.parentNode;if(!r)return!1;var i=n.getId(r);return!!e.some((function(e){return e.id===i}))||g(e,r,n)}function b(e,t){return 0!==e.size&&w(e,t)}function w(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||w(e,n))}function k(e){f=e}function S(){f=void 0}var E=function(e){if(!f)return e;return function(){try{return e.apply(void 0,arguments)}catch(t){if(f&&!0===f(t))return;throw t}}},x=[];function I(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(Q){}return e&&e.target}function C(e,t){var n,r,i=new v;x.push(i),i.init(e);var o=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(o=window[a]);var s=new o(E(i.processMutations.bind(i)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function M(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.sampling;if(!1===s.mouseInteraction)return function(){};var u=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,d=[],f=null;return Object.keys(l.Y2).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==u[e]})).forEach((function(e){var s=(0,a.UR)(e),u=function(e){return function(n){var a=I(n);if(!(0,c.IT)(a,i,o,!0)){var s=null,u=e;if("pointerType"in n){switch(n.pointerType){case"mouse":s=l.Et.Mouse;break;case"touch":s=l.Et.Touch;break;case"pen":s=l.Et.Pen}s===l.Et.Touch?l.Y2[e]===l.Y2.MouseDown?u="TouchStart":l.Y2[e]===l.Y2.MouseUp&&(u="TouchEnd"):l.Et.Pen}else(0,c.xO)(n)&&(s=l.Et.Touch);null!==s?(f=s,(u.startsWith("Touch")&&s===l.Et.Touch||u.startsWith("Mouse")&&s===l.Et.Mouse)&&(s=null)):l.Y2[e]===l.Y2.Click&&(s=f,f=null);var d=(0,c.xO)(n)?n.changedTouches[0]:n;if(d){var h=r.getId(a),p=d.clientX,v=d.clientY;E(t)(Object.assign({type:l.Y2[u],id:h,x:p,y:v},null!==s&&{pointerType:s}))}}}}(e);if(window.PointerEvent)switch(l.Y2[e]){case l.Y2.MouseDown:case l.Y2.MouseUp:s=s.replace("mouse","pointer");break;case l.Y2.TouchStart:case l.Y2.TouchEnd:return}d.push((0,c.on)(s,u,n))})),E((function(){d.forEach((function(e){return e()}))}))}function T(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling,s=E((0,c.P2)(E((function(e){var a=I(e);if(a&&!(0,c.IT)(a,i,o,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var u=(0,c.$1)(n.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100));return(0,c.on)("scroll",s,n)}var _=["INPUT","TEXTAREA","SELECT"],A=new WeakMap;function N(e){return function(e,t){if(L("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||L("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||L("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||L("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function R(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function D(e,t){var n,r,i,o=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(t.host);var u="#document"===t.nodeName?null===(n=t.defaultView)||void 0===n?void 0:n.Document:null===(i=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===i?void 0:i.ShadowRoot,c=(null===u||void 0===u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null===u||void 0===u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&u&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null===(e=c.get)||void 0===e?void 0:e.call(this)},set:function(e){var t,n=null===(t=c.set)||void 0===t?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(r){}return n}}),E((function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):function(){}}function O(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.doc.defaultView;if(!i)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,u=e.mediaInteractionCb,c=e.styleSheetRuleCb,l=e.styleDeclarationCb,d=e.canvasMutationCb,f=e.fontCb,h=e.selectionCb,p=e.customElementCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),r.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),i.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),o.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),a.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),u.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),c.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),l.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),f.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),h.apply(void 0,arguments)},e.customElementCb=function(){t.customElement&&t.customElement.apply(t,arguments),p.apply(void 0,arguments)}}(e,n),e.recordDOM&&(t=C(e,e.doc));var o=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,a="number"===typeof n.mousemove?n.mousemove:50,s="number"===typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],d=(0,c.P2)(E((function(e){var n=Date.now()-o;t(u.map((function(e){return e.timeOffset-=n,e})),e),u=[],o=null})),s),f=E((0,c.P2)(E((function(e){var t=I(e),n=(0,c.xO)(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;o||(o=(0,c.zq)()),u.push({x:r,y:a,id:i.getId(t),timeOffset:(0,c.zq)()-o}),d("undefined"!==typeof DragEvent&&e instanceof DragEvent?l.yh.Drag:e instanceof MouseEvent?l.yh.MouseMove:l.yh.TouchMove)})),a,{trailing:!1})),h=[(0,c.on)("mousemove",f,r),(0,c.on)("touchmove",f,r),(0,c.on)("drag",f,r)];return E((function(){h.forEach((function(e){return e()}))}))}(e),d=M(e),f=T(e),h=function(e,t){var n=e.viewportResizeCb,r=t.win,i=-1,o=-1,a=E((0,c.P2)(E((function(){var e=(0,c.gp)(),t=(0,c.fM)();i===e&&o===t||(n({width:Number(t),height:Number(e)}),i=e,o=t)})),200));return(0,c.on)("resize",a,r)}(e,{win:i}),p=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.ignoreClass,l=e.ignoreSelector,d=e.maskInputOptions,f=e.maskInputFn,h=e.sampling,p=e.userTriggeredOnInput;function v(e){var t=I(e),r=e.isTrusted,u=t&&t.tagName;if(t&&"OPTION"===u&&(t=t.parentElement),t&&u&&!(_.indexOf(u)<0)&&!(0,c.IT)(t,i,o,!0)&&!(t.classList.contains(s)||l&&t.matches(l))){var h=t.value,v=!1,y=(0,a.kv)(t)||"";"radio"===y||"checkbox"===y?v=t.checked:(d[u.toLowerCase()]||d[y])&&(h=(0,a.wR)({element:t,maskInputOptions:d,tagName:u,type:y,value:h,maskInputFn:f})),m(t,p?{text:h,isChecked:v,userTriggered:r}:{text:h,isChecked:v});var g=t.name;"radio"===y&&g&&v&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach((function(e){if(e!==t){var n=e.value;m(e,p?{text:n,isChecked:!v,userTriggered:!1}:{text:n,isChecked:!v})}}))}}function m(e,n){var i=A.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){A.set(e,n);var o=r.getId(e);E(t)(Object.assign(Object.assign({},n),{id:o}))}}var y=("last"===h.input?["change"]:["input","change"]).map((function(e){return(0,c.on)(e,E(v),n)})),g=n.defaultView;if(!g)return function(){y.forEach((function(e){return e()}))};var b=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),w=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&y.push.apply(y,(0,u.Z)(w.map((function(e){return(0,c.yU)(e[0],e[1],{set:function(){E(v)({target:this,isTrusted:!1})}},!1,g)})))),E((function(){y.forEach((function(e){return e()}))}))}(e),v=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,o=e.sampling,a=e.doc,s=E((function(e){return(0,c.P2)(E((function(o){var a=I(o);if(a&&!(0,c.IT)(a,n,r,!0)){var s=a.currentTime,u=a.volume,l=a.muted,d=a.playbackRate,f=a.loop;t({type:e,id:i.getId(a),currentTime:s,volume:u,muted:l,playbackRate:d,loop:f})}})),o.media||500)})),u=[(0,c.on)("play",s(0),a),(0,c.on)("pause",s(1),a),(0,c.on)("seeked",s(2),a),(0,c.on)("volumechange",s(3),a),(0,c.on)("ratechange",s(4),a)];return E((function(){u.forEach((function(e){return e()}))}))}(e),m=function(){},y=function(){},g=function(){},b=function(){};e.recordDOM&&(m=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,o=t.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:E((function(e,t,o){var a=(0,s.Z)(o,2),u=a[0],c=a[1],l=R(t,r,i.styleMirror),d=l.id,f=l.styleId;return(d&&-1!==d||f&&-1!==f)&&n({id:d,styleId:f,adds:[{rule:u,index:c}]}),e.apply(t,o)}))});var c,l,d=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(d,{apply:E((function(e,t,o){var a=(0,s.Z)(o,1)[0],u=R(t,r,i.styleMirror),c=u.id,l=u.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,removes:[{index:a}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.replace&&(c=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:E((function(e,t,o){var a=(0,s.Z)(o,1)[0],u=R(t,r,i.styleMirror),c=u.id,l=u.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,replace:a}),e.apply(t,o)}))})),o.CSSStyleSheet.prototype.replaceSync&&(l=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:E((function(e,t,o){var a=(0,s.Z)(o,1)[0],u=R(t,r,i.styleMirror),c=u.id,l=u.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,replaceSync:a}),e.apply(t,o)}))}));var f={};Z("CSSGroupingRule")?f.CSSGroupingRule=o.CSSGroupingRule:(Z("CSSMediaRule")&&(f.CSSMediaRule=o.CSSMediaRule),Z("CSSConditionRule")&&(f.CSSConditionRule=o.CSSConditionRule),Z("CSSSupportsRule")&&(f.CSSSupportsRule=o.CSSSupportsRule));var h={};return Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),o=t[0],a=t[1];h[o]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(h[o].insertRule,{apply:E((function(e,t,o){var a=(0,s.Z)(o,2),c=a[0],l=a[1],d=R(t.parentStyleSheet,r,i.styleMirror),f=d.id,h=d.styleId;return(f&&-1!==f||h&&-1!==h)&&n({id:f,styleId:h,adds:[{rule:c,index:[].concat((0,u.Z)(N(t)),[l||0])}]}),e.apply(t,o)}))}),a.prototype.deleteRule=new Proxy(h[o].deleteRule,{apply:E((function(e,t,o){var a=(0,s.Z)(o,1)[0],c=R(t.parentStyleSheet,r,i.styleMirror),l=c.id,d=c.styleId;return(l&&-1!==l||d&&-1!==d)&&n({id:l,styleId:d,removes:[{index:[].concat((0,u.Z)(N(t)),[a])}]}),e.apply(t,o)}))})})),E((function(){o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=d,c&&(o.CSSStyleSheet.prototype.replace=c),l&&(o.CSSStyleSheet.prototype.replaceSync=l),Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),n=t[0],r=t[1];r.prototype.insertRule=h[n].insertRule,r.prototype.deleteRule=h[n].deleteRule}))}))}(e,{win:i}),y=D(e,e.doc),g=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,o=e.stylesheetManager,a=t.win,u=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(u,{apply:E((function(e,t,a){var c,l=(0,s.Z)(a,3),d=l[0],f=l[1],h=l[2];if(i.has(d))return u.apply(t,[d,f,h]);var p=R(null===(c=t.parentRule)||void 0===c?void 0:c.parentStyleSheet,r,o.styleMirror),v=p.id,m=p.styleId;return(v&&-1!==v||m&&-1!==m)&&n({id:v,styleId:m,set:{property:d,value:f,priority:h},index:N(t.parentRule)}),e.apply(t,a)}))});var c=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:E((function(e,t,a){var u,l=(0,s.Z)(a,1)[0];if(i.has(l))return c.apply(t,[l]);var d=R(null===(u=t.parentRule)||void 0===u?void 0:u.parentStyleSheet,r,o.styleMirror),f=d.id,h=d.styleId;return(f&&-1!==f||h&&-1!==h)&&n({id:f,styleId:h,remove:{property:l},index:N(t.parentRule)}),e.apply(t,a)}))}),E((function(){a.CSSStyleDeclaration.prototype.setProperty=u,a.CSSStyleDeclaration.prototype.removeProperty=c}))}(e,{win:i}),e.collectFonts&&(b=function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return o.set(r,{family:e,buffer:"string"!==typeof t,descriptors:n,fontSource:"string"===typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=(0,c.r$)(n.fonts,"add",(function(e){return function(n){return setTimeout(E((function(){var e=o.get(n);e&&(t(e),o.delete(n))})),0),e.apply(this,[n])}}));return i.push((function(){r.FontFace=a})),i.push(s),E((function(){i.forEach((function(e){return e()}))}))}(e)));var w,k=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,o=e.selectionCb,a=!0,s=E((function(){var e=t.getSelection();if(!(!e||a&&(null===e||void 0===e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],u=e.rangeCount||0,l=0;l<u;l++){var d=e.getRangeAt(l),f=d.startContainer,h=d.startOffset,p=d.endContainer,v=d.endOffset;(0,c.IT)(f,r,i,!0)||(0,c.IT)(p,r,i,!0)||s.push({start:n.getId(f),startOffset:h,end:n.getId(p),endOffset:v})}o({ranges:s})}}));return s(),(0,c.on)("selectionchange",s)}(e),S=function(e){var t=e.doc,n=e.customElementCb,r=t.defaultView;return r&&r.customElements?(0,c.r$)(r.customElements,"define",(function(e){return function(t,r,i){try{n({define:{name:t}})}catch(o){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,r,i])}})):function(){}}(e),O=[],L=(0,r.Z)(e.plugins);try{for(L.s();!(w=L.n()).done;){var F=w.value;O.push(F.observer(F.callback,i,F.options))}}catch(P){L.e(P)}finally{L.f()}return E((function(){x.forEach((function(e){return e.reset()})),null===t||void 0===t||t.disconnect(),o(),d(),f(),h(),p(),v(),m(),y(),g(),b(),k(),S(),O.forEach((function(e){return e()}))}))}function L(e){return"undefined"!==typeof window[e]}function Z(e){return Boolean("undefined"!==typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var F=function(){function e(t){(0,o.Z)(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return(0,i.Z)(e,[{key:"getId",value:function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}},{key:"getIds",value:function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,r,i)}))}},{key:"getRemoteId",value:function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!==typeof t)return t;var i=r.get(t);return i||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,r)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),P=function(){function e(t){(0,o.Z)(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new F(a.Bu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new F(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return(0,i.Z)(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,r=this;switch(t.type){case l.tw.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:l.tw.IncrementalSnapshot,data:{source:l.yh.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case l.tw.Meta:case l.tw.Load:case l.tw.DomContentLoaded:return!1;case l.tw.Plugin:return t;case l.tw.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case l.tw.IncrementalSnapshot:switch(t.data.source){case l.yh.Mutation:return t.data.adds.forEach((function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((function(t){r.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){r.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.Drag:case l.yh.TouchMove:case l.yh.MouseMove:return t.data.positions.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.ViewportResize:return!1;case l.yh.MediaInteraction:case l.yh.MouseInteraction:case l.yh.Scroll:case l.yh.CanvasMutation:case l.yh.Input:return this.replaceIds(t.data,e,["id"]),t;case l.yh.StyleSheetRule:case l.yh.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case l.yh.Font:return t;case l.yh.Selection:return t.data.ranges.forEach((function(t){r.replaceIds(t,e,["start","end"])})),t;case l.yh.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((function(t){r.replaceStyleIds(t,e,["styleId"])})),t}}return!1}},{key:"replace",value:function(e,t,n,i){var o,a=(0,r.Z)(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;(Array.isArray(t[s])||"number"===typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]))}}catch(u){a.e(u)}finally{a.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===a.Jq.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((function(e){n.patchRootIdOnNode(e,t)}))}}]),e}(),j=function(){function e(t){(0,o.Z)(this,e),this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}return(0,i.Z)(e,[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n=this;if((0,a.DS)(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=C(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((function(){return r.disconnect()})),this.restoreHandlers.push(T(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),n.restoreHandlers.push(D({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))}),0)}}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,t){var n=this;this.restoreHandlers.push((0,c.r$)(e.prototype,"attachShadow",(function(e){return function(r){var i=e.call(this,r);return this.shadowRoot&&(0,c._f)(this)&&n.addShadowRoot(this.shadowRoot,t),i}})))}},{key:"reset",value:function(){this.restoreHandlers.forEach((function(e){try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),e}(),V=n(4165),B=n(3246),H=n(3464),W=new Map;var U=function(e,t,n){if(e&&(G(e,t)||"object"===typeof e)){var r=function(e,t){var n=W.get(e);return n||(n=new Map,W.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function q(e,t,n){if(e instanceof Array)return e.map((function(e){return q(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:(0,H.c)(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[q(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[q(e.data,t,n),e.width,e.height]}:G(e,t)||"object"===typeof e?{rr_type:e.constructor.name,index:U(e,t,n)}:e}var z=function(e,t,n){return e.map((function(e){return q(e,t,n)}))},G=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"===typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function $(e,t,n,r){var i=[];try{var o=(0,c.r$)(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if(!(0,c.IT)(this,t,n,!0)){var u=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&"object"===typeof a[0]){var l=a[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i].concat(a))}}));i.push(o)}catch(Q){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){i.forEach((function(e){return e()}))}}function Y(e,t,n,i,o,a,s){var u,l=[],d=Object.getOwnPropertyNames(e),f=(0,r.Z)(d);try{var h=function(){var r=u.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(r))return 0;try{if("function"!==typeof e[r])return 0;var a=(0,c.r$)(e,r,(function(e){return function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var d=e.apply(this,u);if(U(d,s,this),"tagName"in this.canvas&&!(0,c.IT)(this.canvas,i,o,!0)){var f=z(u,s,this),h={type:t,property:r,args:f};n(this.canvas,h)}return d}}));l.push(a)}catch(Q){var d=(0,c.yU)(e,r,{set:function(e){n(this.canvas,{type:t,property:r,args:[e],setter:!0})}});l.push(d)}};for(f.s();!(u=f.n()).done;)h()}catch(p){f.e(p)}finally{f.f()}return l}var Q,X,K,J,ee=function(e,t){var n;return function(r){return n=n||function(e,t){var n=function(e,t){var n=void 0===t?null:t,r=e.toString().split("\n");r.pop(),r.shift();for(var i=r[0].search(/\S/),o=/(['"])__worker_loader_strict__(['"])/g,a=0,s=r.length;a<s;++a)r[a]=r[a].substring(i).replace(o,"$1use strict$2")+"\n";return n&&r.push("//# sourceMappingURL="+n+"\n"),r}(e,t),r=new Blob(n,{type:"application/javascript"});return URL.createObjectURL(r)}(e,t),new Worker(n,r)}}((function(){!function(){function e(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="undefined"===typeof Uint8Array?[]:new Uint8Array(256),r=0;r<64;r++)n[t.charCodeAt(r)]=r;var i=function(e){var n,r=new Uint8Array(e),i=r.length,o="";for(n=0;n<i;n+=3)o+=t[r[n]>>2],o+=t[(3&r[n])<<4|r[n+1]>>4],o+=t[(15&r[n+1])<<2|r[n+2]>>6],o+=t[63&r[n+2]];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},o=new Map,a=new Map;function s(t,n,r){return e(this,void 0,void 0,(0,V.Z)().mark((function e(){var o,s,u,c,l;return(0,V.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o="".concat(t,"-").concat(n),!("OffscreenCanvas"in globalThis)){e.next=17;break}if(!a.has(o)){e.next=4;break}return e.abrupt("return",a.get(o));case 4:return(s=new OffscreenCanvas(t,n)).getContext("2d"),e.next=8,s.convertToBlob(r);case 8:return u=e.sent,e.next=11,u.arrayBuffer();case 11:return c=e.sent,l=i(c),a.set(o,l),e.abrupt("return",l);case 17:return e.abrupt("return","");case 18:case"end":return e.stop()}}),e)})))}var u=self;u.onmessage=function(t){return e(this,void 0,void 0,(0,V.Z)().mark((function e(){var n,r,a,c,l,d,f,h,p,v,m,y;return(0,V.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("OffscreenCanvas"in globalThis)){e.next=31;break}return n=t.data,r=n.id,a=n.bitmap,c=n.width,l=n.height,d=n.dataURLOptions,f=s(c,l,d),h=new OffscreenCanvas(c,l),h.getContext("2d").drawImage(a,0,0),a.close(),e.next=9,h.convertToBlob(d);case 9:return p=e.sent,v=p.type,e.next=13,p.arrayBuffer();case 13:if(m=e.sent,y=i(m),e.t0=!o.has(r),!e.t0){e.next=22;break}return e.next=19,f;case 19:e.t1=e.sent,e.t2=y,e.t0=e.t1===e.t2;case 22:if(!e.t0){e.next=25;break}return o.set(r,y),e.abrupt("return",u.postMessage({id:r}));case 25:if(o.get(r)!==y){e.next=27;break}return e.abrupt("return",u.postMessage({id:r}));case 27:u.postMessage({id:r,type:v,base64:y,width:c,height:l}),o.set(r,y),e.next=32;break;case 31:return e.abrupt("return",u.postMessage({id:t.data.id}));case 32:case"end":return e.stop()}}),e)})))}}()}),null),te=function(){function e(t){var n=this;(0,o.Z)(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId)&&n.rafStamps.invokeId||(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var r=t.sampling,i=void 0===r?"all":r,a=t.win,s=t.blockClass,u=t.blockSelector,c=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&"all"===i&&this.initCanvasMutationObserver(a,s,u),c&&"number"===typeof i&&this.initCanvasFPSObserver(i,a,s,u,{dataURLOptions:l})}return(0,i.Z)(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,r,i){var o=this,a=$(t,n,r,!0),s=new Map,u=new ee;u.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,a=n.width,u=n.height;o.mutationCb({id:t,type:l.FX["2D"],commands:[{property:"clearRect",args:[0,0,a,u]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var d,f=1e3/e,h=0;d=requestAnimationFrame((function e(a){h&&a-h<f||(h=a,function(){var e=[];return t.document.querySelectorAll("canvas").forEach((function(t){(0,c.IT)(t,n,r,!0)||e.push(t)})),e}().forEach((function(e){return(0,B.m)(o,void 0,void 0,(0,V.Z)().mark((function t(){var n,r,o,a;return(0,V.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.mirror.getId(e),!s.get(r)){t.next=3;break}return t.abrupt("return");case 3:if(0!==e.width&&0!==e.height){t.next=5;break}return t.abrupt("return");case 5:return s.set(r,!0),["webgl","webgl2"].includes(e.__context)&&(o=e.getContext(e.__context),!1===(null===(n=null===o||void 0===o?void 0:o.getContextAttributes())||void 0===n?void 0:n.preserveDrawingBuffer)&&o.clear(o.COLOR_BUFFER_BIT)),t.next=9,createImageBitmap(e);case 9:a=t.sent,u.postMessage({id:r,bitmap:a,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[a]);case 11:case"end":return t.stop()}}),t,this)})))}))),d=requestAnimationFrame(e)})),this.resetObservers=function(){a(),cancelAnimationFrame(d)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var i=$(e,t,n,!1),o=function(e,t,n,i){var o,a=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),u=(0,r.Z)(s);try{var d=function(){var r=o.value;try{if("function"!==typeof t.CanvasRenderingContext2D.prototype[r])return 1;var s=(0,c.r$)(t.CanvasRenderingContext2D.prototype,r,(function(o){return function(){for(var a=this,s=arguments.length,u=new Array(s),d=0;d<s;d++)u[d]=arguments[d];return(0,c.IT)(this.canvas,n,i,!0)||setTimeout((function(){var n=z(u,t,a);e(a.canvas,{type:l.FX["2D"],property:r,args:n})}),0),o.apply(this,u)}}));a.push(s)}catch(Q){var u=(0,c.yU)(t.CanvasRenderingContext2D.prototype,r,{set:function(t){e(this.canvas,{type:l.FX["2D"],property:r,args:[t],setter:!0})}});a.push(u)}};for(u.s();!(o=u.n()).done;)d()}catch(f){u.e(f)}finally{u.f()}return function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),a=function(e,t,n,r,i){var o=[];return o.push.apply(o,(0,u.Z)(Y(t.WebGLRenderingContext.prototype,l.FX.WebGL,e,n,r,0,t))),"undefined"!==typeof t.WebGL2RenderingContext&&o.push.apply(o,(0,u.Z)(Y(t.WebGL2RenderingContext.prototype,l.FX.WebGL2,e,n,r,0,t))),function(){o.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){i(),o(),a()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){return(0,B._)(e,["type"])})),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),ne=function(){function e(t){(0,o.Z)(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new c.ug,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return(0,i.Z)(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,i={id:t,styleIds:[]},o=[],s=(0,r.Z)(e);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=void 0;this.styleMirror.has(u)?c=this.styleMirror.getId(u):(c=this.styleMirror.add(u),o.push({styleId:c,rules:Array.from(u.rules||CSSRule,(function(e,t){return{rule:(0,a.MK)(e),index:t}}))})),i.styleIds.push(c)}}catch(l){s.e(l)}finally{s.f()}o.length>0&&(i.styles=o),this.adoptedStyleSheetCb(i)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),re=function(){function e(){(0,o.Z)(this,e),this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}return(0,i.Z)(e,[{key:"periodicallyClear",value:function(){var e=this;requestAnimationFrame((function(){e.clear(),e.loop&&e.periodicallyClear()}))}},{key:"inOtherBuffer",value:function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some((function(e){return e!==t}))}},{key:"add",value:function(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"clear",value:function(){this.nodeMap=new WeakMap}},{key:"destroy",value:function(){this.loop=!1}}]),e}(),ie=!1;try{if(2!==Array.from([1],(function(e){return 2*e}))[0]){var oe=document.createElement("iframe");document.body.appendChild(oe),Array.from=(null===(Q=oe.contentWindow)||void 0===Q?void 0:Q.Array.from)||Array.from,document.body.removeChild(oe)}}catch(pe){console.debug("Unable to override Array.from",pe)}var ae=(0,a.bZ)();function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,i=e.checkoutEveryNth,o=e.blockClass,s=void 0===o?"rr-block":o,u=e.blockSelector,d=void 0===u?null:u,f=e.ignoreClass,h=void 0===f?"rr-ignore":f,p=e.ignoreSelector,v=void 0===p?null:p,m=e.maskTextClass,y=void 0===m?"rr-mask":m,g=e.maskTextSelector,b=void 0===g?null:g,w=e.inlineStylesheet,I=void 0===w||w,C=e.maskAllInputs,M=e.maskInputOptions,T=e.slimDOMOptions,_=e.maskInputFn,A=e.maskTextFn,N=e.hooks,R=e.packFn,D=e.sampling,L=void 0===D?{}:D,Z=e.dataURLOptions,F=void 0===Z?{}:Z,V=e.mousemoveWait,B=e.recordDOM,H=void 0===B||B,W=e.recordCanvas,U=void 0!==W&&W,q=e.recordCrossOriginIframes,z=void 0!==q&&q,G=e.recordAfter,$=void 0===G?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":G,Y=e.userTriggeredOnInput,Q=void 0!==Y&&Y,ee=e.collectFonts,oe=void 0!==ee&&ee,se=e.inlineImages,ue=void 0!==se&&se,ce=e.plugins,le=e.keepIframeSrcFn,de=void 0===le?function(){return!1}:le,fe=e.ignoreCSSAttributes,he=void 0===fe?new Set([]):fe;k(e.errorHandler);var ve=!z||window.parent===window,me=!1;if(!ve)try{window.parent.document&&(me=!1)}catch(Le){me=!0}if(ve&&!t)throw new Error("emit function is required");void 0!==V&&void 0===L.mousemove&&(L.mousemove=V),ae.reset();var ye,ge=!0===C?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==M?M:{password:!0},be=!0===T||"all"===T?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===T,headMetaDescKeywords:"all"===T}:T||{};(0,c.OK)();var we=0,ke=function(e){var t,n=(0,r.Z)(ce||[]);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.eventProcessor&&(e=i.eventProcessor(e))}}catch(pe){n.e(pe)}finally{n.f()}return R&&!me&&(e=R(e)),e};X=function(e,r){var o,a=e;if(a.timestamp=(0,c.zq)(),!(null===(o=x[0])||void 0===o?void 0:o.isFrozen())||a.type===l.tw.FullSnapshot||a.type===l.tw.IncrementalSnapshot&&a.data.source===l.yh.Mutation||x.forEach((function(e){return e.unfreeze()})),ve)null===t||void 0===t||t(ke(a),r);else if(me){var s={type:"rrweb",event:ke(a),origin:window.location.origin,isCheckout:r};window.parent.postMessage(s,"*")}if(a.type===l.tw.FullSnapshot)ye=a,we=0;else if(a.type===l.tw.IncrementalSnapshot){if(a.data.source===l.yh.Mutation&&a.data.isAttachIframe)return;we++;var u=i&&we>=i,d=n&&a.timestamp-ye.timestamp>n;(u||d)&&K(!0)}};var Se,Ee=function(e){X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Mutation},e)})},xe=function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Scroll},e)})},Ie=function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.CanvasMutation},e)})},Ce=new ne({mutationCb:Ee,adoptedStyleSheetCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.AdoptedStyleSheet},e)})}}),Me=new P({mirror:ae,mutationCb:Ee,stylesheetManager:Ce,recordCrossOriginIframes:z,wrappedEmit:X}),Te=(0,r.Z)(ce||[]);try{for(Te.s();!(Se=Te.n()).done;){var _e=Se.value;_e.getMirror&&_e.getMirror({nodeMirror:ae,crossOriginIframeMirror:Me.crossOriginIframeMirror,crossOriginIframeStyleMirror:Me.crossOriginIframeStyleMirror})}}catch(pe){Te.e(pe)}finally{Te.f()}var Ae=new re;J=new te({recordCanvas:U,mutationCb:Ie,win:window,blockClass:s,blockSelector:d,mirror:ae,sampling:L.canvas,dataURLOptions:F});var Ne=new j({mutationCb:Ee,scrollCb:xe,bypassOptions:{blockClass:s,blockSelector:d,maskTextClass:y,maskTextSelector:b,inlineStylesheet:I,maskInputOptions:ge,dataURLOptions:F,maskTextFn:A,maskInputFn:_,recordCanvas:U,inlineImages:ue,sampling:L,slimDOMOptions:be,iframeManager:Me,stylesheetManager:Ce,canvasManager:J,keepIframeSrcFn:de,processedNodeManager:Ae},mirror:ae});K=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(H){X({type:l.tw.Meta,data:{href:window.location.href,width:(0,c.fM)(),height:(0,c.gp)()}},e),Ce.reset(),Ne.init(),x.forEach((function(e){return e.lock()}));var t=(0,a.CO)(document,{mirror:ae,blockClass:s,blockSelector:d,maskTextClass:y,maskTextSelector:b,inlineStylesheet:I,maskAllInputs:ge,maskTextFn:A,slimDOM:be,dataURLOptions:F,recordCanvas:U,inlineImages:ue,onSerialize:function(e){(0,c.Cj)(e,ae)&&Me.addIframe(e),(0,c.qs)(e,ae)&&Ce.trackLinkElement(e),(0,c.He)(e)&&Ne.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){Me.attachIframe(e,t),Ne.observeAttachShadow(e)},onStylesheetLoad:function(e,t){Ce.attachLinkElement(e,t)},keepIframeSrcFn:de});if(!t)return console.warn("Failed to snapshot the document");X({type:l.tw.FullSnapshot,data:{node:t,initialOffset:(0,c.$1)(window)}},e),x.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ce.adoptStyleSheets(document.adoptedStyleSheets,ae.getId(document))}};try{var Re=[],De=function(e){var t;return E(O)({mutationCb:Ee,mousemoveCb:function(e,t){return X({type:l.tw.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MouseInteraction},e)})},scrollCb:xe,viewportResizeCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.ViewportResize},e)})},inputCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Input},e)})},mediaInteractionCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MediaInteraction},e)})},styleSheetRuleCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleSheetRule},e)})},styleDeclarationCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleDeclaration},e)})},canvasMutationCb:Ie,fontCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Font},e)})},selectionCb:function(e){X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Selection},e)})},customElementCb:function(e){X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.CustomElement},e)})},blockClass:s,ignoreClass:h,ignoreSelector:v,maskTextClass:y,maskTextSelector:b,maskInputOptions:ge,inlineStylesheet:I,sampling:L,recordDOM:H,recordCanvas:U,inlineImages:ue,userTriggeredOnInput:Q,collectFonts:oe,doc:e,maskInputFn:_,maskTextFn:A,keepIframeSrcFn:de,blockSelector:d,slimDOMOptions:be,dataURLOptions:F,mirror:ae,iframeManager:Me,stylesheetManager:Ce,shadowDomManager:Ne,processedNodeManager:Ae,canvasManager:J,ignoreCSSAttributes:he,plugins:(null===(t=null===ce||void 0===ce?void 0:ce.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return X({type:l.tw.Plugin,data:{plugin:e.name,payload:t}})}}})))||[]},N)};Me.addLoadListener((function(e){try{Re.push(De(e.contentDocument))}catch(t){console.warn(t)}}));var Oe=function(){K(),Re.push(De(document)),ie=!0};return"interactive"===document.readyState||"complete"===document.readyState?Oe():(Re.push((0,c.on)("DOMContentLoaded",(function(){X({type:l.tw.DomContentLoaded,data:{}}),"DOMContentLoaded"===$&&Oe()}))),Re.push((0,c.on)("load",(function(){X({type:l.tw.Load,data:{}}),"load"===$&&Oe()}),window))),function(){Re.forEach((function(e){return e()})),Ae.destroy(),ie=!1,S()}}catch(Ze){console.warn(Ze)}}se.addCustomEvent=function(e,t){if(!ie)throw new Error("please add custom event after start recording");X({type:l.tw.Custom,data:{tag:e,payload:t}})},se.freezePage=function(){x.forEach((function(e){return e.freeze()}))},se.takeFullSnapshot=function(e){if(!ie)throw new Error("please take full snapshot after start recording");K(e)},se.mirror=ae;var ue=function(e){var t=function(t){try{if((i=t.target)&&(i instanceof HTMLInputElement&&/|text|email|number|password|search|tel|url/.test(i.type||"")||i instanceof HTMLTextAreaElement)&&!i.disabled&&!i.readOnly)return;n=function(e){return(e.ctrlKey?"ctrl ":"")+(e.altKey?"alt ":"")+(e.shiftKey?"shift ":"")+(e.metaKey?"meta ":"")+e.key}(t),r=t.target,e({key:n,eventTarget:r})}catch(o){}var n,r,i};window.addEventListener("keyup",(function(e){t(e)}))},ce=n(4228),le=n(458),de=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;(0,o.Z)(this,e),this.target=n,this.onEvent=r,this.observer=void 0,this.monitoredTextElements=[],this.inputEnabledSelectors=["[contenteditable=true]"].join(","),this.iframeObservers=[],this.monitorInputEnabledElement=function(e){e.addEventListener("input",(function(e){var n;t.onEvent({text:null===(n=e.target)||void 0===n?void 0:n.innerText,eventTarget:e.target})}))}}return(0,i.Z)(e,[{key:"startObserver",value:function(){var e=this;this.startIframesObserver(),this.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.querySelector){var n=t.querySelector("iframe");n&&console.log("FFF",n)}if(t.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE){var r=t;r.matches(e.inputEnabledSelectors)||r.isContentEditable?e.monitorInputEnabledElement(r):Array.from((0,le.RA)("*",r)).filter((function(t){return t.matches&&t.matches(e.inputEnabledSelectors)||t.isContentEditable})).forEach(e.monitorInputEnabledElement)}}))}))})),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.startInputMonitoring()}},{key:"startIframesObserver",value:function(){var t=this;setInterval((function(){(0,le.RA)("iframe",t.target).forEach((function(n){if(!t.iframeObservers.find((function(e){return e.iframe===n}))){var r=function(n){if(i.contentWindow)try{n.observer=new e(n.iframe.contentWindow.document,t.onEvent),n.observer.startObserver()}catch(r){}},i=n,o={iframe:i,observer:null};t.iframeObservers.push(o),i.contentWindow?r(o):i.addEventListener("load",(function(){r(o)}))}}))}),500)}},{key:"startInputMonitoring",value:function(){this.monitoredTextElements=(0,le.RA)(this.inputEnabledSelectors,this.target),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}}]),e}(),fe=function(){function e(t){var n=this;(0,o.Z)(this,e),this.onEvent=t,this.currentURL=void 0,this.onURLChange=function(){setTimeout((function(){var e=window.location.href;if(e!==n.currentURL){n.currentURL=e;try{n.onEvent({url:e})}catch(t){}}}))}}return(0,i.Z)(e,[{key:"start",value:function(){var e=this;window.addEventListener("popstate",(function(t){e.onURLChange()})),window.addEventListener("locationchange",(function(t){e.onURLChange()})),window.addEventListener("hashchange",(function(t){e.onURLChange()}));var t=window.history.pushState;window.history.pushState=function(){e.onURLChange();for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.apply(window.history,r)};var n=window.history.replaceState;window.history.replaceState=function(){e.onURLChange();for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return n.apply(window.history,r)}}}]),e}(),he=(0,i.Z)((function e(t){var n=this;(0,o.Z)(this,e),this.contentEditableObserver=void 0,this.urlObserver=void 0,this.logNativeMutationObserver=!1,this.stopRRWebRecording=function(){},this.eventHandler=void 0,this.currentURL=void 0,this.start=function(){n.stopRRWebRecording=se({emit:n.eventHandler,sampling:{mousemove:!1},userTriggeredOnInput:!0}),n.logNativeMutationObserver&&n.selfObserve(),n.startURLObserver(),n.startKeyboardObserver(),n.startContentEditableObserver()},this.stop=function(){n.stopRRWebRecording()},this.startURLObserver=function(){n.urlObserver=new fe((function(e){var t={url:e.url};n.addCustomEvent(ce.N.URLChange,t)})),n.urlObserver.start()},this.startContentEditableObserver=function(){n.contentEditableObserver=new de(document,(function(e){var t,r=e.text,i=e.eventTarget,o={text:r,id:null===(t=n.tryGetMetaFromEventTarget(i))||void 0===t?void 0:t.id};n.addCustomEvent(ce.N.ContentEditableInput,o)})),n.contentEditableObserver.startObserver()},this.startKeyboardObserver=function(){ue((function(e){var t,r=e.key,i=e.eventTarget,o={key:r,id:null===(t=n.tryGetMetaFromEventTarget(i))||void 0===t?void 0:t.id};n.addCustomEvent(ce.N.KeyStroke,o)}))},this.addCustomEvent=function(e,t){se.addCustomEvent(e,t)},this.tryGetMetaFromEventTarget=function(e){try{return n.getMeta(e)}catch(t){}},this.selfObserve=function(){var e=document.getElementsByTagName("body");new MutationObserver((function(e,t){var n,i=(0,r.Z)(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;"childList"===o.type?console.log("A child node has been added or removed.",o):"attributes"===o.type&&console.log("The ".concat(o.attributeName," attribute was modified."),o)}}catch(pe){i.e(pe)}finally{i.f()}})).observe(e[0],{attributes:!0,childList:!0,subtree:!0})},this.getNodeById=function(e){return se.mirror.getNode(e)},this.getMeta=function(e){return se.mirror.getMeta(e)},this.eventHandler=t,this.currentURL=window.location.href}))},4228:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});var r=function(e){return e.KeyStroke="key-stroke",e.ContentEditableInput="contenteditable-input",e.URLChange="url-change",e}({})},6301:function(e){e.exports=function(e){return new Promise((function(t){return setTimeout(t,e)}))}},763:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,c=32,l=64,d=128,f=256,h=1/0,p=9007199254740991,v=NaN,m=4294967295,y=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",f]],g="[object Arguments]",b="[object Array]",w="[object Boolean]",k="[object Date]",S="[object Error]",E="[object Function]",x="[object GeneratorFunction]",I="[object Map]",C="[object Number]",M="[object Object]",T="[object Promise]",_="[object RegExp]",A="[object Set]",N="[object String]",R="[object Symbol]",D="[object WeakMap]",O="[object ArrayBuffer]",L="[object DataView]",Z="[object Float32Array]",F="[object Float64Array]",P="[object Int8Array]",j="[object Int16Array]",V="[object Int32Array]",B="[object Uint8Array]",H="[object Uint8ClampedArray]",W="[object Uint16Array]",U="[object Uint32Array]",q=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,Q=RegExp($.source),X=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,ke=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Se=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",Ie="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Me="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",_e="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ne="['\u2019]",Re="["+xe+"]",De="["+Ae+"]",Oe="["+Ie+"]",Le="\\d+",Ze="["+Ce+"]",Fe="["+Me+"]",Pe="[^"+xe+Ae+Le+Ce+Me+Te+"]",je="\\ud83c[\\udffb-\\udfff]",Ve="[^"+xe+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",We="["+Te+"]",Ue="\\u200d",qe="(?:"+Fe+"|"+Pe+")",ze="(?:"+We+"|"+Pe+")",Ge="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",$e="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+Oe+"|"+je+")"+"?",Qe="["+_e+"]?",Xe=Qe+Ye+("(?:"+Ue+"(?:"+[Ve,Be,He].join("|")+")"+Qe+Ye+")*"),Ke="(?:"+[Ze,Be,He].join("|")+")"+Xe,Je="(?:"+[Ve+Oe+"?",Oe,Be,He,Re].join("|")+")",et=RegExp(Ne,"g"),tt=RegExp(Oe,"g"),nt=RegExp(je+"(?="+je+")|"+Je+Xe,"g"),rt=RegExp([We+"?"+Fe+"+"+Ge+"(?="+[De,We,"$"].join("|")+")",ze+"+"+$e+"(?="+[De,We+qe,"$"].join("|")+")",We+"?"+qe+"+"+Ge,We+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Ke].join("|"),"g"),it=RegExp("["+Ue+xe+Ie+_e+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,ut={};ut[Z]=ut[F]=ut[P]=ut[j]=ut[V]=ut[B]=ut[H]=ut[W]=ut[U]=!0,ut[g]=ut[b]=ut[O]=ut[w]=ut[L]=ut[k]=ut[S]=ut[E]=ut[I]=ut[C]=ut[M]=ut[_]=ut[A]=ut[N]=ut[D]=!1;var ct={};ct[g]=ct[b]=ct[O]=ct[L]=ct[w]=ct[k]=ct[Z]=ct[F]=ct[P]=ct[j]=ct[V]=ct[I]=ct[C]=ct[M]=ct[_]=ct[A]=ct[N]=ct[R]=ct[B]=ct[H]=ct[W]=ct[U]=!0,ct[S]=ct[E]=ct[D]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ft=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,vt=ht||pt||Function("return this")(),mt=t&&!t.nodeType&&t,yt=mt&&e&&!e.nodeType&&e,gt=yt&&yt.exports===mt,bt=gt&&ht.process,wt=function(){try{var e=yt&&yt.require&&yt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),kt=wt&&wt.isArrayBuffer,St=wt&&wt.isDate,Et=wt&&wt.isMap,xt=wt&&wt.isRegExp,It=wt&&wt.isSet,Ct=wt&&wt.isTypedArray;function Mt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Tt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Nt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Dt(e,t){return!!(null==e?0:e.length)&&Wt(e,t,0)>-1}function Ot(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Lt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Zt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Pt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Vt=Gt("length");function Bt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ht(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Wt(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ht(e,qt,n)}function Ut(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function qt(e){return e!==e}function zt(e,t){var n=null==e?0:e.length;return n?Qt(e,t)/n:v}function Gt(e){return function(t){return null==t?i:t[e]}}function $t(e){return function(t){return null==e?i:e[t]}}function Yt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Qt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Kt(e){return e?e.slice(0,mn(e)+1).replace(ae,""):e}function Jt(e){return function(t){return e(t)}}function en(e,t){return Lt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Wt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Wt(t,e[n],0)>-1;);return n}var on=$t({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=$t({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(e){return"\\"+lt[e]}function un(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return un(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):Vt(e)}function vn(e){return un(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function mn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var yn=$t({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var gn=function e(t){var n=(t=null==t?vt:gn.defaults(vt.Object(),t,gn.pick(vt,at))).Array,r=t.Date,se=t.Error,xe=t.Function,Ie=t.Math,Ce=t.Object,Me=t.RegExp,Te=t.String,_e=t.TypeError,Ae=n.prototype,Ne=xe.prototype,Re=Ce.prototype,De=t["__core-js_shared__"],Oe=Ne.toString,Le=Re.hasOwnProperty,Ze=0,Fe=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Pe=Re.toString,je=Oe.call(Ce),Ve=vt._,Be=Me("^"+Oe.call(Le).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=gt?t.Buffer:i,We=t.Symbol,Ue=t.Uint8Array,qe=He?He.allocUnsafe:i,ze=ln(Ce.getPrototypeOf,Ce),Ge=Ce.create,$e=Re.propertyIsEnumerable,Ye=Ae.splice,Qe=We?We.isConcatSpreadable:i,Xe=We?We.iterator:i,Ke=We?We.toStringTag:i,Je=function(){try{var e=fo(Ce,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==vt.clearTimeout&&t.clearTimeout,it=r&&r.now!==vt.Date.now&&r.now,lt=t.setTimeout!==vt.setTimeout&&t.setTimeout,ht=Ie.ceil,pt=Ie.floor,mt=Ce.getOwnPropertySymbols,yt=He?He.isBuffer:i,bt=t.isFinite,wt=Ae.join,Vt=ln(Ce.keys,Ce),$t=Ie.max,bn=Ie.min,wn=r.now,kn=t.parseInt,Sn=Ie.random,En=Ae.reverse,xn=fo(t,"DataView"),In=fo(t,"Map"),Cn=fo(t,"Promise"),Mn=fo(t,"Set"),Tn=fo(t,"WeakMap"),_n=fo(Ce,"create"),An=Tn&&new Tn,Nn={},Rn=Po(xn),Dn=Po(In),On=Po(Cn),Ln=Po(Mn),Zn=Po(Tn),Fn=We?We.prototype:i,Pn=Fn?Fn.valueOf:i,jn=Fn?Fn.toString:i;function Vn(e){if(ts(e)&&!Ua(e)&&!(e instanceof Un)){if(e instanceof Wn)return e;if(Le.call(e,"__wrapped__"))return jo(e)}return new Wn(e)}var Bn=function(){function e(){}return function(t){if(!es(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Hn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new zn(e);this.size=t.size}function Qn(e,t){var n=Ua(e),r=!n&&Wa(e),i=!n&&!r&&$a(e),o=!n&&!r&&!i&&cs(e),a=n||r||i||o,s=a?Xt(e.length,Te):[],u=s.length;for(var c in e)!t&&!Le.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,u))||s.push(c);return s}function Xn(e){var t=e.length;return t?e[$r(0,t-1)]:i}function Kn(e,t){return Lo(_i(e),sr(t,0,e.length))}function Jn(e){return Lo(_i(e))}function er(e,t,n){(n!==i&&!Va(e[t],n)||n===i&&!(t in e))&&or(e,t,n)}function tr(e,t,n){var r=e[t];Le.call(e,t)&&Va(r,n)&&(n!==i||t in e)||or(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(Va(e[n][0],t))return n;return-1}function rr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ir(e,t){return e&&Ai(t,Ns(t),e)}function or(e,t,n){"__proto__"==t&&Je?Je(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,o=t.length,a=n(o),s=null==e;++r<o;)a[r]=s?i:Cs(e,t[r]);return a}function sr(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ur(e,t,n,r,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!es(e))return e;var d=Ua(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Le.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return _i(e,s)}else{var f=vo(e),h=f==E||f==x;if($a(e))return Ei(e,u);if(f==M||f==g||h&&!o){if(s=c||h?{}:yo(e),!u)return c?function(e,t){return Ai(e,po(e),t)}(e,function(e,t){return e&&Ai(t,Rs(t),e)}(s,e)):function(e,t){return Ai(e,ho(e),t)}(e,ir(s,e))}else{if(!ct[f])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case O:return xi(e);case w:case k:return new r(+e);case L:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case Z:case F:case P:case j:case V:case B:case H:case W:case U:return Ii(e,n);case I:return new r;case C:case N:return new r(e);case _:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new r;case R:return i=e,Pn?Ce(Pn.call(i)):{}}var i}(e,f,u)}}a||(a=new Yn);var p=a.get(e);if(p)return p;a.set(e,s),as(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,a))})):ns(e)&&e.forEach((function(r,i){s.set(i,ur(r,t,n,i,e,a))}));var v=d?i:(l?c?io:ro:c?Rs:Ns)(e);return _t(v||e,(function(r,i){v&&(r=e[i=r]),tr(s,i,ur(r,t,n,i,e,a))})),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new _e(o);return No((function(){e.apply(i,n)}),t)}function dr(e,t,n,r){var i=-1,o=Dt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Lt(t,Jt(n))),r?(o=Ot,a=!1):t.length>=200&&(o=tn,a=!1,t=new $n(t));e:for(;++i<s;){var l=e[i],d=null==n?l:n(l);if(l=r||0!==l?l:0,a&&d===d){for(var f=c;f--;)if(t[f]===d)continue e;u.push(l)}else o(t,d,r)||u.push(l)}return u}Vn.templateSettings={escape:K,evaluate:J,interpolate:ee,variable:"",imports:{_:Vn}},Vn.prototype=Hn.prototype,Vn.prototype.constructor=Vn,Wn.prototype=Bn(Hn.prototype),Wn.prototype.constructor=Wn,Un.prototype=Bn(Hn.prototype),Un.prototype.constructor=Un,qn.prototype.clear=function(){this.__data__=_n?_n(null):{},this.size=0},qn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qn.prototype.get=function(e){var t=this.__data__;if(_n){var n=t[e];return n===a?i:n}return Le.call(t,e)?t[e]:i},qn.prototype.has=function(e){var t=this.__data__;return _n?t[e]!==i:Le.call(t,e)},qn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=_n&&t===i?a:t,this},zn.prototype.clear=function(){this.__data__=[],this.size=0},zn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ye.call(t,n,1),--this.size,!0)},zn.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?i:t[n][1]},zn.prototype.has=function(e){return nr(this.__data__,e)>-1},zn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(In||zn),string:new qn}},Gn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return co(this,e).get(e)},Gn.prototype.has=function(e){return co(this,e).has(e)},Gn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},$n.prototype.add=$n.prototype.push=function(e){return this.__data__.set(e,a),this},$n.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new zn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof zn){var r=n.__data__;if(!In||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var fr=Di(wr),hr=Di(kr,!0);function pr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function vr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s===s&&!us(s):n(s,u)))var u=s,c=a}return c}function mr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=go),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?yr(s,t-1,n,r,i):Zt(i,s):r||(i[i.length]=s)}return i}var gr=Oi(),br=Oi(!0);function wr(e,t){return e&&gr(e,t,Ns)}function kr(e,t){return e&&br(e,t,Ns)}function Sr(e,t){return Rt(t,(function(t){return Xa(e[t])}))}function Er(e,t){for(var n=0,r=(t=bi(t,e)).length;null!=e&&n<r;)e=e[Fo(t[n++])];return n&&n==r?e:i}function xr(e,t,n){var r=t(e);return Ua(e)?r:Zt(r,n(e))}function Ir(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ke&&Ke in Ce(e)?function(e){var t=Le.call(e,Ke),n=e[Ke];try{e[Ke]=i;var r=!0}catch(a){}var o=Pe.call(e);r&&(t?e[Ke]=n:delete e[Ke]);return o}(e):function(e){return Pe.call(e)}(e)}function Cr(e,t){return e>t}function Mr(e,t){return null!=e&&Le.call(e,t)}function Tr(e,t){return null!=e&&t in Ce(e)}function _r(e,t,r){for(var o=r?Ot:Dt,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,d=[];u--;){var f=e[u];u&&t&&(f=Lt(f,Jt(t))),l=bn(f.length,l),c[u]=!r&&(t||a>=120&&f.length>=120)?new $n(u&&f):i}f=e[0];var h=-1,p=c[0];e:for(;++h<a&&d.length<l;){var v=f[h],m=t?t(v):v;if(v=r||0!==v?v:0,!(p?tn(p,m):o(d,m,r))){for(u=s;--u;){var y=c[u];if(!(y?tn(y,m):o(e[u],m,r)))continue e}p&&p.push(m),d.push(v)}}return d}function Ar(e,t,n){var r=null==(e=To(e,t=bi(t,e)))?e:e[Fo(Qo(t))];return null==r?i:Mt(r,e,n)}function Nr(e){return ts(e)&&Ir(e)==g}function Rr(e,t,n,r,o){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!==e&&t!==t:function(e,t,n,r,o,a){var s=Ua(e),u=Ua(t),c=s?b:vo(e),l=u?b:vo(t),d=(c=c==g?M:c)==M,f=(l=l==g?M:l)==M,h=c==l;if(h&&$a(e)){if(!$a(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new Yn),s||cs(e)?to(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case w:case k:case C:return Va(+e,+t);case S:return e.name==t.name&&e.message==t.message;case _:case N:return e==t+"";case I:var s=cn;case A:var u=1&r;if(s||(s=fn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=to(s(e),s(t),r,i,o,a);return a.delete(e),l;case R:if(Pn)return Pn.call(e)==Pn.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var p=d&&Le.call(e,"__wrapped__"),v=f&&Le.call(t,"__wrapped__");if(p||v){var m=p?e.value():e,y=v?t.value():t;return a||(a=new Yn),o(m,y,n,r,a)}}if(!h)return!1;return a||(a=new Yn),function(e,t,n,r,o,a){var s=1&n,u=ro(e),c=u.length,l=ro(t),d=l.length;if(c!=d&&!s)return!1;var f=c;for(;f--;){var h=u[f];if(!(s?h in t:Le.call(t,h)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);var y=s;for(;++f<c;){var g=e[h=u[f]],b=t[h];if(r)var w=s?r(b,g,h,t,e,a):r(g,b,h,e,t,a);if(!(w===i?g===b||o(g,b,n,r,a):w)){m=!1;break}y||(y="constructor"==h)}if(m&&!y){var k=e.constructor,S=t.constructor;k==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof k&&k instanceof k&&"function"==typeof S&&S instanceof S||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,n,r,o,a)}(e,t,n,r,Rr,o))}function Dr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=Ce(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],d=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var f=new Yn;if(r)var h=r(l,d,c,e,t,f);if(!(h===i?Rr(d,l,3,r,f):h))return!1}}return!0}function Or(e){return!(!es(e)||(t=e,Fe&&Fe in t))&&(Xa(e)?Be:ge).test(Po(e));var t}function Lr(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Ua(e)?Br(e[0],e[1]):Vr(e):fu(e)}function Zr(e){if(!xo(e))return Vt(e);var t=[];for(var n in Ce(e))Le.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fr(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=xo(e),n=[];for(var r in e)("constructor"!=r||!t&&Le.call(e,r))&&n.push(r);return n}function Pr(e,t){return e<t}function jr(e,t){var r=-1,i=za(e)?n(e.length):[];return fr(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Vr(e){var t=lo(e);return 1==t.length&&t[0][2]?Co(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}}function Br(e,t){return ko(e)&&Io(t)?Co(Fo(e),t):function(n){var r=Cs(n,e);return r===i&&r===t?Ms(n,e):Rr(t,r,3)}}function Hr(e,t,n,r,o){e!==t&&gr(t,(function(a,s){if(o||(o=new Yn),es(a))!function(e,t,n,r,o,a,s){var u=_o(e,n),c=_o(t,n),l=s.get(c);if(l)return void er(e,n,l);var d=a?a(u,c,n+"",e,t,s):i,f=d===i;if(f){var h=Ua(c),p=!h&&$a(c),v=!h&&!p&&cs(c);d=c,h||p||v?Ua(u)?d=u:Ga(u)?d=_i(u):p?(f=!1,d=Ei(c,!0)):v?(f=!1,d=Ii(c,!0)):d=[]:is(c)||Wa(c)?(d=u,Wa(u)?d=ys(u):es(u)&&!Xa(u)||(d=yo(c))):f=!1}f&&(s.set(c,d),o(d,c,r,a,s),s.delete(c));er(e,n,d)}(e,t,s,n,Hr,r,o);else{var u=r?r(_o(e,s),a,s+"",e,t,o):i;u===i&&(u=a),er(e,s,u)}}),Rs)}function Wr(e,t){var n=e.length;if(n)return bo(t+=t<0?n:0,n)?e[t]:i}function Ur(e,t,n){t=t.length?Lt(t,(function(e){return Ua(e)?function(t){return Er(t,1===e.length?e[0]:e)}:e})):[ru];var r=-1;t=Lt(t,Jt(uo()));var i=jr(e,(function(e,n,i){var o=Lt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ci(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function qr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Er(e,a);n(s,a)&&Jr(o,bi(a,e),s)}return o}function zr(e,t,n,r){var i=r?Ut:Wt,o=-1,a=t.length,s=e;for(e===t&&(t=_i(t)),n&&(s=Lt(e,Jt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Ye.call(s,u,1),Ye.call(e,u,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Ye.call(e,i,1):di(e,i)}}return e}function $r(e,t){return e+pt(Sn()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Qr(e,t){return Ro(Mo(e,t,ru),e+"")}function Xr(e){return Xn(Vs(e))}function Kr(e,t){var n=Vs(e);return Lo(n,sr(t,0,n.length))}function Jr(e,t,n,r){if(!es(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Fo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var d=u[c];(l=r?r(d,c,u):i)===i&&(l=es(d)?d:bo(t[o+1])?[]:{})}tr(u,c,l),u=u[c]}return e}var ei=An?function(e,t){return An.set(e,t),e}:ru,ti=Je?function(e,t){return Je(e,"toString",{configurable:!0,enumerable:!1,value:eu(t),writable:!0})}:ru;function ni(e){return Lo(Vs(e))}function ri(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function ii(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!us(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ai(e,t,ru,n)}function ai(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!==t,u=null===t,c=us(t),l=t===i;o<a;){var d=pt((o+a)/2),f=n(e[d]),h=f!==i,p=null===f,v=f===f,m=us(f);if(s)var y=r||v;else y=l?v&&(r||h):u?v&&h&&(r||!p):c?v&&h&&!p&&(r||!m):!p&&!m&&(r?f<=t:f<t);y?o=d+1:a=d}return bn(a,4294967294)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Va(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ui(e){return"number"==typeof e?e:us(e)?v:+e}function ci(e){if("string"==typeof e)return e;if(Ua(e))return Lt(e,ci)+"";if(us(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function li(e,t,n){var r=-1,i=Dt,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=Ot;else if(o>=200){var c=t?null:Yi(e);if(c)return fn(c);a=!1,i=tn,u=new $n}else u=t?[]:s;e:for(;++r<o;){var l=e[r],d=t?t(l):l;if(l=n||0!==l?l:0,a&&d===d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(l)}else i(u,d,n)||(u!==s&&u.push(d),s.push(l))}return s}function di(e,t){return null==(e=To(e,t=bi(t,e)))||delete e[Fo(Qo(t))]}function fi(e,t,n,r){return Jr(e,t,n(Er(e,t)),r)}function hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof Un&&(n=n.value()),Ft(t,(function(e,t){return t.func.apply(t.thisArg,Zt([e],t.args))}),n)}function vi(e,t,r){var i=e.length;if(i<2)return i?li(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=dr(a[o]||s,e[u],t,r));return li(yr(a,1),t,r)}function mi(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function yi(e){return Ga(e)?e:[]}function gi(e){return"function"==typeof e?e:ru}function bi(e,t){return Ua(e)?e:ko(e,t)?[e]:Zo(gs(e))}var wi=Qr;function ki(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ri(e,t,n)}var Si=nt||function(e){return vt.clearTimeout(e)};function Ei(e,t){if(t)return e.slice();var n=e.length,r=qe?qe(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Ii(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ci(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=us(e),s=t!==i,u=null===t,c=t===t,l=us(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Mi(e,t,r,i){for(var o=-1,a=e.length,s=r.length,u=-1,c=t.length,l=$t(a-s,0),d=n(c+l),f=!i;++u<c;)d[u]=t[u];for(;++o<s;)(f||o<a)&&(d[r[o]]=e[o]);for(;l--;)d[u++]=e[o++];return d}function Ti(e,t,r,i){for(var o=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,d=$t(a-u,0),f=n(d+l),h=!i;++o<d;)f[o]=e[o];for(var p=o;++c<l;)f[p+c]=t[c];for(;++s<u;)(h||o<a)&&(f[p+r[s]]=e[o++]);return f}function _i(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ai(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?or(n,u,c):tr(n,u,c)}return n}function Ni(e,t){return function(n,r){var i=Ua(n)?Tt:rr,o=t?t():{};return i(n,e,uo(r,2),o)}}function Ri(e){return Qr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&wo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=Ce(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Di(e,t){return function(n,r){if(null==n)return n;if(!za(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ce(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Oi(e){return function(t,n,r){for(var i=-1,o=Ce(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Li(e){return function(t){var n=un(t=gs(t))?vn(t):i,r=n?n[0]:t.charAt(0),o=n?ki(n,1).join(""):t.slice(1);return r[e]()+o}}function Zi(e){return function(t){return Ft(Xs(Ws(t).replace(et,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Pi(e){return function(t,n,r){var o=Ce(t);if(!za(t)){var a=uo(n,3);t=Ns(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function ji(e){return no((function(t){var n=t.length,r=n,a=Wn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new _e(o);if(a&&!u&&"wrapper"==ao(s))var u=new Wn([],!0)}for(r=u?r:n;++r<n;){var c=ao(s=t[r]),l="wrapper"==c?oo(s):i;u=l&&So(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[ao(l[0])].apply(u,l[3]):1==s.length&&So(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ua(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Vi(e,t,r,o,a,s,u,c,l,f){var h=t&d,p=1&t,v=2&t,m=24&t,y=512&t,g=v?i:Fi(e);return function d(){for(var b=arguments.length,w=n(b),k=b;k--;)w[k]=arguments[k];if(m)var S=so(d),E=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,S);if(o&&(w=Mi(w,o,a,m)),s&&(w=Ti(w,s,u,m)),b-=E,m&&b<f){var x=dn(w,S);return Gi(e,t,Vi,d.placeholder,r,w,x,c,l,f-b)}var I=p?r:this,C=v?I[e]:e;return b=w.length,c?w=function(e,t){var n=e.length,r=bn(t.length,n),o=_i(e);for(;r--;){var a=t[r];e[r]=bo(a,n)?o[a]:i}return e}(w,c):y&&b>1&&w.reverse(),h&&l<b&&(w.length=l),this&&this!==vt&&this instanceof d&&(C=g||Fi(C)),C.apply(I,w)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Hi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ci(n),r=ci(r)):(n=ui(n),r=ui(r)),o=e(n,r)}return o}}function Wi(e){return no((function(t){return t=Lt(t,Jt(uo())),Qr((function(n){var r=this;return e(t,(function(e){return Mt(e,r,n)}))}))}))}function Ui(e,t){var n=(t=t===i?" ":ci(t)).length;if(n<2)return n?Yr(t,e):t;var r=Yr(t,ht(e/pn(t)));return un(t)?ki(vn(r),0,e).join(""):r.slice(0,e)}function qi(e){return function(t,r,o){return o&&"number"!=typeof o&&wo(t,r,o)&&(r=o=i),t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r,i){for(var o=-1,a=$t(ht((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:hs(o),e)}}function zi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function Gi(e,t,n,r,o,a,s,u,d,f){var h=8&t;t|=h?c:l,4&(t&=~(h?l:c))||(t&=-4);var p=[e,t,o,h?a:i,h?s:i,h?i:a,h?i:s,u,d,f],v=n.apply(i,p);return So(e)&&Ao(v,p),v.placeholder=r,Do(v,e,t)}function $i(e){var t=Ie[e];return function(e,n){if(e=ms(e),(n=null==n?0:bn(ps(n),292))&&bt(e)){var r=(gs(e)+"e").split("e");return+((r=(gs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Yi=Mn&&1/fn(new Mn([,-0]))[1]==h?function(e){return new Mn(e)}:uu;function Qi(e){return function(t){var n=vo(t);return n==I?cn(t):n==A?hn(t):function(e,t){return Lt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,r,a,h,p,v,m){var y=2&t;if(!y&&"function"!=typeof e)throw new _e(o);var g=a?a.length:0;if(g||(t&=-97,a=h=i),v=v===i?v:$t(ps(v),0),m=m===i?m:ps(m),g-=h?h.length:0,t&l){var b=a,w=h;a=h=i}var k=y?i:oo(e),S=[e,t,r,a,h,b,w,p,v,m];if(k&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==d&&8==n||r==d&&n==f&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Mi(c,u,t[4]):u,e[4]=c?dn(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Ti(c,u,t[6]):u,e[6]=c?dn(e[5],s):t[6]);(u=t[7])&&(e[7]=u);r&d&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(S,k),e=S[0],t=S[1],r=S[2],a=S[3],h=S[4],!(m=S[9]=S[9]===i?y?0:e.length:$t(S[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||t==u?function(e,t,r){var o=Fi(e);return function a(){for(var s=arguments.length,u=n(s),c=s,l=so(a);c--;)u[c]=arguments[c];var d=s<3&&u[0]!==l&&u[s-1]!==l?[]:dn(u,l);return(s-=d.length)<r?Gi(e,t,Vi,a.placeholder,i,u,d,i,i,r-s):Mt(this&&this!==vt&&this instanceof a?o:e,this,u)}}(e,t,m):t!=c&&33!=t||h.length?Vi.apply(i,S):function(e,t,r,i){var o=1&t,a=Fi(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,d=n(l+u),f=this&&this!==vt&&this instanceof t?a:e;++c<l;)d[c]=i[c];for(;u--;)d[c++]=arguments[++s];return Mt(f,o?r:this,d)}}(e,t,r,a);else var E=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==vt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return Do((k?ei:Ao)(E,S),e,t)}function Ki(e,t,n,r){return e===i||Va(e,Re[n])&&!Le.call(r,n)?t:e}function Ji(e,t,n,r,o,a){return es(e)&&es(t)&&(a.set(t,e),Hr(e,t,i,Ji,a),a.delete(t)),e}function eo(e){return is(e)?i:e}function to(e,t,n,r,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),d=a.get(t);if(l&&d)return l==t&&d==e;var f=-1,h=!0,p=2&n?new $n:i;for(a.set(e,t),a.set(t,e);++f<u;){var v=e[f],m=t[f];if(r)var y=s?r(m,v,f,t,e,a):r(v,m,f,e,t,a);if(y!==i){if(y)continue;h=!1;break}if(p){if(!jt(t,(function(e,t){if(!tn(p,t)&&(v===e||o(v,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(v!==m&&!o(v,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function no(e){return Ro(Mo(e,i,qo),e+"")}function ro(e){return xr(e,Ns,ho)}function io(e){return xr(e,Rs,po)}var oo=An?function(e){return An.get(e)}:uu;function ao(e){for(var t=e.name+"",n=Nn[t],r=Le.call(Nn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Le.call(Vn,"placeholder")?Vn:e).placeholder}function uo(){var e=Vn.iteratee||iu;return e=e===iu?Lr:e,arguments.length?e(arguments[0],arguments[1]):e}function co(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function lo(e){for(var t=Ns(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Io(i)]}return t}function fo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Or(n)?n:i}var ho=mt?function(e){return null==e?[]:(e=Ce(e),Rt(mt(e),(function(t){return $e.call(e,t)})))}:vu,po=mt?function(e){for(var t=[];e;)Zt(t,ho(e)),e=ze(e);return t}:vu,vo=Ir;function mo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Fo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&bo(a,i)&&(Ua(e)||Wa(e))}function yo(e){return"function"!=typeof e.constructor||xo(e)?{}:Bn(ze(e))}function go(e){return Ua(e)||Wa(e)||!!(Qe&&e&&e[Qe])}function bo(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function wo(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?za(n)&&bo(t,n.length):"string"==r&&t in n)&&Va(n[t],e)}function ko(e,t){if(Ua(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!us(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ce(t))}function So(e){var t=ao(e),n=Vn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=oo(n);return!!r&&e===r[0]}(xn&&vo(new xn(new ArrayBuffer(1)))!=L||In&&vo(new In)!=I||Cn&&vo(Cn.resolve())!=T||Mn&&vo(new Mn)!=A||Tn&&vo(new Tn)!=D)&&(vo=function(e){var t=Ir(e),n=t==M?e.constructor:i,r=n?Po(n):"";if(r)switch(r){case Rn:return L;case Dn:return I;case On:return T;case Ln:return A;case Zn:return D}return t});var Eo=De?Xa:mu;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Io(e){return e===e&&!es(e)}function Co(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Ce(n)))}}function Mo(e,t,r){return t=$t(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=$t(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(s),Mt(e,this,u)}}function To(e,t){return t.length<2?e:Er(e,ri(t,0,-1))}function _o(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var Ao=Oo(ei),No=lt||function(e,t){return vt.setTimeout(e,t)},Ro=Oo(ti);function Do(e,t,n){var r=t+"";return Ro(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return _t(y,(function(n){var r="_."+n[0];t&n[1]&&!Dt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(le):[]}(r),n)))}function Oo(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Lo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=$r(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Zo=function(e){var t=Oa(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)})),t}));function Fo(e){if("string"==typeof e||us(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Po(e){if(null!=e){try{return Oe.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function jo(e){if(e instanceof Un)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=_i(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vo=Qr((function(e,t){return Ga(e)?dr(e,yr(t,1,Ga,!0)):[]})),Bo=Qr((function(e,t){var n=Qo(t);return Ga(n)&&(n=i),Ga(e)?dr(e,yr(t,1,Ga,!0),uo(n,2)):[]})),Ho=Qr((function(e,t){var n=Qo(t);return Ga(n)&&(n=i),Ga(e)?dr(e,yr(t,1,Ga,!0),i,n):[]}));function Wo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=$t(r+i,0)),Ht(e,uo(t,3),i)}function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ps(n),o=n<0?$t(r+o,0):bn(o,r-1)),Ht(e,uo(t,3),o,!0)}function qo(e){return(null==e?0:e.length)?yr(e,1):[]}function zo(e){return e&&e.length?e[0]:i}var Go=Qr((function(e){var t=Lt(e,yi);return t.length&&t[0]===e[0]?_r(t):[]})),$o=Qr((function(e){var t=Qo(e),n=Lt(e,yi);return t===Qo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?_r(n,uo(t,2)):[]})),Yo=Qr((function(e){var t=Qo(e),n=Lt(e,yi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?_r(n,i,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xo=Qr(Ko);function Ko(e,t){return e&&e.length&&t&&t.length?zr(e,t):e}var Jo=no((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Gr(e,Lt(t,(function(e){return bo(e,n)?+e:e})).sort(Ci)),r}));function ea(e){return null==e?e:En.call(e)}var ta=Qr((function(e){return li(yr(e,1,Ga,!0))})),na=Qr((function(e){var t=Qo(e);return Ga(t)&&(t=i),li(yr(e,1,Ga,!0),uo(t,2))})),ra=Qr((function(e){var t=Qo(e);return t="function"==typeof t?t:i,li(yr(e,1,Ga,!0),i,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Ga(e))return t=$t(e.length,t),!0})),Xt(t,(function(t){return Lt(e,Gt(t))}))}function oa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Lt(n,(function(e){return Mt(t,i,e)}))}var aa=Qr((function(e,t){return Ga(e)?dr(e,t):[]})),sa=Qr((function(e){return vi(Rt(e,Ga))})),ua=Qr((function(e){var t=Qo(e);return Ga(t)&&(t=i),vi(Rt(e,Ga),uo(t,2))})),ca=Qr((function(e){var t=Qo(e);return t="function"==typeof t?t:i,vi(Rt(e,Ga),i,t)})),la=Qr(ia);var da=Qr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,oa(e,n)}));function fa(e){var t=Vn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var pa=no((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Un&&bo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Wn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var va=Ni((function(e,t,n){Le.call(e,n)?++e[n]:or(e,n,1)}));var ma=Pi(Wo),ya=Pi(Uo);function ga(e,t){return(Ua(e)?_t:fr)(e,uo(t,3))}function ba(e,t){return(Ua(e)?At:hr)(e,uo(t,3))}var wa=Ni((function(e,t,n){Le.call(e,n)?e[n].push(t):or(e,n,[t])}));var ka=Qr((function(e,t,r){var i=-1,o="function"==typeof t,a=za(e)?n(e.length):[];return fr(e,(function(e){a[++i]=o?Mt(t,e,r):Ar(e,t,r)})),a})),Sa=Ni((function(e,t,n){or(e,n,t)}));function Ea(e,t){return(Ua(e)?Lt:jr)(e,uo(t,3))}var xa=Ni((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ia=Qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),Ur(e,yr(t,1),[])})),Ca=it||function(){return vt.Date.now()};function Ma(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xi(e,d,i,i,i,i,t)}function Ta(e,t){var n;if("function"!=typeof t)throw new _e(o);return e=ps(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var _a=Qr((function(e,t,n){var r=1;if(n.length){var i=dn(n,so(_a));r|=c}return Xi(e,r,t,n,i)})),Aa=Qr((function(e,t,n){var r=3;if(n.length){var i=dn(n,so(Aa));r|=c}return Xi(t,r,e,n,i)}));function Na(e,t,n){var r,a,s,u,c,l,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new _e(o);function v(t){var n=r,o=a;return r=a=i,d=t,u=e.apply(o,n)}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-d>=s}function y(){var e=Ca();if(m(e))return g(e);c=No(y,function(e){var n=t-(e-l);return h?bn(n,s-(e-d)):n}(e))}function g(e){return c=i,p&&r?v(e):(r=a=i,u)}function b(){var e=Ca(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===i)return function(e){return d=e,c=No(y,t),f?v(e):u}(l);if(h)return Si(c),c=No(y,t),v(l)}return c===i&&(c=No(y,t)),u}return t=ms(t)||0,es(n)&&(f=!!n.leading,s=(h="maxWait"in n)?$t(ms(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==i&&Si(c),d=0,r=l=a=c=i},b.flush=function(){return c===i?u:g(Ca())},b}var Ra=Qr((function(e,t){return lr(e,1,t)})),Da=Qr((function(e,t,n){return lr(e,ms(t)||0,n)}));function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new _e(o);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Oa.Cache||Gn),n}function La(e){if("function"!=typeof e)throw new _e(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=Gn;var Za=wi((function(e,t){var n=(t=1==t.length&&Ua(t[0])?Lt(t[0],Jt(uo())):Lt(yr(t,1),Jt(uo()))).length;return Qr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Mt(e,this,r)}))})),Fa=Qr((function(e,t){var n=dn(t,so(Fa));return Xi(e,c,i,t,n)})),Pa=Qr((function(e,t){var n=dn(t,so(Pa));return Xi(e,l,i,t,n)})),ja=no((function(e,t){return Xi(e,f,i,i,i,t)}));function Va(e,t){return e===t||e!==e&&t!==t}var Ba=zi(Cr),Ha=zi((function(e,t){return e>=t})),Wa=Nr(function(){return arguments}())?Nr:function(e){return ts(e)&&Le.call(e,"callee")&&!$e.call(e,"callee")},Ua=n.isArray,qa=kt?Jt(kt):function(e){return ts(e)&&Ir(e)==O};function za(e){return null!=e&&Ja(e.length)&&!Xa(e)}function Ga(e){return ts(e)&&za(e)}var $a=yt||mu,Ya=St?Jt(St):function(e){return ts(e)&&Ir(e)==k};function Qa(e){if(!ts(e))return!1;var t=Ir(e);return t==S||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Xa(e){if(!es(e))return!1;var t=Ir(e);return t==E||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ka(e){return"number"==typeof e&&e==ps(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=Et?Jt(Et):function(e){return ts(e)&&vo(e)==I};function rs(e){return"number"==typeof e||ts(e)&&Ir(e)==C}function is(e){if(!ts(e)||Ir(e)!=M)return!1;var t=ze(e);if(null===t)return!0;var n=Le.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==je}var os=xt?Jt(xt):function(e){return ts(e)&&Ir(e)==_};var as=It?Jt(It):function(e){return ts(e)&&vo(e)==A};function ss(e){return"string"==typeof e||!Ua(e)&&ts(e)&&Ir(e)==N}function us(e){return"symbol"==typeof e||ts(e)&&Ir(e)==R}var cs=Ct?Jt(Ct):function(e){return ts(e)&&Ja(e.length)&&!!ut[Ir(e)]};var ls=zi(Pr),ds=zi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(za(e))return ss(e)?vn(e):_i(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=vo(e);return(t==I?cn:t==A?fn:Vs)(e)}function hs(e){return e?(e=ms(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ps(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function vs(e){return e?sr(ps(e),0,m):0}function ms(e){if("number"==typeof e)return e;if(us(e))return v;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=ye.test(e);return n||be.test(e)?ft(e.slice(2),n?2:8):me.test(e)?v:+e}function ys(e){return Ai(e,Rs(e))}function gs(e){return null==e?"":ci(e)}var bs=Ri((function(e,t){if(xo(t)||za(t))Ai(t,Ns(t),e);else for(var n in t)Le.call(t,n)&&tr(e,n,t[n])})),ws=Ri((function(e,t){Ai(t,Rs(t),e)})),ks=Ri((function(e,t,n,r){Ai(t,Rs(t),e,r)})),Ss=Ri((function(e,t,n,r){Ai(t,Ns(t),e,r)})),Es=no(ar);var xs=Qr((function(e,t){e=Ce(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&wo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Rs(a),u=-1,c=s.length;++u<c;){var l=s[u],d=e[l];(d===i||Va(d,Re[l])&&!Le.call(e,l))&&(e[l]=a[l])}return e})),Is=Qr((function(e){return e.push(i,Ji),Mt(Os,i,e)}));function Cs(e,t,n){var r=null==e?i:Er(e,t);return r===i?n:r}function Ms(e,t){return null!=e&&mo(e,t,Tr)}var Ts=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),e[t]=n}),eu(ru)),_s=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),Le.call(e,t)?e[t].push(n):e[t]=[n]}),uo),As=Qr(Ar);function Ns(e){return za(e)?Qn(e):Zr(e)}function Rs(e){return za(e)?Qn(e,!0):Fr(e)}var Ds=Ri((function(e,t,n){Hr(e,t,n)})),Os=Ri((function(e,t,n,r){Hr(e,t,n,r)})),Ls=no((function(e,t){var n={};if(null==e)return n;var r=!1;t=Lt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ai(e,io(e),n),r&&(n=ur(n,7,eo));for(var i=t.length;i--;)di(n,t[i]);return n}));var Zs=no((function(e,t){return null==e?{}:function(e,t){return qr(e,t,(function(t,n){return Ms(e,n)}))}(e,t)}));function Fs(e,t){if(null==e)return{};var n=Lt(io(e),(function(e){return[e]}));return t=uo(t),qr(e,n,(function(e,n){return t(e,n[0])}))}var Ps=Qi(Ns),js=Qi(Rs);function Vs(e){return null==e?[]:en(e,Ns(e))}var Bs=Zi((function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)}));function Hs(e){return Qs(gs(e).toLowerCase())}function Ws(e){return(e=gs(e))&&e.replace(ke,on).replace(tt,"")}var Us=Zi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),qs=Zi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),zs=Li("toLowerCase");var Gs=Zi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var $s=Zi((function(e,t,n){return e+(n?" ":"")+Qs(t)}));var Ys=Zi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qs=Li("toUpperCase");function Xs(e,t,n){return e=gs(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Ks=Qr((function(e,t){try{return Mt(e,i,t)}catch(n){return Qa(n)?n:new se(n)}})),Js=no((function(e,t){return _t(t,(function(t){t=Fo(t),or(e,t,_a(e[t],e))})),e}));function eu(e){return function(){return e}}var tu=ji(),nu=ji(!0);function ru(e){return e}function iu(e){return Lr("function"==typeof e?e:ur(e,1))}var ou=Qr((function(e,t){return function(n){return Ar(n,e,t)}})),au=Qr((function(e,t){return function(n){return Ar(e,n,t)}}));function su(e,t,n){var r=Ns(t),i=Sr(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Sr(t,Ns(t)));var o=!(es(n)&&"chain"in n)||!!n.chain,a=Xa(e);return _t(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=_i(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Zt([this.value()],arguments))})})),e}function uu(){}var cu=Wi(Lt),lu=Wi(Nt),du=Wi(jt);function fu(e){return ko(e)?Gt(Fo(e)):function(e){return function(t){return Er(t,e)}}(e)}var hu=qi(),pu=qi(!0);function vu(){return[]}function mu(){return!1}var yu=Hi((function(e,t){return e+t}),0),gu=$i("ceil"),bu=Hi((function(e,t){return e/t}),1),wu=$i("floor");var ku=Hi((function(e,t){return e*t}),1),Su=$i("round"),Eu=Hi((function(e,t){return e-t}),0);return Vn.after=function(e,t){if("function"!=typeof t)throw new _e(o);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Vn.ary=Ma,Vn.assign=bs,Vn.assignIn=ws,Vn.assignInWith=ks,Vn.assignWith=Ss,Vn.at=Es,Vn.before=Ta,Vn.bind=_a,Vn.bindAll=Js,Vn.bindKey=Aa,Vn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ua(e)?e:[e]},Vn.chain=fa,Vn.chunk=function(e,t,r){t=(r?wo(e,t,r):t===i)?1:$t(ps(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=n(ht(o/t));a<o;)u[s++]=ri(e,a,a+=t);return u},Vn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Vn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Zt(Ua(r)?_i(r):[r],yr(t,1))},Vn.cond=function(e){var t=null==e?0:e.length,n=uo();return e=t?Lt(e,(function(e){if("function"!=typeof e[1])throw new _e(o);return[n(e[0]),e[1]]})):[],Qr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Mt(i[0],this,n))return Mt(i[1],this,n)}}))},Vn.conforms=function(e){return function(e){var t=Ns(e);return function(n){return cr(n,e,t)}}(ur(e,1))},Vn.constant=eu,Vn.countBy=va,Vn.create=function(e,t){var n=Bn(e);return null==t?n:ir(n,t)},Vn.curry=function e(t,n,r){var o=Xi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Vn.curryRight=function e(t,n,r){var o=Xi(t,u,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Vn.debounce=Na,Vn.defaults=xs,Vn.defaultsDeep=Is,Vn.defer=Ra,Vn.delay=Da,Vn.difference=Vo,Vn.differenceBy=Bo,Vn.differenceWith=Ho,Vn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=n||t===i?1:ps(t))<0?0:t,r):[]},Vn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,0,(t=r-(t=n||t===i?1:ps(t)))<0?0:t):[]},Vn.dropRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0,!0):[]},Vn.dropWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0):[]},Vn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&wo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ps(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ps(r))<0&&(r+=o),r=n>r?0:vs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Vn.filter=function(e,t){return(Ua(e)?Rt:mr)(e,uo(t,3))},Vn.flatMap=function(e,t){return yr(Ea(e,t),1)},Vn.flatMapDeep=function(e,t){return yr(Ea(e,t),h)},Vn.flatMapDepth=function(e,t,n){return n=n===i?1:ps(n),yr(Ea(e,t),n)},Vn.flatten=qo,Vn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,h):[]},Vn.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===i?1:ps(t)):[]},Vn.flip=function(e){return Xi(e,512)},Vn.flow=tu,Vn.flowRight=nu,Vn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Vn.functions=function(e){return null==e?[]:Sr(e,Ns(e))},Vn.functionsIn=function(e){return null==e?[]:Sr(e,Rs(e))},Vn.groupBy=wa,Vn.initial=function(e){return(null==e?0:e.length)?ri(e,0,-1):[]},Vn.intersection=Go,Vn.intersectionBy=$o,Vn.intersectionWith=Yo,Vn.invert=Ts,Vn.invertBy=_s,Vn.invokeMap=ka,Vn.iteratee=iu,Vn.keyBy=Sa,Vn.keys=Ns,Vn.keysIn=Rs,Vn.map=Ea,Vn.mapKeys=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,t(e,r,i),e)})),n},Vn.mapValues=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,r,t(e,r,i))})),n},Vn.matches=function(e){return Vr(ur(e,1))},Vn.matchesProperty=function(e,t){return Br(e,ur(t,1))},Vn.memoize=Oa,Vn.merge=Ds,Vn.mergeWith=Os,Vn.method=ou,Vn.methodOf=au,Vn.mixin=su,Vn.negate=La,Vn.nthArg=function(e){return e=ps(e),Qr((function(t){return Wr(t,e)}))},Vn.omit=Ls,Vn.omitBy=function(e,t){return Fs(e,La(uo(t)))},Vn.once=function(e){return Ta(2,e)},Vn.orderBy=function(e,t,n,r){return null==e?[]:(Ua(t)||(t=null==t?[]:[t]),Ua(n=r?i:n)||(n=null==n?[]:[n]),Ur(e,t,n))},Vn.over=cu,Vn.overArgs=Za,Vn.overEvery=lu,Vn.overSome=du,Vn.partial=Fa,Vn.partialRight=Pa,Vn.partition=xa,Vn.pick=Zs,Vn.pickBy=Fs,Vn.property=fu,Vn.propertyOf=function(e){return function(t){return null==e?i:Er(e,t)}},Vn.pull=Xo,Vn.pullAll=Ko,Vn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,uo(n,2)):e},Vn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,i,n):e},Vn.pullAt=Jo,Vn.range=hu,Vn.rangeRight=pu,Vn.rearg=ja,Vn.reject=function(e,t){return(Ua(e)?Rt:mr)(e,La(uo(t,3)))},Vn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=uo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Gr(e,i),n},Vn.rest=function(e,t){if("function"!=typeof e)throw new _e(o);return Qr(e,t=t===i?t:ps(t))},Vn.reverse=ea,Vn.sampleSize=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),(Ua(e)?Kn:Kr)(e,t)},Vn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},Vn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Jr(e,t,n,r)},Vn.shuffle=function(e){return(Ua(e)?Jn:ni)(e)},Vn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&wo(e,t,n)?(t=0,n=r):(t=null==t?0:ps(t),n=n===i?r:ps(n)),ri(e,t,n)):[]},Vn.sortBy=Ia,Vn.sortedUniq=function(e){return e&&e.length?si(e):[]},Vn.sortedUniqBy=function(e,t){return e&&e.length?si(e,uo(t,2)):[]},Vn.split=function(e,t,n){return n&&"number"!=typeof n&&wo(e,t,n)&&(t=n=i),(n=n===i?m:n>>>0)?(e=gs(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ci(t))&&un(e)?ki(vn(e),0,n):e.split(t,n):[]},Vn.spread=function(e,t){if("function"!=typeof e)throw new _e(o);return t=null==t?0:$t(ps(t),0),Qr((function(n){var r=n[t],i=ki(n,0,t);return r&&Zt(i,r),Mt(e,this,i)}))},Vn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Vn.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===i?1:ps(t))<0?0:t):[]},Vn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===i?1:ps(t)))<0?0:t,r):[]},Vn.takeRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!1,!0):[]},Vn.takeWhile=function(e,t){return e&&e.length?hi(e,uo(t,3)):[]},Vn.tap=function(e,t){return t(e),e},Vn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new _e(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Na(e,t,{leading:r,maxWait:t,trailing:i})},Vn.thru=ha,Vn.toArray=fs,Vn.toPairs=Ps,Vn.toPairsIn=js,Vn.toPath=function(e){return Ua(e)?Lt(e,Fo):us(e)?[e]:_i(Zo(gs(e)))},Vn.toPlainObject=ys,Vn.transform=function(e,t,n){var r=Ua(e),i=r||$a(e)||cs(e);if(t=uo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:es(e)&&Xa(o)?Bn(ze(e)):{}}return(i?_t:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Vn.unary=function(e){return Ma(e,1)},Vn.union=ta,Vn.unionBy=na,Vn.unionWith=ra,Vn.uniq=function(e){return e&&e.length?li(e):[]},Vn.uniqBy=function(e,t){return e&&e.length?li(e,uo(t,2)):[]},Vn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?li(e,i,t):[]},Vn.unset=function(e,t){return null==e||di(e,t)},Vn.unzip=ia,Vn.unzipWith=oa,Vn.update=function(e,t,n){return null==e?e:fi(e,t,gi(n))},Vn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:fi(e,t,gi(n),r)},Vn.values=Vs,Vn.valuesIn=function(e){return null==e?[]:en(e,Rs(e))},Vn.without=aa,Vn.words=Xs,Vn.wrap=function(e,t){return Fa(gi(t),e)},Vn.xor=sa,Vn.xorBy=ua,Vn.xorWith=ca,Vn.zip=la,Vn.zipObject=function(e,t){return mi(e||[],t||[],tr)},Vn.zipObjectDeep=function(e,t){return mi(e||[],t||[],Jr)},Vn.zipWith=da,Vn.entries=Ps,Vn.entriesIn=js,Vn.extend=ws,Vn.extendWith=ks,su(Vn,Vn),Vn.add=yu,Vn.attempt=Ks,Vn.camelCase=Bs,Vn.capitalize=Hs,Vn.ceil=gu,Vn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ms(n))===n?n:0),t!==i&&(t=(t=ms(t))===t?t:0),sr(ms(e),t,n)},Vn.clone=function(e){return ur(e,4)},Vn.cloneDeep=function(e){return ur(e,5)},Vn.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:i)},Vn.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:i)},Vn.conformsTo=function(e,t){return null==t||cr(e,t,Ns(t))},Vn.deburr=Ws,Vn.defaultTo=function(e,t){return null==e||e!==e?t:e},Vn.divide=bu,Vn.endsWith=function(e,t,n){e=gs(e),t=ci(t);var r=e.length,o=n=n===i?r:sr(ps(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Vn.eq=Va,Vn.escape=function(e){return(e=gs(e))&&X.test(e)?e.replace(Y,an):e},Vn.escapeRegExp=function(e){return(e=gs(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Vn.every=function(e,t,n){var r=Ua(e)?Nt:pr;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Vn.find=ma,Vn.findIndex=Wo,Vn.findKey=function(e,t){return Bt(e,uo(t,3),wr)},Vn.findLast=ya,Vn.findLastIndex=Uo,Vn.findLastKey=function(e,t){return Bt(e,uo(t,3),kr)},Vn.floor=wu,Vn.forEach=ga,Vn.forEachRight=ba,Vn.forIn=function(e,t){return null==e?e:gr(e,uo(t,3),Rs)},Vn.forInRight=function(e,t){return null==e?e:br(e,uo(t,3),Rs)},Vn.forOwn=function(e,t){return e&&wr(e,uo(t,3))},Vn.forOwnRight=function(e,t){return e&&kr(e,uo(t,3))},Vn.get=Cs,Vn.gt=Ba,Vn.gte=Ha,Vn.has=function(e,t){return null!=e&&mo(e,t,Mr)},Vn.hasIn=Ms,Vn.head=zo,Vn.identity=ru,Vn.includes=function(e,t,n,r){e=za(e)?e:Vs(e),n=n&&!r?ps(n):0;var i=e.length;return n<0&&(n=$t(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Wt(e,t,n)>-1},Vn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=$t(r+i,0)),Wt(e,t,i)},Vn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=bn(t,n)&&e<$t(t,n)}(e=ms(e),t,n)},Vn.invoke=As,Vn.isArguments=Wa,Vn.isArray=Ua,Vn.isArrayBuffer=qa,Vn.isArrayLike=za,Vn.isArrayLikeObject=Ga,Vn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Ir(e)==w},Vn.isBuffer=$a,Vn.isDate=Ya,Vn.isElement=function(e){return ts(e)&&1===e.nodeType&&!is(e)},Vn.isEmpty=function(e){if(null==e)return!0;if(za(e)&&(Ua(e)||"string"==typeof e||"function"==typeof e.splice||$a(e)||cs(e)||Wa(e)))return!e.length;var t=vo(e);if(t==I||t==A)return!e.size;if(xo(e))return!Zr(e).length;for(var n in e)if(Le.call(e,n))return!1;return!0},Vn.isEqual=function(e,t){return Rr(e,t)},Vn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Rr(e,t,i,n):!!r},Vn.isError=Qa,Vn.isFinite=function(e){return"number"==typeof e&&bt(e)},Vn.isFunction=Xa,Vn.isInteger=Ka,Vn.isLength=Ja,Vn.isMap=ns,Vn.isMatch=function(e,t){return e===t||Dr(e,t,lo(t))},Vn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Dr(e,t,lo(t),n)},Vn.isNaN=function(e){return rs(e)&&e!=+e},Vn.isNative=function(e){if(Eo(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(e)},Vn.isNil=function(e){return null==e},Vn.isNull=function(e){return null===e},Vn.isNumber=rs,Vn.isObject=es,Vn.isObjectLike=ts,Vn.isPlainObject=is,Vn.isRegExp=os,Vn.isSafeInteger=function(e){return Ka(e)&&e>=-9007199254740991&&e<=p},Vn.isSet=as,Vn.isString=ss,Vn.isSymbol=us,Vn.isTypedArray=cs,Vn.isUndefined=function(e){return e===i},Vn.isWeakMap=function(e){return ts(e)&&vo(e)==D},Vn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Ir(e)},Vn.join=function(e,t){return null==e?"":wt.call(e,t)},Vn.kebabCase=Us,Vn.last=Qo,Vn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ps(n))<0?$t(r+o,0):bn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ht(e,qt,o,!0)},Vn.lowerCase=qs,Vn.lowerFirst=zs,Vn.lt=ls,Vn.lte=ds,Vn.max=function(e){return e&&e.length?vr(e,ru,Cr):i},Vn.maxBy=function(e,t){return e&&e.length?vr(e,uo(t,2),Cr):i},Vn.mean=function(e){return zt(e,ru)},Vn.meanBy=function(e,t){return zt(e,uo(t,2))},Vn.min=function(e){return e&&e.length?vr(e,ru,Pr):i},Vn.minBy=function(e,t){return e&&e.length?vr(e,uo(t,2),Pr):i},Vn.stubArray=vu,Vn.stubFalse=mu,Vn.stubObject=function(){return{}},Vn.stubString=function(){return""},Vn.stubTrue=function(){return!0},Vn.multiply=ku,Vn.nth=function(e,t){return e&&e.length?Wr(e,ps(t)):i},Vn.noConflict=function(){return vt._===this&&(vt._=Ve),this},Vn.noop=uu,Vn.now=Ca,Vn.pad=function(e,t,n){e=gs(e);var r=(t=ps(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ui(pt(i),n)+e+Ui(ht(i),n)},Vn.padEnd=function(e,t,n){e=gs(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?e+Ui(t-r,n):e},Vn.padStart=function(e,t,n){e=gs(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?Ui(t-r,n)+e:e},Vn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),kn(gs(e).replace(ae,""),t||0)},Vn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&wo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Sn();return bn(e+o*(t-e+dt("1e-"+((o+"").length-1))),t)}return $r(e,t)},Vn.reduce=function(e,t,n){var r=Ua(e)?Ft:Yt,i=arguments.length<3;return r(e,uo(t,4),n,i,fr)},Vn.reduceRight=function(e,t,n){var r=Ua(e)?Pt:Yt,i=arguments.length<3;return r(e,uo(t,4),n,i,hr)},Vn.repeat=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),Yr(gs(e),t)},Vn.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Vn.result=function(e,t,n){var r=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Fo(t[r])];a===i&&(r=o,a=n),e=Xa(a)?a.call(e):a}return e},Vn.round=Su,Vn.runInContext=e,Vn.sample=function(e){return(Ua(e)?Xn:Xr)(e)},Vn.size=function(e){if(null==e)return 0;if(za(e))return ss(e)?pn(e):e.length;var t=vo(e);return t==I||t==A?e.size:Zr(e).length},Vn.snakeCase=Gs,Vn.some=function(e,t,n){var r=Ua(e)?jt:ii;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Vn.sortedIndex=function(e,t){return oi(e,t)},Vn.sortedIndexBy=function(e,t,n){return ai(e,t,uo(n,2))},Vn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Va(e[r],t))return r}return-1},Vn.sortedLastIndex=function(e,t){return oi(e,t,!0)},Vn.sortedLastIndexBy=function(e,t,n){return ai(e,t,uo(n,2),!0)},Vn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if(Va(e[n],t))return n}return-1},Vn.startCase=$s,Vn.startsWith=function(e,t,n){return e=gs(e),n=null==n?0:sr(ps(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},Vn.subtract=Eu,Vn.sum=function(e){return e&&e.length?Qt(e,ru):0},Vn.sumBy=function(e,t){return e&&e.length?Qt(e,uo(t,2)):0},Vn.template=function(e,t,n){var r=Vn.templateSettings;n&&wo(e,t,n)&&(t=i),e=gs(e),t=ks({},t,r,Ki);var o,a,s=ks({},t.imports,r.imports,Ki),u=Ns(s),c=en(s,u),l=0,d=t.interpolate||Se,f="__p += '",h=Me((t.escape||Se).source+"|"+d.source+"|"+(d===ee?pe:Se).source+"|"+(t.evaluate||Se).source+"|$","g"),p="//# sourceURL="+(Le.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(h,(function(t,n,r,i,s,u){return r||(r=i),f+=e.slice(l,u).replace(Ee,sn),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),f+="';\n";var v=Le.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(q,""):f).replace(z,"$1").replace(G,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Ks((function(){return xe(u,p+"return "+f).apply(i,c)}));if(m.source=f,Qa(m))throw m;return m},Vn.times=function(e,t){if((e=ps(e))<1||e>p)return[];var n=m,r=bn(e,m);t=uo(t),e-=m;for(var i=Xt(r,t);++n<e;)t(n);return i},Vn.toFinite=hs,Vn.toInteger=ps,Vn.toLength=vs,Vn.toLower=function(e){return gs(e).toLowerCase()},Vn.toNumber=ms,Vn.toSafeInteger=function(e){return e?sr(ps(e),-9007199254740991,p):0===e?e:0},Vn.toString=gs,Vn.toUpper=function(e){return gs(e).toUpperCase()},Vn.trim=function(e,t,n){if((e=gs(e))&&(n||t===i))return Kt(e);if(!e||!(t=ci(t)))return e;var r=vn(e),o=vn(t);return ki(r,nn(r,o),rn(r,o)+1).join("")},Vn.trimEnd=function(e,t,n){if((e=gs(e))&&(n||t===i))return e.slice(0,mn(e)+1);if(!e||!(t=ci(t)))return e;var r=vn(e);return ki(r,0,rn(r,vn(t))+1).join("")},Vn.trimStart=function(e,t,n){if((e=gs(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=ci(t)))return e;var r=vn(e);return ki(r,nn(r,vn(t))).join("")},Vn.truncate=function(e,t){var n=30,r="...";if(es(t)){var o="separator"in t?t.separator:o;n="length"in t?ps(t.length):n,r="omission"in t?ci(t.omission):r}var a=(e=gs(e)).length;if(un(e)){var s=vn(e);a=s.length}if(n>=a)return e;var u=n-pn(r);if(u<1)return r;var c=s?ki(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),os(o)){if(e.slice(u).search(o)){var l,d=c;for(o.global||(o=Me(o.source,gs(ve.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(e.indexOf(ci(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Vn.unescape=function(e){return(e=gs(e))&&Q.test(e)?e.replace($,yn):e},Vn.uniqueId=function(e){var t=++Ze;return gs(e)+t},Vn.upperCase=Ys,Vn.upperFirst=Qs,Vn.each=ga,Vn.eachRight=ba,Vn.first=zo,su(Vn,function(){var e={};return wr(Vn,(function(t,n){Le.call(Vn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Vn.VERSION="4.17.21",_t(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Vn[e].placeholder=Vn})),_t(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===i?1:$t(ps(n),0);var r=this.__filtered__&&!t?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),_t(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),_t(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),_t(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(ru)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Qr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Ar(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(La(uo(e)))},Un.prototype.slice=function(e,t){e=ps(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ps(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(m)},wr(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Vn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Vn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Un,c=s[0],l=u||Ua(t),d=function(e){var t=o.apply(Vn,Zt([e],s));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,h=!!this.__actions__.length,p=a&&!f,v=u&&!h;if(!a&&l){t=v?t:new Un(this);var m=e.apply(t,s);return m.__actions__.push({func:ha,args:[d],thisArg:i}),new Wn(m,f)}return p&&v?e.apply(this,s):(m=this.thru(d),p?r?m.value()[0]:m.value():m)})})),_t(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ae[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Vn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ua(i)?i:[],e)}return this[n]((function(n){return t.apply(Ua(n)?n:[],e)}))}})),wr(Un.prototype,(function(e,t){var n=Vn[t];if(n){var r=n.name+"";Le.call(Nn,r)||(Nn[r]=[]),Nn[r].push({name:t,func:n})}})),Nn[Vi(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=_i(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=_i(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=_i(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ua(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=$t(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,d=l.length,f=0,h=bn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return pi(e,this.__actions__);var p=[];e:for(;u--&&f<h;){for(var v=-1,m=e[c+=t];++v<d;){var y=l[v],g=y.iteratee,b=y.type,w=g(m);if(2==b)m=w;else if(!w){if(1==b)continue e;break e}}p[f++]=m}return p},Vn.prototype.at=pa,Vn.prototype.chain=function(){return fa(this)},Vn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Vn.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Vn.prototype.plant=function(e){for(var t,n=this;n instanceof Hn;){var r=jo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Vn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Wn(t,this.__chain__)}return this.thru(ea)},Vn.prototype.toJSON=Vn.prototype.valueOf=Vn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Vn.prototype.first=Vn.prototype.head,Xe&&(Vn.prototype[Xe]=function(){return this}),Vn}();vt._=gn,(r=function(){return gn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2352:function(e){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return x})),n.d(t,"b",(function(){return I})),n.d(t,"c",(function(){return C}));var r=n(1),i=n.n(r),o=n(14),a=n.n(o),s=n(2),u=n.n(s),c=n(15),l=n.n(c);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var f=Array.isArray,h=Object.keys;function p(e){return"function"==typeof e}function v(e){return e instanceof HTMLElement||e instanceof Text}function m(e){return"object"===u()(e)&&!f(e)}function y(e){if(!e||"string"==typeof e)return e;var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete t.children,t}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!(!f(e)||!f(t))&&(n?e.length===t.length&&!e.find((function(e){return!t.includes(e)})):e.some((function(e){return t.includes(e)})))}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];if(!h(e).length)return!0;if(null===t||!h(t).length)return!1;if(n)return l()(e,t);var i=h(e).filter((function(e){return h(t).includes(e)}));return i.forEach((function(n){m(e[n])&&m(t[n])&&(r=r.concat(b(e[n],t[n]))),(e[n]===t[n]||g(e[n],t[n]))&&r.push(t)})),r.length>0&&r.filter((function(e){return e})).length===i.length}function w(e){var t,n={children:[]};if(!e)return n;n.name=p(t=e.type)?t.displayName||t.name:t,n.props=y(e.memoizedProps),n.state=function(e){if(e)return e.baseState||e}(e.memoizedState);var r=e.child;if(r)for(n.children.push(r);r.sibling;)n.children.push(r.sibling),r=r.sibling;return n.children=n.children.map((function(e){return w(e)})),p(e.type)&&function(e){return e.children.length>1}(n)?(n.node=function(e){return e.children.map((function(e){return e.node})).filter((function(e){return!!e}))}(n),n.isFragment=!0):n.node=function(e){return v(e.stateNode)?e.stateNode:e.child&&v(e.child.stateNode)?e.child.stateNode:null}(e),n}function k(e){for(;e.length;){var t=e.shift();if(t.node)return t.node;t.children&&Array.isArray(t.children)&&e.push.apply(e,i()(t.children))}}function S(e,t){for(var n=[];e.length;){var r=e.shift().children;r&&Array.isArray(r)&&r.forEach((function(r){t(r)&&(!r.node&&Array.isArray(r.children)&&(r.node=k(r.children.concat([]))),n.push(r)),e.push(r)}))}return n}function E(e,t){var n=function(e){if(e){var t=e.split("(");return 1===t.length?e:t.find((function(e){return e.includes(")")})).replace(/\)*/g,"")}}(t);return new RegExp("^"+e.split("*").map((function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")})).join(".+")+"$").test(n)}function x(e,t){var n=arguments.length>3?arguments[3]:void 0;return e.reduce((function(e,t){return e.concat(S(e,n&&"function"==typeof n?n:function(e){return"string"==typeof e.name?E(t,e.name):null!==e.name&&"object"===u()(e.name)&&E(t,e.name.displayName)}))}),[t])}function I(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return p(n)?(console.warn("Functions are not supported as filter matchers"),[]):e.filter((function(e){return m(n)&&b(n,e[t],r)||f(n)&&g(n,e[t],r)||e[t]===n}))}function C(e){if(e.hasOwnProperty("_reactRootContainer"))return e._reactRootContainer._internalRoot.current;var t=Object.keys(e).find((function(e){return e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber")||e.startsWith("__reactContainer")}));return t?e[t]:void 0}},function(e,t,n){var r=n(17),i=n(18),o=n(19),a=n(20);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(3),i=n(6),o=n(22),a=n(23);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,s(t)}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(0);function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,n=arguments.length>1?arguments[1]:void 0;if(e.isReactLoaded)return Promise.resolve("React already loaded");var i=function(){var e=document.createTreeWalker(document);if(n)return document.querySelector(n);for(;e.nextNode();)if(e.currentNode.hasOwnProperty("_reactRootContainer"))return e.currentNode};return new Promise((function(n,o){var a=!1,s=null;!function t(){var o=i();if(o&&(e.isReactLoaded=!0,e.rootReactElement=Object(r.c)(o),e.rootReactElement))return clearTimeout(s),n();a||setTimeout(t,200)}(),s=setTimeout((function(){a=!0,o("Timed out")}),t)}))}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(1),i=n.n(r),o=n(4),a=n.n(o),s=n(5),u=n.n(s),c=n(7),l=n.n(c),d=n(13),f=n.n(d),h=n(3),p=n.n(h),v=n(8),m=n.n(v),y=n(0);function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var b=function(e){l()(n,e);var t=g(n);function n(e){return a()(this,n),e||(e=[]),t.call.apply(t,[this].concat(i()(e)))}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(y.b)(this,"props",e,t))}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(y.b)(this,"state",e,t))}}]),n}(m()(Array)),w=function(e){l()(n,e);var t=g(n);function n(e,r){var i;for(var o in a()(this,n),(i=t.call(this,e))._nodes=r,e)i[o]=e[o];return i}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(y.b)(this._nodes,"props",e,t)[0],this._nodes)}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(y.b)(this._nodes,"state",e,t)[0],this._nodes)}}]),n}(m()(Object)),k=function(){function e(t,n){a()(this,e),this.selectors=t.split(" ").filter((function(e){return!!e})).map((function(e){return e.trim()})),this.rootComponent=n,this.tree=Object(y.a)(this.rootComponent)}return u()(e,[{key:"find",value:function(){return this.nodes=new b(Object(y.d)(this.selectors,this.tree,!0)),new w(this.nodes[0],this.nodes)}},{key:"findAll",value:function(){return new b(Object(y.d)(this.selectors,this.tree))}}]),e}()},function(e,t,n){var r=n(2).default,i=n(21);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var a,s,u,c=r(t),l=r(n);if(c&&l){if((s=t.length)!=n.length)return!1;for(a=s;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(c!=l)return!1;var d=t instanceof Date,f=n instanceof Date;if(d!=f)return!1;if(d&&f)return t.getTime()==n.getTime();var h=t instanceof RegExp,p=n instanceof RegExp;if(h!=p)return!1;if(h&&p)return t.toString()==n.toString();var v=i(t);if((s=v.length)!==i(n).length)return!1;for(a=s;0!=a--;)if(!o.call(n,v[a]))return!1;for(a=s;0!=a--;)if(!e(t[u=v[a]],n[u]))return!1;return!0}return t!=t&&n!=n}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"resq$",(function(){return s})),n.d(t,"resq$$",(function(){return u}));var r=n(12),i=n(11);n.d(t,"waitToLoadReact",(function(){return i.a}));var o=n(0);function a(t,n,i){if(!i&&!e.isReactLoaded)throw new Error("Could not find the root element of your application");var a=e.rootReactElement;if(i instanceof HTMLElement&&(a=Object(o.c)(i)),!a)throw new Error("Could not find instance of React in given element");return new r.a(t,a)[n]()}function s(e,t){return a(e,"find",t)}function u(e,t){return a(e,"findAll",t)}}.call(this,n(9))},function(e,t,n){var r=n(10);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(10);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6),i=n(24);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0}])},573:function(e,t,n){var r=n(763);function i(e){return e.reduce((function(e,t,n,r){return e+t}))}function o(e){if(r.isArray(e))return e;if("string"===typeof e)return e.split("");throw Error("Parameter must be a string or array.")}t.$m=function(e,t){return e=o(e),t=o(t),r.intersection(e,t).length/r.union(e,t).length}},907:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},7326:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},5861:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))}}n.d(t,{Z:function(){return i}})},5671:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},5647:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9611),i=n(8814);function o(e,t,n){return o=(0,i.Z)()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&(0,r.Z)(o,n.prototype),o},o.apply(null,arguments)}},3144:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9142);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.Z)(i.key),i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},7762:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,r.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},7277:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(1120),i=n(8814),o=n(1002),a=n(7326);function s(e){var t=(0,i.Z)();return function(){var n,i=(0,r.Z)(e);if(t){var s=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===(0,o.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,a.Z)(e)}(this,n)}}},4942:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9142);function i(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},1752:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1120);function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,r.Z)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},i.apply(this,arguments)}},1120:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},136:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9611);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},8814:function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{Z:function(){return r}})},1413:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(4942);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},4925:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:function(){return r}})},4165:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(){i=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new R(r||[]);return a(o,"_invoke",{value:T(e,n,s)}),o}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function w(){}function k(){}var S={};d(S,u,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(D([])));x&&x!==n&&o.call(x,u)&&(S=x);var I=k.prototype=b.prototype=Object.create(S);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==(0,r.Z)(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function T(t,n,r){var i=p;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=_(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var c=h(t,n,r);if("normal"===c.type){if(i=r.done?y:v,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function _(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(o.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError((0,r.Z)(t)+" is not iterable")}return w.prototype=k,a(I,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:w,configurable:!0}),w.displayName=d(k,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,d(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},C(M.prototype),d(M.prototype,c,(function(){return this})),t.AsyncIterator=M,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new M(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(I),d(I,l,"Generator"),d(I,u,(function(){return this})),d(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=D,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}},9611:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},885:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2982:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(907);var i=n(181);function o(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},9142:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==(0,r.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},1002:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(907);function i(e,t){if(e){if("string"===typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},8664:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(1120),i=n(9611);var o=n(5647);function a(e){var t="function"===typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"===typeof e}}(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return(0,o.Z)(e,arguments,(0,r.Z)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(n,e)},a(e)}},3464:function(e,t,n){"use strict";n.d(t,{J:function(){return s},c:function(){return a}});for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"===typeof Uint8Array?[]:new Uint8Array(256),o=0;o<64;o++)i[r.charCodeAt(o)]=o;var a=function(e){var t,n=new Uint8Array(e),i=n.length,o="";for(t=0;t<i;t+=3)o+=r[n[t]>>2],o+=r[(3&n[t])<<4|n[t+1]>>4],o+=r[(15&n[t+1])<<2|n[t+2]>>6],o+=r[63&n[t+2]];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(e){var t,n,r,o,a,s=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),d=new Uint8Array(l);for(t=0;t<u;t+=4)n=i[e.charCodeAt(t)],r=i[e.charCodeAt(t+1)],o=i[e.charCodeAt(t+2)],a=i[e.charCodeAt(t+3)],d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|o>>2,d[c++]=(3&o)<<6|63&a;return l}},3246:function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function i(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}n.d(t,{_:function(){return r},m:function(){return i}})},5512:function(e,t,n){"use strict";n.d(t,{Bu:function(){return C},CO:function(){return q},DS:function(){return d},Df:function(){return re},GQ:function(){return oe},IG:function(){return B},Jq:function(){return r},MK:function(){return h},P8:function(){return j},UR:function(){return y},VU:function(){return ae},We:function(){return P},Zq:function(){return l},bZ:function(){return v},eD:function(){return U},kv:function(){return b},pe:function(){return V},wR:function(){return m},zi:function(){return I}});var r,i=n(136),o=n(7277),a=n(7762),s=n(5671),u=n(3144);function c(e){return e.nodeType===e.ELEMENT_NODE}function l(e){var t=null===e||void 0===e?void 0:e.host;return Boolean((null===t||void 0===t?void 0:t.shadowRoot)===e)}function d(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function f(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t,h).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n):null}catch(r){return null}var n}function h(e){var t;if(function(e){return"styleSheet"in e}(e))try{t=f(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var n=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer(".concat(e.layerName,")")),e.supportsText&&n.push("supports(".concat(e.supportsText,")")),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(n){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function(e){var t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(e.cssText);return t||e.cssText}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(r||(r={}));var p=function(){function e(){(0,s.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,u.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function v(){return new p}function m(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.value,a=e.maskInputFn,s=o||"",u=i&&y(i);return(n[r.toLowerCase()]||u&&n[u])&&(s=a?a(s,t):"*".repeat(s.length)),s}function y(e){return e.toLowerCase()}var g="__rrweb_original__";function b(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?y(t):null}function w(e,t){var n,r;try{r=new URL(e,null!==t&&void 0!==t?t:window.location.href)}catch(o){return null}var i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null===i||void 0===i?void 0:i[1])&&void 0!==n?n:null}var k,S,E=1,x=new RegExp("[^a-z0-9-_:]"),I=-2;function C(){return E++}var M=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,T=/^(?:[a-z+]+:)?\/\//i,_=/^www\..*/i,A=/^(data:)([^,]*),(.*)/i;function N(e,t){return(e||"").replace(M,(function(e,n,r,i,o,s){var u,c=r||o||s,l=n||i||"";if(!c)return e;if(T.test(c)||_.test(c))return"url(".concat(l).concat(c).concat(l,")");if(A.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((u=t,(u.indexOf("//")>-1?u.split("/").slice(0,3).join("/"):u.split("/")[0]).split("?")[0]+c)).concat(l,")");var d=t.split("/"),f=c.split("/");d.pop();var h,p=(0,a.Z)(f);try{for(p.s();!(h=p.n()).done;){var v=h.value;"."!==v&&(".."===v?d.pop():d.push(v))}}catch(m){p.e(m)}finally{p.f()}return"url(".concat(l).concat(d.join("/")).concat(l,")")}))}var R=/^[^ \t\n\r\u000c]+/,D=/^[, \t\n\r\u000c]+/;var O=new WeakMap;function L(e,t){return t&&""!==t.trim()?F(e,t):t}function Z(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function F(e,t){var n=O.get(e);if(n||(n=e.createElement("a"),O.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function P(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?L(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(D),!(n>=t.length);){var o=r(R);if(","===o.slice(-1))o=L(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=L(e,o);for(var s=!1;;){var u=t.charAt(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n?N(r,F(e)):"object"===t&&"data"===n?L(e,r):r:L(e,r):r}function j(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function V(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&V(e.parentNode,t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&V(e.parentNode,t,n)}function B(e,t,n,r){try{var i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("string"===typeof t){if(r){if(i.closest(".".concat(t)))return!0}else if(i.classList.contains(t))return!0}else if(V(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(o){}return!1}function H(e,t){var n=t.doc,i=t.mirror,o=t.blockClass,a=t.blockSelector,s=t.needsMask,u=t.inlineStylesheet,c=t.maskInputOptions,l=void 0===c?{}:c,d=t.maskTextFn,h=t.maskInputFn,p=t.dataURLOptions,v=void 0===p?{}:p,w=t.inlineImages,E=t.recordCanvas,I=t.keepIframeSrcFn,C=t.newlyAddedElement,M=void 0!==C&&C,T=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,i);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:r.Document,childNodes:[],compatMode:e.compatMode}:{type:r.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:r.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:T};case e.ELEMENT_NODE:return function(e,t){for(var n,i=t.doc,o=t.blockClass,a=t.blockSelector,s=t.inlineStylesheet,u=t.maskInputOptions,c=void 0===u?{}:u,l=t.maskInputFn,d=t.dataURLOptions,h=void 0===d?{}:d,p=t.inlineImages,v=t.recordCanvas,w=t.keepIframeSrcFn,E=t.newlyAddedElement,I=void 0!==E&&E,C=t.rootId,M=function(e,t,n){try{if("string"===typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(o){}return!1}(e,o,a),T=function(e){if(e instanceof HTMLFormElement)return"form";var t=y(e.tagName);return x.test(t)?"div":t}(e),_={},A=e.attributes.length,R=0;R<A;R++){var D=e.attributes[R];j(T,D.name,D.value)||(_[D.name]=P(i,T,y(D.name),D.value))}if("link"===T&&s){var O=Array.from(i.styleSheets).find((function(t){return t.href===e.href})),L=null;O&&(L=f(O)),L&&(delete _.rel,delete _.href,_._cssText=N(L,O.href))}if("style"===T&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var V=f(e.sheet);V&&(_._cssText=N(V,F(i)))}if("input"===T||"textarea"===T||"select"===T){var B=e.value,H=e.checked;"radio"!==_.type&&"checkbox"!==_.type&&"submit"!==_.type&&"button"!==_.type&&B?_.value=m({element:e,type:b(e),tagName:T,value:B,maskInputOptions:c,maskInputFn:l}):H&&(_.checked=H)}"option"===T&&(e.selected&&!c.select?_.selected=!0:delete _.selected);if("canvas"===T&&v)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=g in i?i[g]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(_.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){var W=e.toDataURL(h.type,h.quality),U=document.createElement("canvas");U.width=e.width,U.height=e.height,W!==U.toDataURL(h.type,h.quality)&&(_.rr_dataURL=W)}if("img"===T&&p){k||(k=i.createElement("canvas"),S=k.getContext("2d"));var q=e,z=q.crossOrigin;q.crossOrigin="anonymous";var G=function e(){q.removeEventListener("load",e);try{k.width=q.naturalWidth,k.height=q.naturalHeight,S.drawImage(q,0,0),_.rr_dataURL=k.toDataURL(h.type,h.quality)}catch(t){console.warn("Cannot inline img src=".concat(q.currentSrc,"! Error: ").concat(t))}z?_.crossOrigin=z:q.removeAttribute("crossorigin")};q.complete&&0!==q.naturalWidth?G():q.addEventListener("load",G)}if("audio"===T||"video"===T){var $=_;$.rr_mediaState=e.paused?"paused":"played",$.rr_mediaCurrentTime=e.currentTime,$.rr_mediaPlaybackRate=e.playbackRate,$.rr_mediaMuted=e.muted,$.rr_mediaLoop=e.loop,$.rr_mediaVolume=e.volume}I||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop));if(M){var Y=e.getBoundingClientRect(),Q=Y.width,X=Y.height;_={class:_.class,rr_width:"".concat(Q,"px"),rr_height:"".concat(X,"px")}}"iframe"!==T||w(_.src)||(e.contentDocument||(_.rr_src=_.src),delete _.src);try{customElements.get(T)&&(n=!0)}catch(K){}return{type:r.Element,tagName:T,attributes:_,childNodes:[],isSVG:Z(e)||void 0,needBlock:M,rootId:C,isCustom:n}}(e,{doc:n,blockClass:o,blockSelector:a,inlineStylesheet:u,maskInputOptions:l,maskInputFn:h,dataURLOptions:v,inlineImages:w,recordCanvas:E,keepIframeSrcFn:I,newlyAddedElement:M,rootId:T});case e.TEXT_NODE:return function(e,t){var n,i=t.needsMask,o=t.maskTextFn,a=t.rootId,s=e.parentNode&&e.parentNode.tagName,u=e.textContent,c="STYLE"===s||void 0,l="SCRIPT"===s||void 0;if(c&&u){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(u=f(e.parentNode.sheet))}catch(d){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(d),e)}u=N(u,F(t.doc))}l&&(u="SCRIPT_PLACEHOLDER");!c&&!l&&u&&i&&(u=o?o(u,e.parentElement):u.replace(/[\S]/g,"*"));return{type:r.Text,textContent:u||"",isStyle:c,rootId:a}}(e,{doc:n,needsMask:s,maskTextFn:d,rootId:T});case e.CDATA_SECTION_NODE:return{type:r.CDATA,textContent:"",rootId:T};case e.COMMENT_NODE:return{type:r.Comment,textContent:e.textContent||"",rootId:T};default:return!1}}function W(e){return void 0===e||null===e?"":e.toLowerCase()}function U(e,t){var n=t.doc,i=t.mirror,o=t.blockClass,a=t.blockSelector,s=t.maskTextClass,u=t.maskTextSelector,f=t.skipChild,h=void 0!==f&&f,p=t.inlineStylesheet,v=void 0===p||p,m=t.maskInputOptions,y=void 0===m?{}:m,g=t.maskTextFn,b=t.maskInputFn,k=t.slimDOMOptions,S=t.dataURLOptions,E=void 0===S?{}:S,x=t.inlineImages,M=void 0!==x&&x,T=t.recordCanvas,_=void 0!==T&&T,A=t.onSerialize,N=t.onIframeLoad,R=t.iframeLoadTimeout,D=void 0===R?5e3:R,O=t.onStylesheetLoad,L=t.stylesheetLoadTimeout,Z=void 0===L?5e3:L,F=t.keepIframeSrcFn,P=void 0===F?function(){return!1}:F,j=t.newlyAddedElement,V=void 0!==j&&j,q=t.needsMask,z=t.preserveWhiteSpace,G=void 0===z||z;!q&&e.childNodes&&(q=B(e,s,u,void 0===q));var $,Y=H(e,{doc:n,mirror:i,blockClass:o,blockSelector:a,needsMask:q,inlineStylesheet:v,maskInputOptions:y,maskTextFn:g,maskInputFn:b,dataURLOptions:E,inlineImages:M,recordCanvas:_,keepIframeSrcFn:P,newlyAddedElement:V});if(!Y)return console.warn(e,"not serialized"),null;$=i.hasNode(e)?i.getId(e):!function(e,t){if(t.comment&&e.type===r.Comment)return!0;if(e.type===r.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&"js"===w(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(W(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===W(e.attributes.name)||"icon"===W(e.attributes.rel)||"apple-touch-icon"===W(e.attributes.rel)||"shortcut icon"===W(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&W(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(W(e.attributes.property).match(/^(og|twitter|fb):/)||W(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===W(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===W(e.attributes.name)||"googlebot"===W(e.attributes.name)||"bingbot"===W(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===W(e.attributes.name)||"generator"===W(e.attributes.name)||"framework"===W(e.attributes.name)||"publisher"===W(e.attributes.name)||"progid"===W(e.attributes.name)||W(e.attributes.property).match(/^article:/)||W(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===W(e.attributes.name)||"yandex-verification"===W(e.attributes.name)||"csrf-token"===W(e.attributes.name)||"p:domain_verify"===W(e.attributes.name)||"verify-v1"===W(e.attributes.name)||"verification"===W(e.attributes.name)||"shopify-checkout-api-token"===W(e.attributes.name)))return!0}}return!1}(Y,k)&&(G||Y.type!==r.Text||Y.isStyle||Y.textContent.replace(/^\s+|\s+$/gm,"").length)?C():I;var Q=Object.assign(Y,{id:$});if(i.add(e,Q),$===I)return null;A&&A(e);var X=!h;if(Q.type===r.Element){X=X&&!Q.needBlock,delete Q.needBlock;var K=e.shadowRoot;K&&d(K)&&(Q.isShadowHost=!0)}if((Q.type===r.Document||Q.type===r.Element)&&X){k.headWhitespace&&Q.type===r.Element&&"head"===Q.tagName&&(G=!1);var J={doc:n,mirror:i,blockClass:o,blockSelector:a,needsMask:q,maskTextClass:s,maskTextSelector:u,skipChild:h,inlineStylesheet:v,maskInputOptions:y,maskTextFn:g,maskInputFn:b,slimDOMOptions:k,dataURLOptions:E,inlineImages:M,recordCanvas:_,preserveWhiteSpace:G,onSerialize:A,onIframeLoad:N,iframeLoadTimeout:D,onStylesheetLoad:O,stylesheetLoadTimeout:Z,keepIframeSrcFn:P};if(Q.type===r.Element&&"textarea"===Q.tagName&&void 0!==Q.attributes.value);else for(var ee=0,te=Array.from(e.childNodes);ee<te.length;ee++){var ne=U(te[ee],J);ne&&Q.childNodes.push(ne)}if(c(e)&&e.shadowRoot)for(var re=0,ie=Array.from(e.shadowRoot.childNodes);re<ie.length;re++){var oe=U(ie[re],J);oe&&(d(e.shadowRoot)&&(oe.isShadow=!0),Q.childNodes.push(oe))}}return e.parentNode&&l(e.parentNode)&&d(e.parentNode)&&(Q.isShadow=!0),Q.type===r.Element&&"iframe"===Q.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(u){return}if("complete"===i){var a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&N){var n=U(t,{doc:t,mirror:i,blockClass:o,blockSelector:a,needsMask:q,maskTextClass:s,maskTextSelector:u,skipChild:!1,inlineStylesheet:v,maskInputOptions:y,maskTextFn:g,maskInputFn:b,slimDOMOptions:k,dataURLOptions:E,inlineImages:M,recordCanvas:_,preserveWhiteSpace:G,onSerialize:A,onIframeLoad:N,iframeLoadTimeout:D,onStylesheetLoad:O,stylesheetLoadTimeout:Z,keepIframeSrcFn:P});n&&N(e,n)}}),D),Q.type===r.Element&&"link"===Q.tagName&&"string"===typeof Q.attributes.rel&&("stylesheet"===Q.attributes.rel||"preload"===Q.attributes.rel&&"string"===typeof Q.attributes.href&&"css"===w(Q.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(a){return}if(!r){var o=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(o),i=!0,t()}))}}(e,(function(){if(O){var t=U(e,{doc:n,mirror:i,blockClass:o,blockSelector:a,needsMask:q,maskTextClass:s,maskTextSelector:u,skipChild:!1,inlineStylesheet:v,maskInputOptions:y,maskTextFn:g,maskInputFn:b,slimDOMOptions:k,dataURLOptions:E,inlineImages:M,recordCanvas:_,preserveWhiteSpace:G,onSerialize:A,onIframeLoad:N,iframeLoadTimeout:D,onStylesheetLoad:O,stylesheetLoadTimeout:Z,keepIframeSrcFn:P});t&&O(e,t)}}),Z),Q}function q(e,t){var n=t||{},r=n.mirror,i=void 0===r?new p:r,o=n.blockClass,a=void 0===o?"rr-block":o,s=n.blockSelector,u=void 0===s?null:s,c=n.maskTextClass,l=void 0===c?"rr-mask":c,d=n.maskTextSelector,f=void 0===d?null:d,h=n.inlineStylesheet,v=void 0===h||h,m=n.inlineImages,y=void 0!==m&&m,g=n.recordCanvas,b=void 0!==g&&g,w=n.maskAllInputs,k=void 0!==w&&w,S=n.maskTextFn,E=n.maskInputFn,x=n.slimDOM,I=void 0!==x&&x,C=n.dataURLOptions,M=n.preserveWhiteSpace,T=n.onSerialize,_=n.onIframeLoad,A=n.iframeLoadTimeout,N=n.onStylesheetLoad,R=n.stylesheetLoadTimeout,D=n.keepIframeSrcFn;return U(e,{doc:e,mirror:i,blockClass:a,blockSelector:u,maskTextClass:l,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:!0===k?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===k?{password:!0}:k,maskTextFn:S,maskInputFn:E,slimDOMOptions:!0===I||"all"===I?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===I,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===I?{}:I,dataURLOptions:C,inlineImages:y,recordCanvas:b,preserveWhiteSpace:M,onSerialize:T,onIframeLoad:_,iframeLoadTimeout:A,onStylesheetLoad:N,stylesheetLoadTimeout:R,keepIframeSrcFn:void 0===D?function(){return!1}:D,newlyAddedElement:!1})}var z=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function o(){var e={line:n,column:r};return function(t){return t.position=new c(e),m(),t}}var c=(0,u.Z)((function e(i){(0,s.Z)(this,e),this.start=i,this.end={line:n,column:r},this.source=t.source}));c.prototype.content=e;var l=[];function d(i){var o=new Error("".concat(t.source||"",":").concat(n,":").concat(r,": ").concat(i));if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;l.push(o)}function f(){return v(/^{\s*/)}function h(){return v(/^}/)}function p(){var t,n=[];for(m(),y(n);e.length&&"}"!==e.charAt(0)&&(t=M()||T());)t&&(n.push(t),y(n));return n}function v(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function m(){v(/^\s*/)}function y(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e=g();)e&&t.push(e),e=g();return t}function g(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return d("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function b(){for(m();"}"==e[0];)d("extra closing bracket"),e=e.slice(1),m();var t=v(/^(((?<!\\)"(?:\\"|[^"])*"|(?<!\\)'(?:\\'|[^'])*'|[^{])+)/);if(t){var n=t[0].trim().replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"\u200c")}));return function(e){var t,n=[],r="",i=0,o=0,s=null,u=(0,a.Z)(e);try{for(u.s();!(t=u.n()).done;){var c=t.value,l=r.endsWith("\\");s?s!==c||l||(s=null):"("===c?i++:")"===c?i--:"["===c?o++:"]"===c?o--:"'\"".includes(c)&&(s=c),","===c&&0===i&&0===o?(n.push(r),r=""):r+=c}}catch(d){u.e(d)}finally{u.f()}r&&n.push(r);return n}(n).map((function(e){return e.replace(/\u200C/g,",").trim()}))}}function w(){var e=o(),t=v(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=$(t[0]);if(!v(/^:\s*/))return d("property missing ':'");var r=v(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(z,""),value:r?$(r[0]).replace(z,""):""});return v(/^[;\s]*/),i}}function k(){var e,t=[];if(!f())return d("missing '{'");for(y(t);e=w();)!1!==e&&(t.push(e),y(t)),e=w();return h()?t:d("missing '}'")}function S(){for(var e,t=[],n=o();e=v(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),v(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:k()})}var E=C("import"),x=C("charset"),I=C("namespace");function C(e){var t=new RegExp("^@"+e+"\\s*((?:"+['(?<!\\\\)"(?:\\\\"|[^"])*"',"(?<!\\\\)'(?:\\\\'|[^'])*'","[^;]"].join("|")+")+);");return function(){var n=o(),r=v(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function M(){if("@"===e[0])return function(){var e=o(),t=v(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=v(/^([-\w]+)\s*/)))return d("@keyframes missing name");var r,i=t[1];if(!f())return d("@keyframes missing '{'");for(var a=y();r=S();)a.push(r),a=a.concat(y());return h()?e({type:"keyframes",name:i,vendor:n,keyframes:a}):d("@keyframes missing '}'")}}()||function(){var e=o(),t=v(/^@media *([^{]+)/);if(t){var n=$(t[1]);if(!f())return d("@media missing '{'");var r=y().concat(p());return h()?e({type:"media",media:n,rules:r}):d("@media missing '}'")}}()||function(){var e=o(),t=v(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:$(t[1]),media:$(t[2])})}()||function(){var e=o(),t=v(/^@supports *([^{]+)/);if(t){var n=$(t[1]);if(!f())return d("@supports missing '{'");var r=y().concat(p());return h()?e({type:"supports",supports:n,rules:r}):d("@supports missing '}'")}}()||E()||x()||I()||function(){var e=o(),t=v(/^@([-\w]+)?document *([^{]+)/);if(t){var n=$(t[1]),r=$(t[2]);if(!f())return d("@document missing '{'");var i=y().concat(p());return h()?e({type:"document",document:r,vendor:n,rules:i}):d("@document missing '}'")}}()||function(){var e=o();if(v(/^@page */)){var t=b()||[];if(!f())return d("@page missing '{'");for(var n,r=y();n=w();)r.push(n),r=r.concat(y());return h()?e({type:"page",selectors:t,declarations:r}):d("@page missing '}'")}}()||function(){var e=o();if(v(/^@host\s*/)){if(!f())return d("@host missing '{'");var t=y().concat(p());return h()?e({type:"host",rules:t}):d("@host missing '}'")}}()||function(){var e=o();if(v(/^@font-face\s*/)){if(!f())return d("@font-face missing '{'");for(var t,n=y();t=w();)n.push(t),n=n.concat(y());return h()?e({type:"font-face",declarations:n}):d("@font-face missing '}'")}}()}function T(){var e=o(),t=b();return t?(y(),e({type:"rule",selectors:t,declarations:k()})):d("selector missing")}return Y(function(){var e=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:l}}}())}function $(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Y(e,t){for(var n=e&&"string"===typeof e.type,r=n?e:t,i=0,o=Object.keys(e);i<o.length;i++){var a=e[o[i]];Array.isArray(a)?a.forEach((function(e){Y(e,r)})):a&&"object"===typeof a&&Y(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Q={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function X(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var K=/(max|min)-device-(width|height)/,J=new RegExp(K.source,"g"),ee=/([^\\]):hover/,te=new RegExp(ee.source,"g");function ne(e,t){var n=null===t||void 0===t?void 0:t.stylesWithHoverClass.get(e);if(n)return n;var r=G(e,{silent:!0});if(!r.stylesheet)return e;var i=[],o=[];!function e(t){"selectors"in t&&t.selectors&&t.selectors.forEach((function(e){ee.test(e)&&i.push(e)})),"media"in t&&t.media&&K.test(t.media)&&o.push(t.media),"rules"in t&&t.rules&&t.rules.forEach(e)}(r.stylesheet);var a=e;if(i.length>0){var s=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return X(e)})).join("|"),"g");a=a.replace(s,(function(e){var t=e.replace(te,"$1.\\:hover");return"".concat(e,", ").concat(t)}))}if(o.length>0){var u=new RegExp(o.filter((function(e,t){return o.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return X(e)})).join("|"),"g");a=a.replace(u,(function(e){return e.replace(J,"$1-$2")}))}return null===t||void 0===t||t.stylesWithHoverClass.set(e,a),a}function re(){return{stylesWithHoverClass:new Map}}function ie(e,t){var n,a=t.doc,c=t.hackCss,l=t.cache;switch(e.type){case r.Document:return a.implementation.createDocument(null,"",null);case r.DocumentType:return a.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case r.Element:var d,f=function(e){var t=Q[e.tagName]?Q[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);e.isSVG?d=a.createElementNS("http://www.w3.org/2000/svg",f):(e.isCustom&&(null===(n=a.defaultView)||void 0===n?void 0:n.customElements)&&!a.defaultView.customElements.get(e.tagName)&&a.defaultView.customElements.define(e.tagName,function(e){(0,i.Z)(n,e);var t=(0,o.Z)(n);function n(){return(0,s.Z)(this,n),t.apply(this,arguments)}return(0,u.Z)(n)}(a.defaultView.HTMLElement)),d=a.createElement(f));var h={};for(var p in e.attributes)if(Object.prototype.hasOwnProperty.call(e.attributes,p)){var v=e.attributes[p];if(("option"!==f||"selected"!==p||!1!==v)&&null!==v)if(!0===v&&(v=""),p.startsWith("rr_"))h[p]=v;else{var m="textarea"===f&&"value"===p,y="style"===f&&"_cssText"===p;if(y&&c&&"string"===typeof v&&(v=ne(v,l)),!m&&!y||"string"!==typeof v)try{if(e.isSVG&&"xlink:href"===p)d.setAttributeNS("http://www.w3.org/1999/xlink",p,v.toString());else if("onload"===p||"onclick"===p||"onmouse"===p.substring(0,7))d.setAttribute("_"+p,v.toString());else{if("meta"===f&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===p){d.setAttribute("csp-content",v.toString());continue}("link"!==f||"preload"!==e.attributes.rel&&"modulepreload"!==e.attributes.rel||"script"!==e.attributes.as)&&("link"===f&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")||("img"===f&&e.attributes.srcset&&e.attributes.rr_dataURL?d.setAttribute("rrweb-original-srcset",e.attributes.srcset):d.setAttribute(p,v.toString())))}}catch(w){}else d.appendChild(a.createTextNode(v)),e.childNodes=[]}}var g=function(){var t=h[b];if("canvas"===f&&"rr_dataURL"===b){var n=document.createElement("img");n.onload=function(){var e=d.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=t.toString(),d.RRNodeType&&(d.rr_dataURL=t.toString())}else if("img"===f&&"rr_dataURL"===b){var r=d;r.currentSrc.startsWith("data:")||(r.setAttribute("rrweb-original-src",e.attributes.src),r.src=t.toString())}if("rr_width"===b)d.style.width=t.toString();else if("rr_height"===b)d.style.height=t.toString();else if("rr_mediaCurrentTime"===b&&"number"===typeof t)d.currentTime=t;else if("rr_mediaState"===b)switch(t){case"played":d.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":d.pause()}else"rr_mediaPlaybackRate"===b&&"number"===typeof t?d.playbackRate=t:"rr_mediaMuted"===b&&"boolean"===typeof t?d.muted=t:"rr_mediaLoop"===b&&"boolean"===typeof t?d.loop=t:"rr_mediaVolume"===b&&"number"===typeof t&&(d.volume=t)};for(var b in h)g();if(e.isShadowHost)if(d.shadowRoot)for(;d.shadowRoot.firstChild;)d.shadowRoot.removeChild(d.shadowRoot.firstChild);else d.attachShadow({mode:"open"});return d;case r.Text:return a.createTextNode(e.isStyle&&c?ne(e.textContent,l):e.textContent);case r.CDATA:return a.createCDATASection(e.textContent);case r.Comment:return a.createComment(e.textContent);default:return null}}function oe(e,t){var n,i,o=t.doc,s=t.mirror,u=t.skipChild,l=void 0!==u&&u,d=t.hackCss,f=void 0===d||d,h=t.afterAppend,p=t.cache;if(s.has(e.id)){var v=s.getNode(e.id),m=s.getMeta(v);if(i=e,(n=m)&&i&&n.type===i.type&&(n.type===r.Document?n.compatMode===i.compatMode:n.type===r.DocumentType?n.name===i.name&&n.publicId===i.publicId&&n.systemId===i.systemId:n.type===r.Comment||n.type===r.Text||n.type===r.CDATA?n.textContent===i.textContent:n.type===r.Element&&n.tagName===i.tagName&&JSON.stringify(n.attributes)===JSON.stringify(i.attributes)&&n.isSVG===i.isSVG&&n.needBlock===i.needBlock))return s.getNode(e.id)}var y=ie(e,{doc:o,hackCss:f,cache:p});if(!y)return null;if(e.rootId&&s.getNode(e.rootId)!==o&&s.replace(e.rootId,o),e.type===r.Document&&(o.close(),o.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==r.DocumentType&&(e.childNodes[0].type===r.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?o.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):o.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),y=o),s.add(y,e),(e.type===r.Document||e.type===r.Element)&&!l){var g,b=(0,a.Z)(e.childNodes);try{var w=function(){var t=g.value,n=oe(t,{doc:o,mirror:s,skipChild:!1,hackCss:f,afterAppend:h,cache:p});if(!n)return console.warn("Failed to rebuild",t),1;if(t.isShadow&&c(y)&&y.shadowRoot)y.shadowRoot.appendChild(n);else if(e.type===r.Document&&t.type==r.Element){var i=n,a=null;i.childNodes.forEach((function(e){"BODY"===e.nodeName&&(a=e)})),a?(i.removeChild(a),y.appendChild(n),i.appendChild(a)):y.appendChild(n)}else y.appendChild(n);h&&h(n,t.id)};for(b.s();!(g=b.n()).done;)w()}catch(k){b.e(k)}finally{b.f()}}return y}function ae(e,t){var n=t.doc,i=t.onVisit,o=t.hackCss,s=void 0===o||o,u=t.afterAppend,c=t.cache,l=t.mirror,d=void 0===l?new p:l,f=oe(e,{doc:n,mirror:d,skipChild:!1,hackCss:s,afterAppend:u,cache:c});return function(e,t){var n,r=(0,a.Z)(e.getIds());try{for(r.s();!(n=r.n()).done;){var i=n.value;e.has(i)&&t(e.getNode(i))}}catch(o){r.e(o)}finally{r.f()}}(d,(function(e){i&&i(e),function(e,t){var n=t.getMeta(e);if((null===n||void 0===n?void 0:n.type)===r.Element){var i=e;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var a=n.attributes[o];"rr_scrollLeft"===o&&(i.scrollLeft=a),"rr_scrollTop"===o&&(i.scrollTop=a)}}}(e,d)})),f}},1737:function(e,t,n){"use strict";n.d(t,{$1:function(){return v},Cj:function(){return M},E2:function(){return D},Fn:function(){return C},He:function(){return A},IT:function(){return b},OK:function(){return x},P2:function(){return d},WU:function(){return k},_X:function(){return R},_f:function(){return F},fM:function(){return y},gp:function(){return m},jB:function(){return L},md:function(){return N},nF:function(){return w},on:function(){return u},qs:function(){return T},r$:function(){return h},rU:function(){return g},s6:function(){return I},ug:function(){return O},vD:function(){return _},xO:function(){return E},y5:function(){return S},yU:function(){return f},zq:function(){return p}});var r=n(5671),i=n(3144),o=n(2982),a=n(7762),s=n(5512);function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var c="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",l={map:{},getId:function(){return console.error(c),-1},getNode:function(){return console.error(c),null},removeNodeFromMap:function(){console.error(c)},has:function(){return console.error(c),!1},reset:function(){console.error(c)}};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=Date.now();i||!1!==n.leading||(i=u);var c=t-(u-i),l=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(l,a)):r||!1===n.trailing||(r=setTimeout((function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(l,a)}),c))}}function f(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),o&&o.set&&o.set.call(this,e)}}),function(){return f(e,t,o||{},!0)}}function h(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"===typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(o){return function(){}}}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(l=new Proxy(l,{get:function(e,t,n){return"map"===t&&console.error(c),Reflect.get(e,t,n)}}));var p=Date.now;function v(e){var t,n,r,i,o,a,s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null===s||void 0===s?void 0:s.documentElement.scrollLeft)||(null===(n=null===(t=null===s||void 0===s?void 0:s.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null===s||void 0===s?void 0:s.body)||void 0===r?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null===s||void 0===s?void 0:s.documentElement.scrollTop)||(null===(o=null===(i=null===s||void 0===s?void 0:s.body)||void 0===i?void 0:i.parentElement)||void 0===o?void 0:o.scrollTop)||(null===(a=null===s||void 0===s?void 0:s.body)||void 0===a?void 0:a.scrollTop)||0}}function m(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function y(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function g(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function b(e,t,n,r){if(!e)return!1;var i=g(e);if(!i)return!1;try{if("string"===typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if((0,s.pe)(i,t,r))return!0}catch(o){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function w(e,t){return-1!==t.getId(e)}function k(e,t){return t.getId(e)===s.zi}function S(e,t){if((0,s.Zq)(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||S(e.parentNode,t))}function E(e){return Boolean(e.changedTouches)}function x(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===i)return!0}while(i=i&&i.parentNode);return!1})}function I(e){var t,n={},r=function(e,t){var r={value:e,parent:t,children:[]};return n[e.node.id]=r,r},i=[],o=(0,a.Z)(e);try{for(o.s();!(t=o.n()).done;){var s=t.value,u=s.nextId,c=s.parentId;if(u&&u in n){var l=n[u];if(l.parent){var d=l.parent.children.indexOf(l);l.parent.children.splice(d,0,r(s,l.parent))}else{var f=i.indexOf(l);i.splice(f,0,r(s,null))}}else if(c in n){var h=n[c];h.children.push(r(s,h))}else i.push(r(s,null))}}catch(p){o.e(p)}finally{o.f()}return i}function C(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)C(e.children[n],t)}function M(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function T(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function _(e,t){var n,r,i=null===(r=null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var o=i.getBoundingClientRect(),a=_(i,t),s=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function A(e){return Boolean(null===e||void 0===e?void 0:e.shadowRoot)}function N(e,t){var n=e[t[0]];return 1===t.length?n:N(n.cssRules[t[1]].cssRules,t.slice(2))}function R(e){var t=(0,o.Z)(e),n=t.pop();return{positions:t,index:n}}function D(e){for(var t=new Set,n=[],r=e.length;r--;){var i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}/[1-9][0-9]{12}/.test(Date.now().toString())||(p=function(){return(new Date).getTime()});var O=function(){function e(){(0,r.Z)(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return(0,i.Z)(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}();function L(e){var t,n,r=null;return(null===(n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function Z(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=L(n);)n=t;return n}(e);return t.contains(n)}function F(e){var t=e.ownerDocument;return!!t&&(t.contains(e)||Z(e))}},1414:function(e,t,n){"use strict";n.d(t,{Et:function(){return a},FX:function(){return s},SA:function(){return u},Y2:function(){return o},tw:function(){return r},yh:function(){return i}});var r=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(r||{}),i=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(i||{}),o=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(o||{}),a=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(a||{}),s=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(s||{}),u=function(e){return e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e}(u||{})}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+"."+{542:"044e26d9",736:"3b0c3434"}[e]+".chunk.js"},n.miniCssF=function(e){return"static/css/"+e+".32598d7d.chunk.css"},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={};n.l=function(t,r,i,o){if(e[t])e[t].push(r);else{var a,s;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var l=u[c];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")=="fe:"+i){a=l;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack","fe:"+i),a.src=t),e[t]=[r];var d=function(n,r){a.onerror=a.onload=null,clearTimeout(f);var i=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((function(e){return e(r)})),n)return n(r)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n.p="/",function(){if("undefined"!==typeof document){var e=function(e){return new Promise((function(t,r){var i=n.miniCssF(e),o=n.p+i;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var i=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(i===e||i===t))return a}var o=document.getElementsByTagName("style");for(r=0;r<o.length;r++){var a;if((i=(a=o[r]).getAttribute("data-href"))===e||i===t)return a}}(i,o))return t();!function(e,t,n,r,i){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(n){if(o.onerror=o.onload=null,"load"===n.type)r();else{var a=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.href||t,u=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");u.code="CSS_CHUNK_LOAD_FAILED",u.type=a,u.request=s,o.parentNode&&o.parentNode.removeChild(o),i(u)}},o.href=t,n?n.parentNode.insertBefore(o,n.nextSibling):document.head.appendChild(o)}(e,o,null,t,r)}))},t={179:0};n.f.miniCss=function(n,r){t[n]?r.push(t[n]):0!==t[n]&&{736:1}[n]&&r.push(t[n]=e(n).then((function(){t[n]=0}),(function(e){throw delete t[n],e})))}}}(),function(){var e={179:0};n.f.j=function(t,r){var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise((function(n,r){i=e[t]=[n,r]}));r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var i,o,a=r[0],s=r[1],u=r[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(u)u(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkfe=self.webpackChunkfe||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e={};n.r(e),n.d(e,{default:function(){return gt}});var t=n(4165),r=n(5861),i=n(603),o=n(9478),a=n(5671),s=n(3144),u=function(){function e(t){if((0,a.Z)(this,e),this.structuralVicinity=void 0,this.visualVicinity=void 0,this.serializedElement=void 0,this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.innerFeatures=void 0,this.staticCandidates=void 0,this.positioning=void 0,this.svgs=void 0,"object"===typeof t)for(var n in t)this[n]=t[n];else if("string"===typeof t){var r=JSON.parse(t);for(var i in r)this[i]=r[i]}}return(0,s.Z)(e,[{key:"serialize",value:function(){return JSON.stringify(this)}}]),e}(),c={attributesToExtract:["class","src","placeholder","href","checked","disabled","contenteditable","draggable","hidden","inputmode","role","title","name","type","readonly","size","required","multiple","min","max","step","maxlength","alt","loop","controls","poster"],structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}},l=n(1413),d=n(7873),f=n(4942),h={rect:["width","height"],circle:["cx","cy","r"],ellipse:["cx","cy","rx","ry"],line:["x1","y1","x2","y2"],polygon:["points"],polyline:["points"],path:["d"],text:["x","y"]},p=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.limit=5,this.extractSVG=function(e){return Array.from(e.children).map((function(e){var t=h[e.tagName.toLowerCase()];if(!t)return null;var n=t.reduce((function(t,n){var r=e.getAttribute(n);return(0,l.Z)((0,l.Z)({},t),{},(0,f.Z)({},n,r))}),{});return{tagName:e.tagName.toLowerCase(),attributes:n}})).filter((function(e){return!!e}))}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.matches("svg")?[e]:e.querySelectorAll("svg");if(t.length&&!(t.length>this.limit))return Array.from(t).map(this.extractSVG)}}]),e}(),v=n(458),m=function(e){return(0,v.GF)(e,{useCache:!0}).isHidden},y=function(e,t){var n=e.tagName.toLowerCase();switch(n){case"img":case"video":case"audio":return{type:d.EI.Media,tag:n,src:e.getAttribute("src"),size:{width:e.clientWidth,height:e.clientHeight},screenSize:{width:window.innerWidth,height:window.innerHeight},isRoot:t,isHidden:m(e)};case"svg":return{type:d.EI.SVG,tag:n,components:new p(document).extract(e)[0],isRoot:t,isHidden:m(e)};case"a":return{type:d.EI.Anchor,tag:n,href:e.getAttribute("href"),text:e.innerText,isRoot:t,isHidden:m(e)};case"button":return{type:d.EI.Button,tag:n,text:e.innerText,buttonType:e.getAttribute("type")||"button",isRoot:t,isHidden:m(e)};case"input":return{type:d.EI.Input,tag:n,inputType:e.getAttribute("type"),placeholder:e.getAttribute("placeholder"),isRoot:t,isHidden:m(e)};case"table":case"form":case"textarea":case"iframe":case"select":return{type:d.EI.NoData,tag:n,isRoot:t,isHidden:m(e)}}if(e.innerHTML.trim()===e.innerText&&e.innerHTML.length)return{type:d.EI.Text,tag:n,text:g(e.innerHTML),isRoot:t,isHidden:m(e)}},g=function(e){return e.length>256?e.substring(0,256)+"...":e},b=function(e){return Object.keys(e||{}).reduce((function(t,n){var r=e[n];return r&&(t[n]=r),t}),{})},w=function(e){var t=b(e);return!(!t||!Object.keys(t).length)},k=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord;return i?void 0!==o&&o?e===t||e.startsWith(t)||e.includes(" ".concat(t," "))||e.endsWith(t):e.includes(t):e===t},S=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.elementsByQueryCache={}}return(0,s.Z)(e,[{key:"getElementsByQuery",value:function(e){return this.elementsByQueryCache[e]||(this.elementsByQueryCache[e]=(0,v.RA)(e,this.document)),this.elementsByQueryCache[e]}},{key:"extract",value:function(e){for(var t=this,n=e.element,r=e.setClass,i=e.setAttribute,o=e.getElementsInStructuralVicinity,a=e.getElementsInVisualVicinity,s=function(){var e=n.attributes[u],s=e.name,l=e.value;return c.attributesToExtract.includes(s)?"string"!==typeof l?0:"class"===s?(l.split(" ").forEach((function(e){e.length&&r(e,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,e,{contains:!0,matchWholeWord:!0}))})),0):void i(s,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,l)):0},u=0;u<n.attributes.length;++u)s()}},{key:"processAttribute",value:function(e,t,n){var r=e.element,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=this.getElementsByQuery("*"),u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord,a=void 0!==o&&o;return t=t.replaceAll("\n","\\A ").replaceAll('"','\\"'),i?a?"[".concat(e,'="').concat(t,'"],[').concat(e,'*="').concat(t,' "],[').concat(e,'*=" ').concat(t,' "],[').concat(e,'*=" ').concat(t,'"]'):"[".concat(e,'*="').concat(t,'"]'):"[".concat(e,'="').concat(t,'"]')}(t,n,a),c=this.getElementsByQuery(u),l=this.getElementsByQuery("".concat(r.tagName.toLowerCase())),d=c.filter((function(e){return e.tagName===r.tagName})),f=i?i():[],h=f.filter((function(e){return e.element.attributes[t]&&k(e.element.attributes[t].value,n,a)})),p=o?o():[],v=p.filter((function(e){return e.element.attributes[t]&&k(e.element.attributes[t].value,n,a)}));return{value:n,globalUniqueness:1-c.length/s.length,tagUniqueness:1-d.length/l.length,structuralVicinityUniqueness:i?1-h.length/f.length:void 0,visualVicinityUniqueness:o?1-v.length/p.length:void 0}}}]),e}(),E=function(){function e(t){var n=this;(0,a.Z)(this,e),this.el=null,this.structuralVicinityData=void 0,this.visualVicinityData=void 0,this.serializedElement="",this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.react=void 0,this.innerFeatures=void 0,this.positioning=void 0,this.svgs=void 0,this.attributesExtractor=void 0,this.getElementsInStructuralVicinity=function(){return n.structuralVicinityData.elementsInStructuralVicinity},this.setElementStructuralVicinityData=function(e){n.structuralVicinityData=e},this.setElementVisualVicinityData=function(e){n.visualVicinityData=e},this.getElementsInVisualVicinity=function(){return n.visualVicinityData},this.setSerializedElement=function(e){n.serializedElement=e},this.setAttribute=function(e,t){n.attributes[e]=t},this.setClass=function(e,t){n.classes[e]=t},this.setInnerText=function(e){n.innerText=e},this.setStyle=function(e){n.style=e},this.setTag=function(e){n.tag=e},this.setReact=function(e){n.react=e},this.setInnerFeatures=function(e){n.innerFeatures=e},this.setPositioning=function(e){n.positioning=e},this.setSVGs=function(e){n.svgs=e},this.el=t,this.attributesExtractor=new S(this.el.ownerDocument)}return(0,s.Z)(e,[{key:"serialize",value:function(){}},{key:"getSerializedElement",value:function(){return this.serializedElement}},{key:"element",get:function(){return this.el}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getClasses",value:function(){return this.classes}},{key:"getStyle",value:function(){return this.style}},{key:"getInlineStyle",value:function(){return this.style.inline}},{key:"getComputedStyle",value:function(){return this.style.computed}},{key:"getTag",value:function(){return this.tag}},{key:"getInnerFeatures",value:function(){return this.innerFeatures}},{key:"getInnerText",value:function(){return this.innerText}},{key:"getSVGs",value:function(){return this.svgs}},{key:"toMetadata",value:function(){return{structuralVicinity:this.makeStructuralVicinityMetadata(),visualVicinity:this.makeVisualVicinityMetadata(),serializedElement:this.getSerializedElement(),attributes:this.getAttributes(),classes:this.getClasses(),innerText:this.getInnerText(),tag:this.getTag(),style:this.getStyle(),innerFeatures:this.getInnerFeatures(),staticCandidates:this.extractStaticCandidates(),positioning:this.positioning,svgs:this.getSVGs()}}},{key:"extractStaticCandidates",value:function(){return b({text:this.extractStaticTextCandidate(),labeled:this.extractLabeled(),labeling:this.extractLabeling(),svgTitle:this.extractSVGTitle()})}},{key:"makeVicinityMetadata",value:function(e,t){var n=this;return e.reduce((function(e,r){var i=n.isVicinityQualifiedElement(r.element),o=i.qualified,a=i.feature;if(!o)return e;var s={},u={};n.attributesExtractor.extract({element:r.element,setClass:function(e,t){return s[e]=t},setAttribute:function(e,t){return u[e]=t}});var c=(0,l.Z)({tag:r.element.tagName.toLowerCase(),classes:s,attributes:u,text:n.extractTextForMetadata(r.element),feature:a,relativePosition:n.element.compareDocumentPosition(r.element)},t(r));return e.push(c),e}),[])}},{key:"makeStructuralVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInStructuralVicinity(),(function(e){return{position:e.position}}))}},{key:"makeVisualVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInVisualVicinity(),(function(e){return{position:[e.position],distance:e.distance}}))}},{key:"isVicinityQualifiedElement",value:function(e){if(e===this.element)return{qualified:!1};if(!c.vicinityFeatureElementsOnly)return{qualified:!0};var t=y(e);return{qualified:!!t,feature:t}}},{key:"extractTextForMetadata",value:function(e){if(e.innerHTML===e.innerText){var t=e.innerHTML;return t.length>256?t.substring(0,256)+"...":t}}},{key:"extractStaticTextCandidate",value:function(){var e,t,n;switch(this.tag){case"input":case"textarea":return null===(e=this.attributes)||void 0===e||null===(t=e.placeholder)||void 0===t?void 0:t.value;default:return null===(n=this.innerText)||void 0===n?void 0:n.content}}},{key:"extractLabeling",value:function(){if("label"===this.element.tagName.toLowerCase())return(0,v.C0)(this.element);var e=(0,v.Du)(this.element,"label");if(e&&this.attributeExists(e.getAttribute("for")))return(0,v.C0)(e);try{if(this.element.id&&this.element.id.length)if((0,v.RA)('[aria-labelledby="'.concat(this.element.id,'"]')).length)return(0,v.C0)(this.element)}catch(xt){console.error("extractLabeling error",xt)}}},{key:"extractLabeled",value:function(){var e=this.element.getAttribute("aria-label");if(this.attributeExists(e))return e;var t=(0,v.Du)(this.element,"label");if(t&&!this.attributeExists(t.getAttribute("for")))return(0,v.C0)(t);if(this.element.id&&this.element.id.length)try{var n=(0,v.RA)("label[for=".concat(this.element.id,"]"));if(n.length)return(0,v.C0)(n[0])}catch(xt){return}var r=this.element.getAttribute("aria-labelledby");if(this.attributeExists(r)){var i=(0,v.RA)(r.split(" ").map((function(e){return"#".concat(e)})).join(","));if(i.length)return(0,v.C0)(i[0])}}},{key:"extractSVGTitle",value:function(){try{if("svg"!==this.element.tagName.toLowerCase())return;var e=this.element.querySelector("title");if(!e)return;return(0,v.C0)(e)}catch(xt){console.error("extractSVGTitle error",xt)}}},{key:"attributeExists",value:function(e){return e&&e.length>0}}]),e}(),x=n(2982),I=function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.structuralVicinityData={elementsInStructuralVicinity:[],html:""},this.element=t,this.config=n}return(0,s.Z)(e,[{key:"getInitialLimit",value:function(){switch(this.config.type){case"ratio":return document.querySelectorAll("*").length*this.config.value;case"fixed":return this.config.value}}},{key:"calculate",value:function(){var e=Date.now().toString();return this.structuralVicinityData.html=this.populateStructuralVicinity(this.element,[d.i7.Element],{runId:e,step:0,limit:this.getInitialLimit()}),this.structuralVicinityData.elementsInStructuralVicinity.forEach((function(t){return t.element.attributes.removeNamedItem("checksum-radial-traverse-".concat(e))})),this.structuralVicinityData}},{key:"populateStructuralVicinity",value:function(e,t,n){var r=this,i=n.runId,o=n.step,a=n.limit;if(!e||o>a)return"";if(void 0!==e.attributes["checksum-radial-traverse-".concat(i)])return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute("checksum-radial-traverse-".concat(i),o.toString());var s={runId:i,step:o+1,limit:this.config.useDecayingLimit?a-1:a},u=this.populateStructuralVicinity((0,v.nq)(e),[].concat((0,x.Z)(t),[d.i7.Parent]),s),c=this.populateStructuralVicinity(e.previousElementSibling,[].concat((0,x.Z)(t),[d.i7.LeftSibling]),s),l=this.populateStructuralVicinity(e.nextElementSibling,[].concat((0,x.Z)(t),[d.i7.RightSibling]),s),f=[];(0,v.ZH)(e).map((function(e,n){return f.push(r.populateStructuralVicinity(e,[].concat((0,x.Z)(t),[d.i7.Child]),s))}));var h=c+e.outerHTML.replace(e.innerHTML,f.join(""))+l;return u&&!u.includes(e.outerHTML)?u.replace("></",">".concat(h,"</")):u?u.replace(e.outerHTML,h):h}}]),e}(),C=function(e){return e[e.New=0]="New",e[e.Covered=1]="Covered",e[e.ElementTooBig=2]="ElementTooBig",e[e.Self=3]="Self",e}(C||{}),M=function(){function e(t,n){var r;(0,a.Z)(this,e),this.document=t,this.config=n,this.debug=!1,this.sampleBoxColors=(r={},(0,f.Z)(r,C.New,"green"),(0,f.Z)(r,C.Covered,"orange"),(0,f.Z)(r,C.ElementTooBig,"red"),(0,f.Z)(r,C.Self,"blue"),r)}return(0,s.Z)(e,[{key:"calculate",value:function(e){for(var t=this,n=[],r=this.config.radius,i=this.config.scanStep,o=e.getBoundingClientRect(),a=o.left-r;a<o.left+o.width+r;a+=i)for(var s=function(){var e=a+i/2,s=u+i/2;if(t.doesRectContain(o,{left:a,top:u,right:a+i,bottom:u+i}))return t.addTrace(e,s,i,C.Self),0;var c=t.document.elementFromPoint(e,s);if(!c)return 0;var l=c.getBoundingClientRect();if(l.width>2*r&&l.height>2*r||t.doesRectContain(l,o))return t.addTrace(e,s,i,C.ElementTooBig),0;if(!!n.find((function(e){return e.element===c})))return t.addTrace(e,s,i,C.Covered),0;var d=t.getPosition(o,l),f=d.position,h=d.distance;n.push({element:c,position:f,distance:h}),t.addTrace(e,s,i,C.New)},u=o.top-r;u<o.top+o.height+r;u+=i)s();return n}},{key:"getPosition",value:function(e,t){var n=this.getCenter(t),r=n.x,i=n.y,o=this.getCenter(e),a=o.x,s=o.y;return{distance:Number(Math.sqrt(Math.pow(a-r,2)+Math.pow(s-i,2)).toFixed(2)),position:function(){var e=r-a,t=i-s;return e<0&&t<0?d.BM.TopLeft:e>0&&t<0?d.BM.TopRight:e<0&&t>0?d.BM.BottomLeft:e>0&&t>0?d.BM.BottomRight:0===e&&t<0?d.BM.Top:0===e&&t>0?d.BM.Bottom:e<0&&0===t?d.BM.Left:e>0&&0===t?d.BM.Right:d.BM.Center}()}}},{key:"getCenter",value:function(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}},{key:"addTrace",value:function(e,t,n,r){if(this.debug){var i=this.document.createElement("xdiv");i.setAttribute("style","position: absolute; width: ".concat(n,"px; height: ").concat(n,"px; top: ").concat(t,"px; left: ").concat(e,"px; background: ").concat(this.sampleBoxColors[r],"; z-index: 999999999999;opacity:0.4")),this.document.getElementsByTagName("body")[0].prepend(i)}}},{key:"doesRectContain",value:function(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}},{key:"doRectsOverlap",value:function(e,t){var n=e.right<t.left,r=e.left>t.right,i=e.top>t.bottom,o=e.top<t.top;return!(n||r||i||o)}}]),e}();window.vve=new M({radius:50,scanStep:10});var T=n(2352);window.resq$=T.resq$,window.resq$$=T.resq$$;var _=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=this.findParentComponent(e,{ignoreBaseElement:!0});return{component:t,parentComponent:this.findParentComponent(t.node)}}},{key:"findParentComponent",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.ignoreBaseElement,i=void 0!==r&&r,o=n.baseElement,a=void 0===o?void 0:o,s=(0,T.resq$$)("*",e.parentElement).find((function(t){return 1===t.children.length&&t.children[0].node===e}));return a=null!==(t=a)&&void 0!==t?t:e,s&&(i||s.node!==a)?this.parseRESQresult(s):this.findParentComponent(e.parentElement,{baseElement:a,ignoreBaseElement:i})}},{key:"parseRESQresult",value:function(e){if(e){return{name:e.name,node:e.node,isFragment:e.isFragment,stateTokens:function e(t){switch(typeof t){case"string":return[t];case"object":return Array.isArray(t)?t.map(e):Object.keys(t)}}(e.state),propsNames:Object.keys(e.props),hasChildren:!!e.children.length}}}}]),e}(),A=new _,N=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){return{component:void 0,parentComponent:void 0}}}]),e}(),R=(new N,function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.provider=A,this.element=t,this.config=n}return(0,s.Z)(e,[{key:"extract",value:function(){return this.provider.extract(this.element)}}]),e}()),D=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.tagBaseComputedStyle={}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.element,n=e.setStyle,r=t.tagName.toLowerCase();try{if(!this.tagBaseComputedStyle[r]){var i=this.document.createElement(r);this.document.getElementsByTagName("body")[0].prepend(i),this.tagBaseComputedStyle[r]=this.sanitzieStyle(window.getComputedStyle(i)),i.remove()}}catch(xt){if(console.error("Failed to extract style for tag",r,xt),!this.tagBaseComputedStyle[r])return}n({inline:this.sanitzieStyle(t.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[r],this.sanitzieStyle(window.getComputedStyle(t)))})}},{key:"diffComputedStyle",value:function(e,t){var n,r;return n=e,r=t,Object.keys(r).reduce((function(e,t){return n[t]===r[t]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},t,r[t]))}),{})}},{key:"sanitzieStyle",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).acceptEmptyValue,n=void 0===t||t;return Object.keys(e).reduce((function(t,r){if(!isNaN(r))return t;var i=e[r];return n||i?(t[r]=i,t):t}),{})}}]),e}(),O=n(1209),L=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.cache=void 0,this.makeFeatureNode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:n?e.tagName.toLowerCase():void 0,feature:n?y(e,t):void 0,children:[],isRoot:t}},this.includeRootElements=!0,this.rootElementsTypeExceptions=[d.EI.Text],this.cache=O.J.getInstance("innerFeaturesExtractor",{log:!1})}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=[],n=this.makeFeatureNode(e,!0);return this.walk(e,n,t),t}},{key:"getMapFromCache",value:function(){var e=this.cache.get();return e||(e=new Map,this.cache.set(e)),e}},{key:"getFeatureNodeFromCache",value:function(e){var t=this.getMapFromCache();return t.has(e)?t.get(e):void 0}},{key:"addFeatureNodeToCache",value:function(e,t){var n=this.getMapFromCache();n.set(e,t),this.cache.set(n)}},{key:"walk",value:function(e,t,n){var r=this,i=!1;(0,v.mn)(e).forEach((function(e){var o,a=null!==(o=r.getFeatureNodeFromCache(e))&&void 0!==o?o:r.makeFeatureNode(e),s=r.walk(e,a,n);s&&t.children.push(a),i||(i=s)}));var o=!!t.feature;return!o||t.isRoot&&!this.shouldIncludeRootNode(t)||n.push(t.feature),this.addFeatureNodeToCache(e,t),o||i}},{key:"shouldIncludeRootNode",value:function(e){return!!this.includeRootElements&&!this.rootElementsTypeExceptions.includes(e.type)}}]),e}();window.inner_features_extractor=new L;var Z=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t;return{content:null!==(t=(0,v.C0)(e))&&void 0!==t?t:void 0}}}]),e}(),F=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.bottom,i=t.left,o=t.right,a=document.documentElement.scrollHeight,s=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(n,window.innerHeight),bottom:this.normalize(r,window.innerHeight),left:this.normalize(i,window.innerWidth),right:this.normalize(o,window.innerWidth)}},document:{size:{height:a,width:s},element:{top:this.normalize(n+window.scrollY,a),bottom:this.normalize(r+window.scrollY,a),left:this.normalize(i+window.scrollX,s),right:this.normalize(o+window.scrollX,s)}}}}},{key:"normalize",value:function(e,t){return e/t}}]),e}(),P=n(5034),j=function(){function e(t,n){(0,a.Z)(this,e),this.xmlSerializer=void 0,this.document=void 0,this.config=void 0,this.visualVicinityExtractor=void 0,this.styleExtractor=void 0,this.innerFeaturesExtractor=void 0,this.innerTextExtractor=void 0,this.positioningExtractor=void 0,this.stats={serializeElement:0,populateElementsInStructuralVicinity:0,populateElementsInVisualVicinity:0,extractAttributes:0,extractInnerText:0,extractStyle:0,extractTag:0,extractInnerFeatures:0,extractPositioning:0,extractSVGComponents:0,final:0},this.xmlSerializer=new XMLSerializer,this.document=t,this.config=null!==n&&void 0!==n?n:c,this.visualVicinityExtractor=new M(this.document,this.config.visualVicinity),this.styleExtractor=new D(this.document),this.innerFeaturesExtractor=new L(this.document),this.innerTextExtractor=new Z(this.document),this.positioningExtractor=new F(this.document)}return(0,s.Z)(e,[{key:"isSameDocument",value:function(e){return this.document===e}},{key:"extract",value:function(e){var t=new P.t(e).scrollIntoView(),n=Date.now(),r=new E(e);return this.serializeElement(r),this.stats.serializeElement+=Date.now()-n,n=Date.now(),this.populateElementsInStructuralVicinity(r),this.stats.populateElementsInStructuralVicinity+=Date.now()-n,n=Date.now(),this.populateElementsInVisualVicinity(r),this.stats.populateElementsInVisualVicinity+=Date.now()-n,n=Date.now(),this.extractAttributes(r),this.stats.extractAttributes+=Date.now()-n,n=Date.now(),this.extractInnerText(r),this.stats.extractInnerText+=Date.now()-n,n=Date.now(),this.extractStyle(r),this.stats.extractStyle+=Date.now()-n,n=Date.now(),this.extractTag(r),this.stats.extractTag+=Date.now()-n,n=Date.now(),this.extractInnerFeatures(r),this.stats.extractInnerFeatures+=Date.now()-n,n=Date.now(),this.extractPositioning(r),this.stats.extractPositioning+=Date.now()-n,n=Date.now(),this.extractSVGComponents(r),this.stats.extractSVGComponents+=Date.now()-n,n=Date.now(),t.restore(),this.stats.final+=Date.now()-n,r}},{key:"extractReact",value:function(e){var t=e.element;(0,e.setReact)(new R(t,this.config.react).extract())}},{key:"extractTag",value:function(e){var t=e.element;(0,e.setTag)(t.tagName.toLowerCase())}},{key:"extractPositioning",value:function(e){var t=e.element;(0,e.setPositioning)(this.positioningExtractor.extract(t))}},{key:"extractSVGComponents",value:function(e){var t=e.element;(0,e.setSVGs)(new p(this.document).extract(t))}},{key:"serializeElement",value:function(e){e.element,e.setSerializedElement}},{key:"extractAttributes",value:function(e){var t=e.element,n=e.setClass,r=e.setAttribute,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity;return new S(this.document).extract({element:t,setClass:n,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o})}},{key:"populateElementsInStructuralVicinity",value:function(e){var t=e.element;(0,e.setElementStructuralVicinityData)(new I(t,this.config.structuralVicinity).calculate())}},{key:"populateElementsInVisualVicinity",value:function(e){var t=e.element;(0,e.setElementVisualVicinityData)(this.visualVicinityExtractor.calculate(t))}},{key:"extractInnerText",value:function(e){var t=e.element;(0,e.setInnerText)(this.innerTextExtractor.extract(t))}},{key:"extractStyle",value:function(e){var t=e.element,n=e.setStyle;return this.styleExtractor.extract({element:t,setStyle:n})}},{key:"extractInnerFeatures",value:function(e){var t=e.element;(0,e.setInnerFeatures)(this.innerFeaturesExtractor.extract(t))}}]),e}(),V=n(136),B=n(7277),H=n(8664),W=n(7762),U=n(7750),q=function(){function e(t,n){var r=this;(0,a.Z)(this,e),this.POSITIONING_SATISFACTORY_SCORE=1,this.processStartTime=void 0,this.targetElementESRAMetadata=void 0,this.targetElementStaticData={},this.esraMetadataExtractor=void 0,this.elementsFiltering=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.qualifiedInnerFeatures=void 0,this.qualifiedInnerText=void 0,this.candidateQueries=[],this.candidates=[],this.uniqueCandidates=[],this.queryCandidates=[],this.interactableCandidates=[],this.rankedCandidates=[],this.filteredAndSortedRankedCandidates=[],this.finalCandidates=[],this.removedCandidates=void 0,this.similarity=void 0,this.weightsSum=0,this.config={innerText:{dropIfMoreThanNCandidates:5},innerFeatures:{mandatoryPercentage:.6,mandatoryMax:6},results:{scorePercentile:.75,epsilon:.01}},this.getSelectionResultForCandidate=function(e){var t=O.J.getInstance("getElementSelectionResult",{log:!1}),n=t.get();if(n||(n=new Map,t.set(n)),n.has(e))return n.get(e);r.checkTimeout();var i=r.extractMetadata(e),o=r.similarity.rank(i),a={score:o.score,candidate:e,scores:o.scores,esraMetadata:i};return n.set(e,a),t.set(n),a},this.targetElementESRAMetadata=t,this.targetElementStaticData=n||t.staticMetadata,this.similarity=new U.k(this.targetElementESRAMetadata),this.esraMetadataExtractor=new j(document)}return(0,s.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"getWeight",value:function(e){return e/this.weightsSum}},{key:"extractMetadata",value:function(e){return new u(this.esraMetadataExtractor.extract(e).toMetadata())}},{key:"getLastSelectionLogs",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;if(null===(e=this.candidates)||void 0===e||!e.length)return{};var n=new XMLSerializer,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return e.slice(0,t).map((function(e){return{score:e.score,metadata:e.metadata,element:n.serializeToString(e.candidate).substring(0,200)}}))},i=this.rankedCandidates[Math.min(this.rankedCandidates.length-1,t)].score,o=function(e){return r(e,t).filter((function(e){return e.score>=i}))};return{candidatesQuery:this.candidateQueries.filter((function(e){return!!e.length})).join(","),totalUniqueCandidates:this.uniqueCandidates.length,topRankingCandidates:r(this.rankedCandidates,t),topRemovedCandidates:{hidden:o(this.removedCandidates.hidden),staticData:o(this.removedCandidates.static)}}}},{key:"selectByPositioning",value:function(){var e=this.targetElementESRAMetadata.positioning;if(window.innerWidth===e.viewport.size.width&&window.innerHeight===e.viewport.size.height){var t=document.elementFromPoint(e.viewport.element.left*window.innerWidth,e.viewport.element.top*window.innerHeight),n=this.extractMetadata(t),r=this.similarity.rank(n).score;return r>=this.POSITIONING_SATISFACTORY_SCORE?{candidate:t,score:r,esraMetadata:n}:void 0}}},{key:"collectCandidates",value:function(){this.setQualifiedAttributesQueries(),this.setQualifiedClassesQueries(),this.setInnerFeaturesQueries(),this.candidates=[];var e=this.candidateQueries.filter((function(e){return!!e.length})).join(",");this.queryCandidates=[],e.length&&(this.queryCandidates=(0,v.RA)(e)),this.interactableCandidates=[],this.elementsFiltering!==d.Qy.Query&&(this.interactableCandidates=(0,v.w1)())}},{key:"select",value:function(){var t,n,r=this;console.log("selecting elements, filtering: ",d.Qy[this.elementsFiltering]);for(var i,o=function(e){switch(e){case d.Qy.Query:return r.queryCandidates;case d.Qy.Intersection:return r.intersectElements(r.queryCandidates,r.interactableCandidates);case d.Qy.Interactables:return r.interactableCandidates;case d.Qy.All:return r.queryCandidates.concat(r.interactableCandidates)}};this.candidates=o(this.elementsFiltering),!this.candidates.length&&this.elementsFiltering!==d.Qy.All;)console.log("no candidates found, expanding selection to ".concat(d.Qy[this.elementsFiltering+1])),this.elementsFiltering++;(console.log("# of query/interactable/total candidates:",this.queryCandidates.length,this.interactableCandidates.length,this.candidates.length),(t=this.candidates).push.apply(t,(0,x.Z)(this.getInnerTextCandidates())),this.candidates.length)||(i=this.candidates).push.apply(i,(0,x.Z)(this.getTagCandidates()));this.uniqueCandidates=this.candidates.filter((function(e,t,n){return n.indexOf(e)===t}));var a=e.limitChildren;null!==(n=a)&&void 0!==n&&n.length&&(a=a.map((function(e){return(0,l.Z)((0,l.Z)({},e),{},{parent:document.querySelector(e.selector)})})),this.uniqueCandidates=this.uniqueCandidates.filter((function(e){var t,n=(0,W.Z)(a);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.parent&&r.isDescendant(i.parent,e)&&i.limit--<=0)return!1}}catch(o){n.e(o)}finally{n.f()}return!0}))),this.checkTimeout(),this.rankedCandidates=this.uniqueCandidates.filter((function(e){return e instanceof(0,v.GU)(e).HTMLElement||e instanceof(0,v.GU)(e).SVGElement})).map(this.getSelectionResultForCandidate).sort((function(e,t){return t.score-e.score})),this.removedCandidates={hidden:[],static:[]},this.filteredAndSortedRankedCandidates=this.rankedCandidates.filter((function(e){var t=r.isHidden(e.candidate),n=t.isHidden,i=t.clickOffset;return!0===n?(r.removedCandidates.hidden.push(e),!1):(i&&(e.clickOffset=i),!(w(r.targetElementStaticData)&&!function(e,t){var n=b(e),r=b(t),i=function(e){return!e||0===Object.keys(e).length};if(i(n)&&i(r))return!0;if(i(n)||i(r))return!1;var o=Object.keys(n).sort(),a=Object.keys(r).sort();if(o.length!==a.length)return!1;if(!o.every((function(e,t){return e===a[t]})))return!1;for(var s in n)if(n[s]!==r[s])return!1;return!0}(r.formatStaticCandidates(e.esraMetadata.staticCandidates),r.targetElementStaticData))||(e.metadata=JSON.stringify(e.esraMetadata.staticCandidates),r.removedCandidates.static.push(e),!1))})),this.checkTimeout(),this.removedCandidates.hidden.slice().reverse().forEach((function(e,t,n){"INPUT"===e.candidate.tagName&&r.filteredAndSortedRankedCandidates.find((function(t){return t.score>.1&&t.candidate.contains(e.candidate)}))&&(r.removedCandidates.hidden.splice(n.length-1-t,1),r.filteredAndSortedRankedCandidates.push(e))})),this.filteredAndSortedRankedCandidates=this.filteredAndSortedRankedCandidates.sort((function(e,t){return t.score-e.score}));var s=this.filteredAndSortedRankedCandidates.length*(1-this.config.results.scorePercentile);this.finalCandidates=[];for(var u=null,c=0;c<this.filteredAndSortedRankedCandidates.length;++c){var f=this.filteredAndSortedRankedCandidates[c];if(c>=s&&(!u||u.score-f.score>this.config.results.epsilon))break;u=f,this.finalCandidates.push(f)}return this.finalCandidates}},{key:"intersectElements",value:function(e,t){var n=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).useElementSize,n=void 0!==t&&t,r=new Set;return e.forEach((function(e){for(var t=2,i=e;i&&t-- >0&&(r.add(i),!(n&&Math.abs(i.parentElement.clientWidth-i.clientWidth)>.3*i.clientWidth&&Math.abs(i.parentElement.clientHeight-i.clientHeight)>.3*i.clientHeight));)i=i.parentElement})),r},r=n(e),i=n(t),o=new Set;return r.forEach((function(e){i.has(e)&&o.add(e)})),Array.from(o)}},{key:"checkTimeout",value:function(){if(e.timeout&&Date.now()-this.processStartTime>e.timeout)throw new $}},{key:"selectOne",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.elementsFiltering,n=void 0===t?d.Qy.Intersection:t,r=e.minSelectionScore,i=void 0===r?.3:r;try{if(this.elementsFiltering=n,this.processStartTime=Date.now(),"html"===this.targetElementESRAMetadata.tag){var o=document.querySelector("html");return{candidate:o,score:1,esraMetadata:this.extractMetadata(o)}}var a=this.selectByPositioning();if(a)return console.log("Found element by positioning"),a;for(this.collectCandidates();;){var s=this.select();if(!s.length)break;var u=s[0].score;if(!(u<i&&this.elementsFiltering!==d.Qy.All))return s[0];this.elementsFiltering++,console.log("Best matching element is below threshold (".concat(u,"/").concat(i,"), expanding selection to ").concat(d.Qy[this.elementsFiltering]))}}catch(xt){xt instanceof $?console.error("ESRA selection timeout"):console.error("ESRA selection error",xt)}return{candidate:void 0,score:0,esraMetadata:void 0}}},{key:"getFinalCandidates",value:function(){return this.finalCandidates}},{key:"setQualifiedAttributesQueries",value:function(){var e=this;this.candidateQueries.push(this.similarity.getQualifiedAttributes().map((function(t){return"[".concat(t,'="').concat(e.targetElementESRAMetadata.attributes[t].value,'"]')})).join(","))}},{key:"setQualifiedClassesQueries",value:function(){this.candidateQueries.push(this.similarity.getQualifiedClasses().map((function(e){return".".concat(e)})).join(","))}},{key:"setInnerFeaturesQueries",value:function(){var e=this,t=this.targetElementESRAMetadata.innerFeatures.filter((function(e){return!e.isRoot}));t.length>10&&(t=Object.values(t.reduce((function(e,t){var n="".concat(t.type,"_").concat(t.tag);return e[n]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},n,t))}),{})));var n,r=Math.min(Math.ceil(t.length*this.config.innerFeatures.mandatoryPercentage),this.config.innerFeatures.mandatoryMax),i=(n=t,n.reduce((function(e,t){var n=e.map((function(e){return[].concat((0,x.Z)(e),[t])})).filter((function(e){return e.length<=r}));return e.concat(n)}),[[]])).filter((function(e){return e.length===r}));i.forEach((function(t){var n=[];t.forEach((function(t){return n.push(e.getFeatureSelector(t))})),e.cartesian(n).forEach((function(t){return e.candidateQueries.push("*"+t.map((function(e){return":has(".concat(e,")")})).join(""))}))}))}},{key:"cartesian",value:function(e){if(!e.length)return[];var t=[],n=e.length-1;return function r(i,o){for(var a=0,s=e[o].length;a<s;a++){var u=i.slice(0);u.push(e[o][a]),o===n?t.push(u):r(u,o+1)}}([],0),t}},{key:"getFeatureSelector",value:function(e){var t=[e.tag];switch(e.type){case d.EI.Media:e.src&&t.push("".concat(e.tag,'[src="').concat(e.src,'"]'));break;case d.EI.Anchor:t.push("".concat(e.tag,'[href="').concat(e.href,'"]'));break;case d.EI.Button:break;case d.EI.Input:t.push("".concat(e.tag,'[type="').concat(e.inputType,'"]')),e.placeholder&&t.push("".concat(e.tag,'[placeholder="').concat(e.placeholder,'"]'))}return t}},{key:"getInnerTextCandidates",value:function(){var e=this.similarity.getQualifiedInnerText();if(!e)return[];var t=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).tag,n=void 0===t?"*":t;return(0,v.RA)(n).filter((function(t){var n;return(null===(n=t.innerText)||void 0===n?void 0:n.trim())===e.trim()}))}(e.content);return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}},{key:"getTagCandidates",value:function(){return(0,v.RA)(this.targetElementESRAMetadata.tag)}},{key:"isDescendant",value:function(e,t){return e.contains(t)}},{key:"formatStaticCandidates",value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}},{key:"isHidden",value:function(e){return(0,v.GF)(e,{useCache:!0})}}]),e}();q.limitChildren=void 0,q.timeout=void 0;var z,G,$=function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,"ESRA selection timeout")}return(0,s.Z)(n)}((0,H.Z)(Error)),Y=n(1752),Q=n(1120),X=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"injectSelectorsAndLocators",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var i,o,a,s,u,c=this,d=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=(i=d.length>1&&void 0!==d[1]?d[1]:{}).testIdSelector,a=i.searchParentFrames,s=void 0===a||a,u=n.map((function(e){return{container:e,removedAttributes:c.stripNodeAttributes(e.element)}})),e.next=4,Promise.all(u.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,a,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.getSelectorAndLocator(n.container.element,{testIdSelector:o,searchParentFrames:s,stripAttributes:!0});case 2:return r=e.sent,i=r.selector,a=r.locator,u=r.parentFramesSelectors,e.abrupt("return",(0,l.Z)((0,l.Z)({},n),{},{selector:i,locator:a,parentFramesSelectors:u}));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 4:return u=e.sent,e.next=7,Promise.all(u.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.removedAttributes.id||n.removedAttributes.originalClasses){e.next=2;break}return e.abrupt("return",n);case 2:if(c.restoreNodeAttributes(n.container.element,n.removedAttributes),void 0===window.playwright.$(n.selector)){e.next=5;break}return e.abrupt("return",n);case 5:return e.next=7,c.getSelectorAndLocator(n.container.element,{testIdSelector:o,searchParentFrames:s,stripAttributes:!1});case 7:return r=e.sent,console.log("Selector ".concat(n.selector," is not valid, generated new one: ").concat(r.selector)),Object.assign(n,r),e.abrupt("return",n);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 7:return u=e.sent,e.abrupt("return",u.map((function(e){var t=e.container,n=e.selector,r=e.locator,i=e.parentFramesSelectors;return(0,l.Z)((0,l.Z)({},t),{},{selector:n,locator:r,parentFramesSelectors:i})})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"stripNodeAttributes",value:function(e){var t,n,r=e;r.id&&(t=r.id,r.removeAttribute("id"));try{if((n=r.getAttribute("class"))&&"string"===typeof n){var i=n.split(" ").filter((function(e){return!e.startsWith("css-")&&!e.startsWith("jss-")})).join(" ");r.setAttribute("class",i)}else n=void 0}catch(xt){return console.warn("[playwright selector generator] error with class filtering",xt),{}}return{id:t,originalClasses:n}}},{key:"restoreNodeAttributes",value:function(e,t){var n=e,r=t.id,i=t.originalClasses;r&&n.setAttribute("id",r),i&&n.setAttribute("class",i)}},{key:"getSelectorAndLocator",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,y,g,b,w,k,S,E=this,x=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=x.length>1&&void 0!==x[1]?x[1]:{}).testIdSelector,o=r.searchParentFrames,a=void 0===o||o,s=r.stripAttributes,u=void 0===s||s,c=r.ignoredIframesSelectors,l=void 0===c?[]:c,n){e.next=3;break}return e.abrupt("return",null);case 3:if(d=this.getIframes({ignoredIframesSelectors:l}),!a){e.next=10;break}return e.next=7,this.getParentFramesSelectors(n,d);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=[];case 11:if(f=e.t0,h=n,!(p=this.getTestAttributeSelector(h,i))){e.next=16;break}return e.abrupt("return",{selector:p,locator:'locator("'.concat(p,'")'),parentFramesSelectors:f});case 16:return u&&(y=this.stripNodeAttributes(n),v=y.id,m=y.originalClasses),g="",b="",e.prev=18,e.next=21,window.playwright.generateSelectorAndLocator(n);case 21:w=e.sent,g=w.selector,b=w.locator,e.next=42;break;case 26:if(e.prev=26,e.t1=e.catch(18),(k=n.ownerDocument.defaultView)===window){e.next=42;break}return k.playwright||(k.playwright=window.playwright),e.prev=31,e.next=34,k.playwright.generateSelectorAndLocator(n);case 34:S=e.sent,g=S.selector,b=S.locator,e.next=42;break;case 39:e.prev=39,e.t2=e.catch(31),console.log("get selector and locator error",n.nodeType,n,"\n",e.t1,"\n",e.t2);case 42:return e.prev=42,u&&this.restoreNodeAttributes(n,{id:v,originalClasses:m}),e.finish(42);case 45:return b&&f&&f.length>0&&(b=f.map((function(e){return"frameLocator('".concat(E.escapeSingleQuotes(E.escapeBackslash(e)),"')")})).join(".")+".".concat(b)),e.abrupt("return",{selector:g,locator:b,parentFramesSelectors:f});case 47:case"end":return e.stop()}}),e,this,[[18,26,42,45],[31,39]])})));return function(t){return e.apply(this,arguments)}}()},{key:"findIframeWindowByParentFrameSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>0&&void 0!==u[0]?u[0]:[],r=window.top,!(n&&n.length>0)){e.next=22;break}i=(0,W.Z)(n),e.prev=4,i.s();case 6:if((o=i.n()).done){e.next=14;break}return a=o.value,e.next=10,r.playwright.$(a);case 10:s=e.sent,r=s.contentWindow;case 12:e.next=6;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),i.e(e.t0);case 19:return e.prev=19,i.f(),e.finish(19);case 22:return e.abrupt("return",r);case 23:case"end":return e.stop()}}),e,null,[[4,16,19,22]])})));return function(){return e.apply(this,arguments)}}()},{key:"selector",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.findIframeWindowByParentFrameSelectors(r);case 3:return a=e.sent,e.next=6,a.playwright.$(n);case 6:o=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log("selector error",n,e.t0);case 12:return e.abrupt("return",null!==(i=o)&&void 0!==i?i:this.selectFromFirstIframe(n));case 13:case"end":return e.stop()}}),e,this,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}())},{key:"getParentFramesSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.length){e.next=2;break}return e.abrupt("return",[]);case 2:if((i=n.ownerDocument)!==document){e.next=5;break}return e.abrupt("return",[]);case 5:if(o=r.find((function(e){return e.contentDocument===i}))){e.next=8;break}return e.abrupt("return",[]);case 8:return e.next=10,this.getSelectorAndLocator(o,{searchParentFrames:!1});case 10:return a=e.sent,e.t0=[],e.t1=x.Z,e.next=15,this.getParentFramesSelectors(o,r);case 15:return e.t2=e.sent,e.t3=(0,e.t1)(e.t2),e.t4=[a.selector],e.abrupt("return",e.t0.concat.call(e.t0,e.t3,e.t4));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getIframes",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignoredIframesSelectors,t=void 0===e?[]:e,n=function(e){return e.filter((function(e){return!t.some((function(t){return e.matches(t)}))}))},r=O.J.getInstance("playwrightElementSelectorGeneratorIframes",{log:!1});if(r.hasCache())return n(r.get());var i=(0,v.RA)("iframe");return r.set(i),n(i)}},{key:"getFirstIframeContentWindow",value:function(){var e=document.querySelector("iframe");if(e){var t=e.contentWindow;return t.playwright||(t.playwright=window.playwright),t}}},{key:"selectFromFirstIframe",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.getFirstIframeContentWindow()){e.next=3;break}return e.abrupt("return",void 0);case 3:return e.prev=3,e.next=6,r.playwright.$(n);case 6:return e.abrupt("return",e.sent);case 9:e.prev=9,e.t0=e.catch(3),console.log("selector error",n);case 12:case"end":return e.stop()}}),e,this,[[3,9]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getTestAttributeSelector",value:function(e,t){for(var n=0,r=[t].concat(["data-cy","data-testid","data-test-id","data-test"]);n<r.length;n++){var i=r[n];if(i&&e.getAttribute(i)){var o="[".concat(i,"='").concat(e.getAttribute(i),"']");if(1===(0,v.RA)(o).length)return o;if((0,v.RA)(o).length>1){var a=Array.from((0,v.RA)(o)).indexOf(e);return"".concat(o," >> nth=").concat(a)}}}}},{key:"escapeSingleQuotes",value:function(e){return(0,v.ko)(e,"'","\\'")}},{key:"escapeBackslash",value:function(e){return e.replace(/\\/g,"\\\\")}}]),e}(),K=[{selector:'path[d="M17.5 13V15.6667C17.5 16.0203 17.3361 16.3594 17.0444 16.6095C16.7527 16.8595 16.357 17 15.9444 17H5.05556C4.643 17 4.24733 16.8595 3.95561 16.6095C3.66389 16.3594 3.5 16.0203 3.5 15.6667V13"] + path[d="M14.6673 6.92057L10.5007 2.75391L6.33398 6.92057"] + path[d="M10.5 2.75391V12.7539"]',description:"export button"},{selector:'path[d="M16.0893 13.1868C16.6838 12.7754 17.1321 12.1858 17.3697 11.503C17.6072 10.8202 17.6216 10.0796 17.4107 9.38816C17.1999 8.69667 16.7748 8.09007 16.1968 7.65594C15.6187 7.2218 14.9177 6.9826 14.1948 6.97285H12.8308C12.6017 6.20011 12.1996 5.48973 11.6549 4.89565C11.1102 4.30157 10.4374 3.83943 9.68735 3.54431C8.93734 3.24918 8.12995 3.12885 7.32648 3.19244C6.52301 3.25603 5.7446 3.50187 5.05036 3.9113C4.35612 4.32072 3.7643 4.88297 3.31985 5.55533C2.8754 6.22769 2.59001 6.99248 2.48535 7.79164C2.38068 8.59079 2.4595 9.40329 2.71582 10.1674C2.97214 10.9316 3.39921 11.6272 3.96461 12.2016"] + path[d="M10.0273 10.0039V16.8241"] + path[d="M13.0585 13.0351L10.0273 10.0039L6.99609 13.0351"]',description:"import button"},{selector:'path[d="M20.4696 21.5303C20.7625 21.8232 21.2373 21.8232 21.5302 21.5303C21.8231 21.2374 21.8231 20.7626 21.5302 20.4697L20.4696 21.5303ZM17.1802 16.1197C16.8873 15.8268 16.4125 15.8268 16.1196 16.1197C15.8267 16.4126 15.8267 16.8874 16.1196 17.1803L17.1802 16.1197ZM18.25 11C18.25 15.0041 15.0041 18.25 11 18.25V19.75C15.8325 19.75 19.75 15.8325 19.75 11H18.25ZM11 18.25C6.99594 18.25 3.75 15.0041 3.75 11H2.25C2.25 15.8325 6.16751 19.75 11 19.75V18.25ZM3.75 11C3.75 6.99594 6.99594 3.75 11 3.75V2.25C6.16751 2.25 2.25 6.16751 2.25 11H3.75ZM11 3.75C15.0041 3.75 18.25 6.99594 18.25 11H19.75C19.75 6.16751 15.8325 2.25 11 2.25V3.75ZM21.5302 20.4697L17.1802 16.1197L16.1196 17.1803L20.4696 21.5303L21.5302 20.4697Z"]',description:"search"},{selector:'path[d="M3.75 10H16.875"] + path[d="M8.125 5L3.125 10L8.125 15"]',description:"back"},{selector:'path[d="M3.33301 8H12.6663"] + path[d="M8 3.33331L12.6667 7.99998L8 12.6666"]',description:"forward"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"new or Add button"},{selector:'path[d="M10 10.75C10.4142 10.75 10.75 10.4142 10.75 10C10.75 9.58579 10.4142 9.25 10 9.25C9.58579 9.25 9.25 9.58579 9.25 10C9.25 10.4142 9.58579 10.75 10 10.75Z"] + path[d="M15.833 10.75C16.2472 10.75 16.583 10.4142 16.583 10C16.583 9.58579 16.2472 9.25 15.833 9.25C15.4188 9.25 15.083 9.58579 15.083 10C15.083 10.4142 15.4188 10.75 15.833 10.75Z"] + path[d="M4.16699 10.75C4.58121 10.75 4.91699 10.4142 4.91699 10C4.91699 9.58579 4.58121 9.25 4.16699 9.25C3.75278 9.25 3.41699 9.58579 3.41699 10C3.41699 10.4142 3.75278 10.75 4.16699 10.75Z"]',description:"open menu"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"add filter"},{selector:'path[d="M15 5L5 15"] + path[d="M5 5L15 15"]',description:"close or remove"},{selector:'path[d="M4 6L8 10L12 6"]',description:"open or close dropdown"},{selector:'path[d="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"] + path[d="M12.5 7.5L7.5 12.5"] + path[d="M7.5 7.5L12.5 12.5"]',description:"clear input"},{selector:'path[d="M3.33301 5.49054H4.81449H16.6663"] + path[d="M7.14286 5.49999V3.99999C7.14286 3.60216 7.29337 3.22063 7.56128 2.93932C7.82919 2.65802 8.19255 2.49998 8.57143 2.49998H11.4286C11.8075 2.49998 12.1708 2.65802 12.4387 2.93932C12.7066 3.22063 12.8571 3.60216 12.8571 3.99999V5.49999M15 5.49999V16C15 16.3978 14.8495 16.7793 14.5816 17.0607C14.3137 17.342 13.9503 17.5 13.5714 17.5H6.42857C6.04969 17.5 5.68633 17.342 5.41842 17.0607C5.15051 16.7793 5 16.3978 5 16V5.49999H15Z"] + path[d="M8.33203 9.23726V13.4039"] + path[d="M11.666 9.23726V13.4039"]',description:"delete"},{selector:'path[d="M13.3334 4L6.00008 11.3333L2.66675 8"]',description:"checked"},{selector:'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"]',description:"downward-pointing arrow"},{selector:'path[d="M18.0893 3.08926C18.4147 2.76382 18.4147 2.23618 18.0893 1.91074C17.7638 1.58531 17.2362 1.58531 16.9107 1.91074L18.0893 3.08926ZM9.41074 9.41074L8.82149 10L10 11.1785L10.5893 10.5893L9.41074 9.41074ZM16.9107 1.91074L9.41074 9.41074L10.5893 10.5893L18.0893 3.08926L16.9107 1.91074Z"] + path[d="M17.5 2.5L12.25 17.5L9.25 10.75L2.5 7.75L17.5 2.5Z"]',description:"send"}],J=function(){function e(){(0,a.Z)(this,e),this.observer=void 0,this.monitoringPeriodTimeout=void 0,this.flashingTextElements=[]}return(0,s.Z)(e,[{key:"start",value:function(){var e=this;this.stop(),this.flashingTextElements=[],this.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.length>0&&t.addedNodes.forEach((function(t){t instanceof HTMLElement&&e.includeElement(t)&&setTimeout((function(){e.flashingTextElements.push(e.processTextElements(t))}),1e3)}))}))})),this.observer.observe(document.body,{childList:!0,subtree:!0}),this.monitoringPeriodTimeout=setTimeout((function(){e.stop()}),3e5)}},{key:"stop",value:function(){this.monitoringPeriodTimeout&&(clearTimeout(this.monitoringPeriodTimeout),this.monitoringPeriodTimeout=null),this.observer&&(this.observer.disconnect(),this.observer=null)}},{key:"get",value:function(){var e=this.flashingTextElements.map((function(e){return e.filter((function(e){return!e.isConnected||(0,v.GF)(e.parentElement).isHidden}))})).filter((function(e){return e.length})).map((function(e){return"<span>".concat(e.map((function(e){return e.textContent})).join("</span><span>"),"</span>")})),t=new Set(e);return Array.from(t)}},{key:"stopAndGet",value:function(){return this.stop(),this.get()}},{key:"includeElement",value:function(e){return!(e.getElementsByTagName("*").length>50)&&!(e.outerHTML.length>5e3)}},{key:"processTextElements",value:function(e){for(var t,n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),r=[];t=n.nextNode();)(0,v.GF)(t.parentNode).isHidden||r.push(t);return r}}]),e}(),ee=function(){function e(t){(0,a.Z)(this,e),this.counter=void 0,this.counter=null!==t&&void 0!==t?t:"0"}return(0,s.Z)(e,[{key:"increment",value:function(){for(var e=this.counter.length-1;e>=0;){var t=this.counter[e];if("9"===t)return void(this.counter=this.replaceAt(this.counter,e,"a"));if("z"!==t)return void(this.counter=this.replaceAt(this.counter,e,String.fromCharCode(t.charCodeAt(0)+1)));if(this.counter=this.replaceAt(this.counter,e,"0"),0===e)return void(this.counter="1"+this.counter);e--}}},{key:"get",value:function(){return this.counter}},{key:"incrementAndGet",value:function(){return this.increment(),this.get()}},{key:"getAndIncrement",value:function(){var e=this.get();return this.increment(),e}},{key:"replaceAt",value:function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)}}]),e}(),te="checksum-ignore",ne="checksum-get-more-items",re=.7,ie=0,oe=function(e,t){var n=t.forceIncludeAttribute,r=t.forceIncludeFileInput,i=t.forceIncludeElements,o=t.limit;e.excludedElements=new Set;var a=e.element,s=null!==o&&void 0!==o?o:Math.min(Math.ceil(.5*a.children.length),a.children.length-20),u=function(t){var n=0,r=ae(t);r.length>=e.attributes.length&&n++;var i=r.filter((function(t){return e.attributes.includes(t)})).length;i===e.attributes.length?n+=3:i>0&&n++;var o=se(t).filter((function(t){return e.classes.includes(t)})).length;return o===e.classes.length?n+=2:o>0&&n++,n},c=Array.from(a.children).filter((function(t){return t.tagName===e.tagName&&!function(e){return!(!n||!(e.hasAttribute(n)||Array.from(e.querySelectorAll("[".concat(n,"]"))).length>0))||!(!r||"input"!==e.tagName.toLowerCase()||"file"!==e.type)||i.includes(e)}(t)})).map((function(e){return{element:e,score:u(e)}})).sort((function(e,t){return t.score-e.score})),l=c.reduce((function(e,t){var n=t.element;return(0,v.PZ)((0,v.m7)(n,"Element")?n:null===n||void 0===n?void 0:n.parentElement)?e.inViewportElements.push(n):e.outOfViewportElements.push(n),e}),{inViewportElements:[],outOfViewportElements:[]}),d=l.inViewportElements,f=function(t){var n,r=(0,W.Z)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(e.excludedElements.add(i),e.excludedElements.size===s)return!0}}catch(o){r.e(o)}finally{r.f()}};return f(l.outOfViewportElements)||f(d),function(e){var t=e.excludedElements,n=e.element;t.forEach((function(e){e.setAttribute(te,"")})),n._getmoreitemsid||(n._getmoreitemsid="gm"+ie++);e.id=n._getmoreitemsid,n.setAttribute(ne,e.id)}(e),Array.from(e.excludedElements)};function ae(e){return Array.from(e.attributes).filter((function(e){return!e.name.startsWith("checksum")})).map((function(e){return e.name.replace(/[0-9]/g,"")}))}function se(e){var t,n;return null!==(t=null===(n=e.className)||void 0===n?void 0:n.split(" ").filter((function(e){return e})))&&void 0!==t?t:[]}function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).nodeRepetitionsThreshold,n=void 0===t?20:t;try{return console.time("bettertemplatize"),z=new Set,ce(e,n),console.timeEnd("bettertemplatize"),console.log("[bettertemplatize] templates found:",Array.from(z)),Array.from(z)}catch(r){return console.error("[bettertemplatize] failed during template processing:",r.message),[]}}function ce(e,t){Array.from(e.children).forEach((function(e){if(!(e instanceof SVGElement)){var n=e.children.length;if(n>=t)for(var r=0,i=Array.from(e.children),o=Math.ceil(n*re),a=0;a<n;a++)for(var s=a+1;s<n;s++)try{if(pe(i[a],i[s])&&++r>=o)return void z.add((0,l.Z)({element:e},G))}catch(u){return}ce(e,t)}}))}var le=.8,de=.5,fe=.8,he=5;function pe(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=function(t){return t&&(G={attributes:n,classes:r,tagName:e.nodeName}),t};if(e.nodeType!==t.nodeType)return o(!1);if(e instanceof SVGElement||t instanceof SVGElement)return o(!1);if(e.nodeType===Node.TEXT_NODE)return o(!0);if(e.nodeType!==Node.ELEMENT_NODE)return o(!1);var a=e,s=t;if(a.tagName.toLowerCase()!==s.tagName.toLowerCase())return o(!1);var u=ae(a),c=ae(s);if((n=u.filter((function(e){return c.includes(e)}))).length/Math.max(u.length,c.length)<le)return o(!1);var l=se(a),d=se(s);if((r=l.filter((function(e){return d.includes(e)}))).length/Math.max(l.length,d.length)<de)return o(!1);if(i>=he)return o(!0);if(a.shadowRoot&&!s.shadowRoot||!a.shadowRoot&&s.shadowRoot)return o(!1);var f=Array.from(a.shadowRoot?a.shadowRoot.children:a.children),h=Array.from(s.shadowRoot?s.shadowRoot.children:s.children);if(0===f.length&&0===h.length)return o(!0);for(var p=0,v=0;v<Math.min(f.length,h.length);v++)pe(f[v],h[v],i+1)&&p++;return p/Math.max(f.length,h.length)<fe?o(!1):o(!0)}var ve,me=function(e){return e.ARIA_LABEL="aria-label",e.TEXT="text",e}({}),ye=function(e){return e.SVG="svg",e}(ye||{}),ge={markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0},be=function(){function e(){(0,a.Z)(this,e),this.interactableElements=void 0,this.nonInteractableElementsFromSimplifiedDom=void 0,this.interactableElementsFromSimplifiedDom=void 0,this.elementsInSimplifiedDomByChecksumId=void 0,this.selectors=void 0,this.flashingElementsDetector=new J,this.forceIncludeElements=[],this.preMapReducedHTMLSelectors=!0,this.sessionRecorder=void 0,this.templateNodes=void 0,this.nodeRepetitionsThreshold=void 0,this.reducePercentage=50,this.lastReduceHTMLOptions=void 0,this.defaultReduceHTMLOptions={checkElementInstanceType:!0,extraAllowedAttributes:[],maintainSelectorsMapping:!0,initialChecksumId:"0",forceIncludeFileInput:!1,forceIncludeAttribute:void 0,invalidateCache:!1,svgIntegration:me.ARIA_LABEL,includeFlashingElements:!0,onForceIncludeElement:function(){},limitNodeRepetitions:50,stopFlashingElementsDetection:!1,assignChecksumIdsToAllElements:!0,assignRrwebIdsToAllElements:!0},this.checksumIdCounter=new ee}return(0,s.Z)(e,[{key:"preprocessDocument",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;(0,v.Ey)("[preprocessDocument] querySelectorAllExtended");var t=(0,v.RA)("*",e,{includeHTML:!0});(0,v.MX)("[preprocessDocument] querySelectorAllExtended"),(0,v.Ey)("[preprocessDocument] isElementHidden");var n,r=(0,W.Z)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!this.shouldIgnoreElement(i)){var o=(0,v.GF)(i,ge);i.setAttribute("checksum-data-visible",o.isHidden||o.isTransparent?"false":"true"),!o.isHidden&&o.isTransparent&&i.setAttribute("checksum-data-transparently-visible","true"),o.isBehindTransparentElement&&i.setAttribute("checksum-data-visible-under-transparent-element","true"),o.clickOffset&&i.setAttribute("checksum-data-click-offset","".concat(o.clickOffset.x,";").concat(o.clickOffset.y))}}}catch(a){r.e(a)}finally{r.f()}(0,v.MX)("[preprocessDocument] isElementHidden")}},{key:"setSessionRecorder",value:function(e){this.sessionRecorder=e}},{key:"markInteractableElements",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.forceIncludeAttribute,o=r.forceIncludeFileInput;(0,v.Ey)("[markInteractableElements]"),this.interactableElements=[];var a=(0,v.w1)(n,e,{allowDisabled:!0,excludeCrossOriginIframes:!1}),s=function(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;if(!t.shouldIgnoreElement(e)){var o,a,s=null===(n=e.getAttribute("checksum-data-click-offset"))||void 0===n?void 0:n.split(";"),u=s&&{x:parseInt(s[0]),y:parseInt(s[1])},c=(a=i,(o=e)._checksumid||(o._checksumid=null!==a&&void 0!==a?a:t.checksumIdCounter.getAndIncrement()),o.setAttribute("checksumid",o._checksumid),o.setAttribute("checksuminteractable","true"),o._checksumid);t.interactableElements.push({checksumId:c,element:e,forced:r,clickOffset:u})}};a.forEach((function(e){return s(e)}));var u=function(e){(0,v.RA)(e,n,{includeHTML:!0}).forEach((function(e){return s(e,!0)}))};i&&u("[".concat(i,"]")),o&&u("input[type='file']"),this.forceIncludeElements.filter((function(e){var t=e.element;return null===t||void 0===t?void 0:t.isConnected})).forEach((function(e){var t=e.element,n=e.checksumid;return s(t,!0,n)})),console.log("Marked ".concat(this.interactableElements.length," interactable elements")),(0,v.MX)("[markInteractableElements]")}},{key:"truthyFilter",value:function(e){return Boolean(e)}},{key:"shouldIgnoreElement",value:function(e){return e.hasAttribute(te)}},{key:"generateSimplifiedDom",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.extraAllowedAttributes,s=void 0===a?[]:a,u=o.checkElementInstanceType,c=void 0===u||u,l=o.forceIncludeAttribute,d=void 0===l?void 0:l,f=o.forceIncludeFileInput,h=void 0!==f&&f,p=o.svgIntegration,m=void 0===p?me.ARIA_LABEL:p,y=o.onForceIncludeElement,g=void 0===y?void 0:y,b=o.contentWindow,w=void 0===b?window:b,k=o.assignChecksumIdsToAllElements,S=void 0===k||k,E=o.assignRrwebIdsToAllElements,x=void 0===E||E;if(!e)return null;var I,C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e._originalNode=t,!(0,v.m7)(e,"Element")||!(0,v.m7)(t,"Element"))return e;var n,r,o,a=e,s=t;(S&&!s.hasAttribute("checksumid")&&(s._checksumid||(s._checksumid=i.checksumIdCounter.getAndIncrement()),a.setAttribute("checksumid",s._checksumid),i.nonInteractableElementsFromSimplifiedDom.push({checksumId:s._checksumid,element:s})),x&&!s.getAttribute("rrwebid")&&i.sessionRecorder)&&(s._rrwebid=null!==(n=null===(r=i.sessionRecorder.getMeta(s))||void 0===r||null===(o=r.id)||void 0===o?void 0:o.toString())&&void 0!==n?n:"",a.setAttribute("rrwebid",s._rrwebid));return e},M=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return C(document.createTextNode(t),n)},T=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return C(document.createElement(t),n)};if(e.nodeType===Node.ELEMENT_NODE){var _=e;if("head"===_.tagName.toLowerCase())return null;if(this.shouldIgnoreElement(_))return null}if(e.nodeType===Node.TEXT_NODE)return e.parentElement&&("false"!==e.parentElement.getAttribute("checksum-data-visible")||e.parentElement.hasAttribute("checksumid"))?"body"===e.parentElement.tagName.toLowerCase()?null:null!==(I=e.textContent)&&void 0!==I&&I.trim()?M(e.textContent+" "):null:null;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(c&&!(0,v.m7)(e,"HTMLElement")&&!(0,v.m7)(e,"SVGElement"))return null;var A=e,N="iframe"===A.tagName.toLowerCase()&&A.contentDocument,R=(0,v.mn)(N?A.contentDocument.documentElement:A,{flattenShadowRootChildren:!0});null===(n=t.esraSelectionRules)||void 0===n||null===(r=n.limitChildren)||void 0===r||r.forEach((function(e){A.matches(e.selector)&&R.length>e.limit&&R.splice(e.limit)}));var D=R.map((function(e){return i.generateSimplifiedDom(e,t,{extraAllowedAttributes:s,checkElementInstanceType:c,forceIncludeAttribute:d,forceIncludeFileInput:h,svgIntegration:m,onForceIncludeElement:g,contentWindow:N?A.contentWindow:w,assignChecksumIdsToAllElements:S,assignRrwebIdsToAllElements:x})})).filter(this.truthyFilter),O="false"!==A.getAttribute("checksum-data-visible"),L=A.hasAttribute("checksumid"),Z=A.hasAttribute("role"),F=this.getElementCustomDescription(A,{enableSVGCustomDescription:!!m}),P=F.customDescription,j=F.customDescriptionTarget,V=!!P,B=A.hasAttribute("aria-label")||A.hasAttribute("name")||A.hasAttribute("alt"),H=A.hasAttribute(ne)||this.forceIncludeElements.map((function(e){return e.element})).includes(A)||!!d&&A.hasAttribute(d)||h&&"input"===A.tagName.toLowerCase()&&"file"===A.getAttribute("type"),U=L||O&&(Z||B||V||A.matches(["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"].join(",")));if(!(U||H)){if(!D.length)return null;if(1===D.length&&!(0,v.m7)(D[0],"Text"))return D[0]}!U&&H&&(null===g||void 0===g||g(A));var q=function(){if(V&&j===ye.SVG)switch(m){case me.ARIA_LABEL:var e=T("svg");return e.setAttribute("aria-label",P),{simplifiedNode:e,appendChildren:!1};case me.TEXT:if(A.hasAttribute("checksumid")){var t=T("div");return t.innerText=P,{simplifiedNode:t,appendChildren:!1}}return{simplifiedNode:M(" [".concat(P,"] ")),appendChildren:!1}}var n="body"===A.tagName.toLowerCase()&&A.ownerDocument!==document?"div":A.tagName;return{simplifiedNode:T(n)}}(),z=q.simplifiedNode,G=q.appendChildren,$=void 0===G||G;if(!(0,v.m7)(z,"Element"))return z;var Y,Q=z,X=["aria-.+","data-name","name","type","placeholder","content","value","role","icon","title","checksumid","checksuminteractable","checksum-get-more-items","checked","disabled","selected","label","required","inputmode","min","max","step","minlength","maxlength","alt","hidden","draggable","ondrop","ondragover","contenteditable","href","(data-)?test(-)?id"].concat(s),K=A.attributes,J=(0,W.Z)(K);try{for(J.s();!(Y=J.n()).done;){var ee,te=Y.value,re=(0,W.Z)(X);try{for(re.s();!(ee=re.n()).done;){var ie,oe=ee.value;if(new RegExp("^"+oe+"$").test(te.name))Q.setAttribute(te.name,null===(ie=te.value)||void 0===ie||ie)}}catch(se){re.e(se)}finally{re.f()}}}catch(se){J.e(se)}finally{J.f()}if(A.isContentEditable?Q.setAttribute("contenteditable","true"):["TEXTAREA","INPUT","SELECT"].includes(A.tagName)||"text"!==window.getComputedStyle(A).cursor||Q.setAttribute("contenteditable","cursor-text"),(0,v.m7)(A,"HTMLInputElement")&&"checkbox"===A.getAttribute("type"))A.checked&&Q.setAttribute("checked","true");else if((0,v.m7)(A,"HTMLInputElement")||(0,v.m7)(A,"HTMLSelectElement"))Q.setAttribute("value",A.value);else if((0,v.m7)(A,"HTMLTextAreaElement")&&!A.childNodes.length&&A.value){var ae=M(A.value);Q.appendChild(ae)}return $&&D.forEach((function(e){return Q.appendChild(e)})),Q}},{key:"getElementCustomDescription",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).enableSVGCustomDescription,n=void 0===t||t;return((0,v.m7)(e,"SVGElement")||"svg"===e.tagName.toLowerCase())&&n?{customDescriptionTarget:ye.SVG,customDescription:this.getSVGDescriptionForElement(e)}:{}}},{key:"getSVGDescriptionForElement",value:function(e){var t=this.findSvgElementDescriptionFromBank(e);if(t)return t;var n=e.querySelector("title");return n?n.textContent:void 0}},{key:"findSvgElementDescriptionFromBank",value:function(e){var t;return null===(t=this.getSvgBank().find((function(t){return e.matches("svg:has(".concat(t.selector,")"))})))||void 0===t?void 0:t.description}},{key:"getSvgBank",value:function(){return K}},{key:"restoreDom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;(0,v.RA)("*",e).forEach((function(e){e.removeAttribute("checksum-data-visible"),e.removeAttribute("checksum-data-transparently-visible"),e.removeAttribute("checksum-data-visible-under-transparent-element"),e.removeAttribute("checksumid"),e.removeAttribute("checksuminteractable"),e.removeAttribute("checksum-data-click-offset"),e.removeAttribute(te),e.removeAttribute(ne)}))}},{key:"removeAttribute",value:function(e){(0,v.RA)("*",document).forEach((function(t){t.removeAttribute(e)}))}},{key:"mapAndStoreSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,l,d,f,h;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},r=new X,e.t0=W.Z,e.next=5,r.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom);case 5:e.t1=e.sent,i=(0,e.t0)(e.t1),e.prev=7,i.s();case 9:if((o=i.n()).done){e.next=18;break}if(a=o.value,s=a.checksumId,u=a.element,c=a.clickOffset,l=a.selector,d=a.locator,f=a.parentFramesSelectors,l){e.next=14;break}return console.warn("Unable to get selector for element",u),e.abrupt("continue",16);case 14:h=u,n[s]={element:h,selector:l,locator:d,clickOffset:c,parentFramesSelectors:f,innerText:h.innerText};case 16:e.next=9;break;case 18:e.next=23;break;case 20:e.prev=20,e.t2=e.catch(7),i.e(e.t2);case 23:return e.prev=23,i.f(),e.finish(23);case 26:return e.abrupt("return",n);case 27:case"end":return e.stop()}}),e,this,[[7,20,23,26]])})));return function(){return e.apply(this,arguments)}}()},{key:"shouldFurtherReduce",value:function(e){return!e||e.outerHTML.length>16e3}},{key:"getRepeatingElementsToExclude",value:function(e,t,n){if(e.length<=t)return[];var r=t,i=e.reduce((function(e,t){var n=t._originalNode;return(0,v.PZ)((0,v.m7)(n,"Element")?n:null===n||void 0===n?void 0:n.parentElement)?e.inViewportElements.push(t):e.outOfViewportElements.push(t),e}),{inViewportElements:[],outOfViewportElements:[]}),o=i.inViewportElements,a=i.outOfViewportElements,s=[],u=function(e){var t,i,o=(0,W.Z)(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(i=a,n&&(i.hasAttribute(n)||Array.from(i.querySelectorAll("[".concat(n,"]"))).length>0)||s.push(a),s.length===r)return!0}}catch(u){o.e(u)}finally{o.f()}};return u(a)||u(o),s}},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,d,f,h,p,v,m,y,g,b,w,k=this,S=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=S.length>1&&void 0!==S[1]?S[1]:{},i=S.length>2&&void 0!==S[2]?S[2]:document,console.time("reduceHTML"),o=this.lastReduceHTMLOptions=(0,l.Z)((0,l.Z)({},this.defaultReduceHTMLOptions),r),a=o.maintainSelectorsMapping,s=o.initialChecksumId,u=o.forceIncludeAttribute,c=o.forceIncludeFileInput,d=o.invalidateCache,f=o.includeFlashingElements,h=o.limitNodeRepetitions,p=o.stopFlashingElementsDetection,!(v=O.J.getInstance("reduce",{target:i,monitorInput:!0,invalidate:d,log:!1})).hasCache()){e.next=7;break}return e.abrupt("return",v.get());case 7:m=f?this.flashingElementsDetector.get():void 0,p&&this.flashingElementsDetector.stop(),this.nodeRepetitionsThreshold=h,this.reducePercentage=50,this.templateNodes=void 0,y=function(e){return oe(e,{forceIncludeAttribute:u,forceIncludeFileInput:c,forceIncludeElements:k.forceIncludeElements.map((function(e){return e.element})),limit:Math.min(Math.ceil(e.element.children.length*(k.reducePercentage/100)),e.element.children.length-6)})},console.log("Running pre-templatize"),this.templatize(y),console.log("Preprocessing document..."),this.preprocessDocument(i),this.checksumIdCounter=new ee(null!==s&&void 0!==s?s:"0");case 18:if(console.log("Marking interactable elements..."),this.markInteractableElements(n,i,{forceIncludeAttribute:u,forceIncludeFileInput:c}),console.log("Generating simplified DOM..."),this.nonInteractableElementsFromSimplifiedDom=[],g=this.generateSimplifiedDom(i.documentElement,n,this.lastReduceHTMLOptions)){e.next=26;break}throw new Error("Unable to get simplified DOM");case 26:if(!this.shouldFurtherReduce(g)){e.next=34;break}if(console.log("Will further reduce (".concat(g.outerHTML.length,")...")),this.templatize(y)){e.next=31;break}return console.log("Exceeded maximum html reduction, stopping (html size: ".concat(g.outerHTML.length,")")),e.abrupt("break",37);case 31:this.removeAttribute("checksumid"),e.next=35;break;case 34:return e.abrupt("break",37);case 35:e.next=18;break;case 37:if(console.log("Simplified DOM generated, length:",g.outerHTML.length),b=new Set(Array.from(g.querySelectorAll("[checksumid]")).map((function(e){return e.getAttribute("checksumid")}))),this.interactableElementsFromSimplifiedDom=this.interactableElements.filter((function(e){return b.has(e.checksumId)})),console.log("Found ".concat(this.interactableElementsFromSimplifiedDom.length," interactable elements in simplified DOM vs ").concat(this.interactableElements.length," in original DOM")),console.log("Restoring DOM..."),this.restoreDom(i),this.preMapReducedHTMLSelectors=!!n.preMapReducedHTMLSelectors,!this.preMapReducedHTMLSelectors||!a){e.next=50;break}return console.log("Mapping selectors..."),e.next=48,this.mapAndStoreSelectors();case 48:this.selectors=e.sent,console.log("Done mapping selectors");case 50:return this.elementsInSimplifiedDomByChecksumId=[].concat((0,x.Z)(this.interactableElementsFromSimplifiedDom),(0,x.Z)(this.nonInteractableElementsFromSimplifiedDom)).reduce((function(e,t){return e[t.checksumId]=t,e}),{}),w={reducedDomHTMLElement:g,reducedHTML:g.outerHTML,currentChecksumId:this.checksumIdCounter.get(),flashingHTML:m},v.set(w),console.timeEnd("reduceHTML"),e.abrupt("return",w);case 55:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"templatize",value:function(e){if(this.templateNodes)if(this.reducePercentage<98)this.reducePercentage=Math.min(this.reducePercentage+20,98),console.log("Increasing reduce percentage to",this.reducePercentage);else{if(this.nodeRepetitionsThreshold<=20)return!1;this.reducePercentage=50;var t=this.templateNodes.length;do{this.nodeRepetitionsThreshold-=10,console.log("Reducing node repetitions threshold to",this.nodeRepetitionsThreshold),this.templateNodes=ue(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold})}while(this.templateNodes.length===t&&this.nodeRepetitionsThreshold>20)}else if(this.templateNodes=ue(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold}),0===this.templateNodes.length)return this.templatize(e);var n=Array.from(this.templateNodes).reduce((function(t,n){return t+e(n).length}),0);return console.log("[templatize] ".concat(n," elements marked to ignore for ").concat(this.templateNodes.length," templates")),!0}},{key:"getMoreElementsFromTemplate",value:function(e,t){var n=this;try{var r=this.templateNodes.find((function(t){return t.id===e}));if(!r)throw new Error("Template not found");var i=r.element,o=r.excludedElements;console.log("Preprocessing template node..."),this.preprocessDocument(i),console.log("Marking template interactable elements..."),this.markInteractableElements(t,i,this.lastReduceHTMLOptions);for(var a=[],s=function(){return a.map((function(e){return e.outerHTML})).join("")},u=o.values(),c=function(){var e=u.next().value;if(!e)return 1;var r=Array.from(e.querySelectorAll("[checksumid]")).concat(e._checksumid?[e]:[]);n.interactableElements.filter((function(e){return r.includes(e.element)})).forEach((function(e){n.elementsInSimplifiedDomByChecksumId[e.element._checksumid]=e})),a.push(n.generateSimplifiedDom(e,t,n.lastReduceHTMLOptions)),o.delete(e)};s().length<5280&&!c(););return this.restoreDom(i),{items:s(),hasMoreItems:o.size>0}}catch(xt){return void console.error("[getMoreElementsFromTemplate] error",xt)}}},{key:"getSelectorForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(h.length>1&&void 0!==h[1]?h[1]:{}).forceGenerate,o=void 0!==i&&i,a={selector:n,element:null,innerText:"",locator:"",parentFramesSelectors:[]},this.preMapReducedHTMLSelectors&&!o){e.next=14;break}if(s=new X,u=this.elementsInSimplifiedDomByChecksumId[n]){e.next=7;break}return e.abrupt("return",a);case 7:return e.next=9,s.getSelectorAndLocator(u.element);case 9:return c=e.sent,l=c.selector,d=c.locator,f=c.parentFramesSelectors,e.abrupt("return",{element:u.element,selector:l,locator:d,clickOffset:u.clickOffset,parentFramesSelectors:f,innerText:u.element.innerText});case 14:if(this.selectors[n]||o){e.next=16;break}return e.abrupt("return",this.getSelectorForChecksumId(n,{forceGenerate:!0}));case 16:return e.abrupt("return",null!==(r=this.selectors[n])&&void 0!==r?r:a);case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getElementForChecksumId",value:function(e){var t;return null===(t=this.elementsInSimplifiedDomByChecksumId[e])||void 0===t?void 0:t.element}},{key:"hasInnerTextByChecksumId",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.maxLength,i=void 0===r?void 0:r,o=n.minLength,a=void 0===o?void 0:o;if(!this.preMapReducedHTMLSelectors){var s,u=null===(s=this.elementsInSimplifiedDomByChecksumId[e])||void 0===s?void 0:s.element,c=null===u||void 0===u?void 0:u.innerText;return!!c&&(!(a&&c.length<a)&&!(i&&c.length>i))}return!(null===(t=this.selectors[e])||void 0===t||!t.innerText)}},{key:"getInteractableElements",value:function(){return this.interactableElements}},{key:"getInteractableElementsInReducedHTML",value:function(){return this.interactableElementsFromSimplifiedDom}},{key:"startFlashingElementsDetection",value:function(){return this.flashingElementsDetector.start()}},{key:"addForceIncludeElement",value:function(e){this.forceIncludeElements.push(e),e.element._checksumid=e.checksumid}}]),e}(),we=function(){function e(){(0,a.Z)(this,e),this.esraExtractors=[],this.appSpecificRules=void 0,this.playwrightSelector=new X,this.defaultExtractReducedHtmlAndSelector=!1,this.defaultInspectInteractableElements=!1,this.previousTargetNodeForReducedHTML=void 0,this.currentReducedHTMLChecksumIdAllocationCount="0",this.htmlReducer=new be}return(0,s.Z)(e,[{key:"getSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,y,g=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=g.length>1&&void 0!==g[1]?g[1]:{}).extractPlaywrightSelector,o=void 0===i||i,a=r.extractEsraMetadata,s=void 0===a||a,u=r.extractReducedHtmlAndSelector,c=void 0===u?this.defaultExtractReducedHtmlAndSelector:u,l=r.inspectInteractableElements,d=void 0===l?this.defaultInspectInteractableElements:l,n){e.next=3;break}return e.abrupt("return",null);case 3:if(console.log("[SessionDigesterSelector] generating for node",n),f={},s&&(console.log("extracting ESRA metadata..."),h=this.getESRAExtractor(n).extract(n),f.esraMetadata=h.toMetadata(),console.log("ESRA metadata extraction complete")),!o){e.next=18;break}return console.log("extracting playwright selector..."),e.next=10,this.playwrightSelector.getSelectorAndLocator(n);case 10:p=e.sent,v=p.selector,m=p.locator,y=p.parentFramesSelectors,f.playwrightSelector=v,f.playwrightLocator=m,f.playwrightParentFramesSelectors=y,console.log("Playwright selector extraction complete");case 18:if(!c){e.next=24;break}return console.log("extracting reduced HTML..."),e.next=22,this.getReducedHTMLAndTargetNodeSelector(n);case 22:f.reducedHTML=e.sent,console.log("Reduced HTML extraction complete");case 24:if(!d){e.next=30;break}return console.log("extracting element inspection..."),e.next=28,this.isElementInteractable(n);case 28:f.interactionFoundOnInspection=e.sent,console.log("Element inspection extraction complete");case 30:return console.log("[SessionDigesterSelector] complete",f),e.abrupt("return",f);case 32:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.playwrightSelector.selector(n));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"setOptions",value:function(e){var t=e.defaultExtractReducedHtmlAndSelector,n=e.defaultInspectInteractableElements;this.defaultExtractReducedHtmlAndSelector=t,this.defaultInspectInteractableElements=n}},{key:"getReducedHTMLAndTargetNodeSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="checksum-target-node",n.setAttribute(r,"true"),i=this.previousTargetNodeForReducedHTML&&this.previousTargetNodeForReducedHTML!==n,this.previousTargetNodeForReducedHTML=n,o=!1,a=function(e){e.hasAttribute(r)&&(o=!0)},e.next=8,this.htmlReducer.reduceHTML(this.appSpecificRules,{initialChecksumId:this.currentReducedHTMLChecksumIdAllocationCount,extraAllowedAttributes:[r],checkElementInstanceType:!1,maintainSelectorsMapping:!1,forceIncludeAttribute:r,invalidateCache:i,onForceIncludeElement:a},n.ownerDocument);case 8:return s=e.sent,u=s.reducedDomHTMLElement,c=s.reducedHTML,l=s.currentChecksumId,n.removeAttribute(r),this.currentReducedHTMLChecksumIdAllocationCount=l,d=u.matches("[".concat(r,"=true]"))?u:u.querySelector("[".concat(r,"=true]")),f=d?d.getAttribute("checksumid"):void 0,e.abrupt("return",{html:c,selector:f,targetForceIncluded:o});case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getESRAExtractor",value:function(e){var t=this.esraExtractors.find((function(t){return t.isSameDocument(e.ownerDocument)}));if(t)return t;var n=new j(e.ownerDocument);return this.esraExtractors.push(n),n}},{key:"isElementInteractable",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.htmlReducer.getInteractableElements())||!r.length){e.next=3;break}return e.abrupt("return",r.some((function(e){return e.element===n&&!e.forced})));case 3:return e.next=5,(0,v.w1)(n.ownerDocument,this.appSpecificRules);case 5:return i=e.sent,e.abrupt("return",i.includes(n));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),ke=n(1414),Se=n(8739),Ee=n(1855),xe=n(6301),Ie=n.n(xe),Ce=function(e){(0,V.Z)(i,e);var n=(0,B.Z)(i);function i(e){var t,r=e.sessionMirror,o=e.elementSelector;return(0,a.Z)(this,i),(t=n.call(this)).sessionMirror=void 0,t.elementSelector=void 0,t.numberOfRetries=3,t.currentHref=void 0,t.previousMouseDownData=void 0,t.previousMousePositions=void 0,t.previousMousePositionsNodeSelectors={},t.hasUndefinedFocusNode=!1,t.lastMouseUpTime=0,t.lastMouseDownExtract=void 0,t.allInteractableElementsMetadata={mouseMove:void 0,mouseDown:void 0},t.events=void 0,t.currentEventIndex=-1,t.enableRecordingAvailableInteractableElements=!0,t.useTextInputFastForward=!0,t.textInputFastForwardInitialSelector=void 0,t.appSpecificRules=void 0,t.getBoundingBox=function(e){var n=(0,v.QI)(t.sessionMirror.getNodeById(e),t.appSpecificRules.appSpecificInteractableElementsSelectors);if(n)return null===n||void 0===n?void 0:n.getBoundingClientRect()},t.isPointWithinBoundingBox=function(e,t,n){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom},t.isPointWithinNodeBoundingBox=function(e,n,r){var i=t.getBoundingBox(e);return!!i&&(n>=i.left&&n<=i.right&&r>=i.top&&r<=i.bottom)},t.elementSelector=o,t.sessionMirror=r,t}return(0,s.Z)(i,[{key:"setEvents",value:function(e){this.events=e}},{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward,r=void 0===n||n;this.enableRecordingAvailableInteractableElements=t,this.useTextInputFastForward=r}},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"skipEvents",value:function(e){this.currentEventIndex+=e.length}},{key:"preEvent",value:function(e){++this.currentEventIndex}},{key:"postEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",r);case 2:if(r.availableInteractableElementsAtStart||!this.enableRecordingAvailableInteractableElements||n.type!==ke.tw.IncrementalSnapshot||n.data.source!==ke.yh.MouseInteraction&&n.data.source!==ke.yh.Input&&n.data.source!==ke.yh.MediaInteraction){e.next=6;break}return e.next=5,this.getInteractableElementsMetadata();case 5:r.availableInteractableElementsAtStart=e.sent;case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMeta",value:function(e){if(e.href!==this.currentHref)return this.currentHref=e.href,{eventCode:Ee.$.Navigation,url:e.href}}},{key:"getNextUserTriggeredInputEvent",value:function(e){for(var t=this.currentEventIndex+1;t<this.events.length;++t){var n=this.events[t];if(n.type===ke.tw.IncrementalSnapshot&&n.data.source===ke.yh.Input&&n.data.userTriggered)return n;if(n.timestamp>e)return}}},{key:"handleInput",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u,c,d=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.userTriggered){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(o=e.sent,(a=this.getInputEventCode(o,n))!==Ee.$.Input||!this.useTextInputFastForward){e.next=18;break}if(this.textInputFastForwardInitialSelector){e.next=11;break}return e.next=10,this.elementSelector.getSelector(o);case 10:this.textInputFastForwardInitialSelector=e.sent;case 11:return s=(0,l.Z)({eventCode:a},this.textInputFastForwardInitialSelector),u=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=d.getNextUserTriggeredInputEvent(i.timestamp+2e3))){e.next=9;break}return r=n.data,e.next=5,d.getNodeById(r.id);case 5:if((a=e.sent)===o){e.next=8;break}return e.abrupt("return",!1);case 8:return e.abrupt("return",d.getInputEventCode(a,r)===Ee.$.Input);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=15,u();case 15:if(e.sent){e.next=17;break}this.textInputFastForwardInitialSelector=void 0;case 17:return e.abrupt("return",s);case 18:return e.next=20,this.elementSelector.getSelector(o);case 20:return c=e.sent,e.abrupt("return",(0,l.Z)({eventCode:a},c));case 22:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMouseMove",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.previousMousePositions=n.positions,this.previousMousePositionsNodeSelectors={},!this.isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus()){e.next=39;break}this.previousMousePositionsNodeSelectors={},r={},i=(0,W.Z)(this.previousMousePositions),e.prev=6,i.s();case 8:if((o=i.n()).done){e.next=28;break}if(a=o.value,s=a.id,!r[s]){e.next=13;break}return e.abrupt("continue",26);case 13:return r[s]=!0,e.next=16,this.getNodeById(s);case 16:return u=e.sent,e.prev=17,e.next=20,this.elementSelector.getSelector(u);case 20:this.previousMousePositionsNodeSelectors[s]=e.sent,e.next=26;break;case 23:e.prev=23,e.t0=e.catch(17),console.warn("error with extracting selector for node during previousMousePositionsNodeSelectors mapping",u,e.t0);case 26:e.next=8;break;case 28:e.next=33;break;case 30:e.prev=30,e.t1=e.catch(6),i.e(e.t1);case 33:return e.prev=33,i.f(),e.finish(33);case 36:return e.next=38,this.getInteractableElementsMetadata();case 38:this.allInteractableElementsMetadata.mouseMove=e.sent;case 39:case"end":return e.stop()}}),e,this,[[6,30,33,36],[17,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===ke.tw.IncrementalSnapshot)switch(t.data.source){case ke.yh.MouseMove:return!1;case ke.yh.MouseInteraction:switch(t.data.type){case ke.Y2.Click:case ke.Y2.MouseDown:return!0;case ke.Y2.Focus:return-1===t.data.id}}}return!1}},{key:"handleMouseDown",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNodeById(n.id);case 2:return r=e.sent,e.prev=3,e.t0=r,e.next=7,this.elementSelector.getSelector(r);case 7:return e.t1=e.sent,this.lastMouseDownExtract={node:e.t0,selector:e.t1},e.next=11,this.getInteractableElementsMetadata();case 11:this.allInteractableElementsMetadata.mouseDown=e.sent,e.next=17;break;case 14:e.prev=14,e.t2=e.catch(3),console.warn("error with extracting selector for node during handleMouseDown",r,e.t2);case 17:this.previousMouseDownData=n;case 18:case"end":return e.stop()}}),e,this,[[3,14]])})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseUp",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.lastMouseUpTime=r.timestamp;case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isLastMouseDownValidForClick",value:function(e){return!!this.lastMouseDownExtract&&e-this.lastMouseUpTime<10}},{key:"invalidateLastMouseDown",value:function(){this.lastMouseUpTime=0,this.lastMouseDownExtract=void 0,this.allInteractableElementsMetadata.mouseDown=void 0}},{key:"handleFocus",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.hasUndefinedFocusNode=-1===n.id;case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return o=this.isLastMouseDownValidForClick(i.timestamp),a=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var r,a,s,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=19;break}return e.t0=l.Z,e.t1=(0,l.Z)({},u.lastMouseDownExtract.selector),e.t2={},e.next=6,u.elementSelector.getSelector(u.lastMouseDownExtract.node,{extractEsraMetadata:!1});case 6:if(e.t4=r=e.sent,e.t3=null===e.t4,e.t3){e.next=10;break}e.t3=void 0===r;case 10:if(!e.t3){e.next=14;break}e.t5=void 0,e.next=15;break;case 14:e.t5=r.playwrightSelector;case 15:return e.t6=e.t5,e.t7=u.allInteractableElementsMetadata.mouseDown,e.t8={playwrightSelectorForSnapshot:e.t6,availableInteractableElementsAtStart:e.t7},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t8));case 19:return a=u.getNodeIdForClick(n,i),e.next=22,u.getNodeById(a);case 22:if(s=e.sent,!u.previousMousePositionsNodeSelectors[a]){e.next=42;break}return e.t9=l.Z,e.t10=(0,l.Z)({},u.previousMousePositionsNodeSelectors[a]),e.t11={},e.next=29,u.elementSelector.getSelector(s,{extractEsraMetadata:!1});case 29:if(e.t13=c=e.sent,e.t12=null===e.t13,e.t12){e.next=33;break}e.t12=void 0===c;case 33:if(!e.t12){e.next=37;break}e.t14=void 0,e.next=38;break;case 37:e.t14=c.playwrightSelector;case 38:return e.t15=e.t14,e.t16=u.allInteractableElementsMetadata.mouseMove,e.t17={playwrightSelectorForSnapshot:e.t15,availableInteractableElementsAtStart:e.t16},e.abrupt("return",(0,e.t9)(e.t10,e.t11,e.t17));case 42:return e.abrupt("return",u.elementSelector.getSelector(s));case 43:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=6,a();case 6:return s=e.sent,this.invalidateLastMouseDown(),e.abrupt("return",(0,l.Z)({eventCode:Ee.$.Click},s));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getNextMouseMoveEvent",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===ke.tw.IncrementalSnapshot&&t.data.source===ke.yh.MouseMove)return t}}},{key:"getNodeIdForClick",value:function(e,t){var n=this;if(this.hasUndefinedFocusNode&&this.previousMouseDownData&&this.previousMouseDownData.id!==e.id){var r={next:function(){var e=n.getNextMouseMoveEvent();if(e){var r=e.data,i=(0,x.Z)(r.positions).reverse().find((function(n){return e.timestamp+n.timeOffset<t.timestamp}));if(i)return i.id}}(),previous:function(){if(n.previousMousePositions){var e=(0,x.Z)(n.previousMousePositions).reverse().find((function(e){return!0}));if(e)return e.id}}(),point:function(){try{var t=n.sessionMirror.getNodeById(e.id),r=Array.from((0,v.mn)(t)).filter((function(e){return"none"===window.getComputedStyle(e).pointerEvents})),i=[];if(r.length){r.forEach((function(e){var t=e,n=t.getAttribute("style");i.push(n),t.setAttribute("style",n+";pointer-events:auto !important")}));var o=document.querySelector("iframe").contentDocument.elementFromPoint(e.x,e.y);if(r.forEach((function(e,t){e.setAttribute("style",i[t])})),o){var a=n.sessionMirror.getMeta(o);if(a)return a.id}}}catch(xt){console.warn("element from point calc error",xt)}}(),original:e.id},i=r.next||r.previous||e.id;return r.point&&function(){if(i===r.point)return!1;var t=n.sessionMirror.getNodeById(i);return n.isPointWithinBoundingBox(e.x,e.y,t.getBoundingClientRect())}()?r.point:i}return e.id}},{key:"getNodeById",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).retriesLeft,o=void 0===i?this.numberOfRetries:i,a=r.useCompoundInteractableDetection,s=void 0===a||a,o){e.next=4;break}return console.error("no node"),e.abrupt("return",null);case 4:if(u=this.sessionMirror.getNodeById(n)){e.next=9;break}return e.next=8,Ie()(100*(this.numberOfRetries-o+1));case 8:return e.abrupt("return",this.getNodeById(n,{retriesLeft:o-1,useCompoundInteractableDetection:s}));case 9:return e.abrupt("return",s?(0,v.QI)(u,this.appSpecificRules.appSpecificInteractableElementsSelectors):u);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getInputEventCode",value:function(e,t){switch(e.getAttribute("type")){case"checkbox":case"radio":return t.isChecked?Ee.$.Check:Ee.$.UnCheck;default:return Ee.$.Input}}},{key:"getInteractableElementsMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o,a,s;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.enableRecordingAvailableInteractableElements){e.next=2;break}return e.abrupt("return",[]);case 2:return n=document.querySelector("iframe").contentWindow,i=n.document,console.log("Getting all interactable elements..."),o=(0,v.w1)(i,this.appSpecificRules),console.log("Got ".concat(o.length," interactable elements")),console.log("Extracting ESRA metadata for all interactable elements..."),a=new j(i),e.next=11,Promise.all(o.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.extract(n).toMetadata(),e.abrupt("return",{esraMetadata:r});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 11:return s=e.sent,console.log("Done processing all interactable elements..."),e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),i}(Se.E),Me=n(7666),Te=n(885),_e=n(3246),Ae=n(5512),Ne=n(7326);!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(ve||(ve={}));var Re=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function De(e){var t=[];for(var n in e){var r=e[n];if("string"===typeof r){var i=Pe(n);t.push("".concat(i,": ").concat(r,";"))}}return t.join(" ")}var Oe=/-([a-z])/g,Le=/^--[a-zA-Z0-9-]+$/,Ze=function(e){return Le.test(e)?e:e.replace(Oe,(function(e,t){return t?t.toUpperCase():""}))},Fe=/\B([A-Z])/g,Pe=function(e){return e.replace(Fe,"-$1").toLowerCase()},je=function(){function e(){(0,a.Z)(this,e),this.parentElement=null,this.parentNode=null,this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.ELEMENT_NODE=qe.ELEMENT_NODE,this.TEXT_NODE=qe.TEXT_NODE}return(0,s.Z)(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),e}();function Ve(e){return function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(e,r,i){var o;return(0,a.Z)(this,n),(o=t.call(this)).nodeType=qe.DOCUMENT_TYPE_NODE,o.RRNodeType=ve.DocumentType,o.name=e,o.publicId=r,o.systemId=i,o.nodeName=e,o.textContent=null,o}return(0,s.Z)(n,[{key:"toString",value:function(){return"RRDocumentType"}}]),n}(e)}function Be(e){return function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=qe.ELEMENT_NODE,r.RRNodeType=ve.Element,r.attributes={},r.shadowRoot=null,r.tagName=e.toUpperCase(),r.nodeName=e.toUpperCase(),r}return(0,s.Z)(n,[{key:"textContent",get:function(){var e="";return this.childNodes.forEach((function(t){return e+=t.textContent})),e},set:function(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}},{key:"classList",get:function(){var e=this;return new ze(this.attributes.class,(function(t){e.attributes.class=t}))}},{key:"id",get:function(){return this.attributes.id||""}},{key:"className",get:function(){return this.attributes.class||""}},{key:"style",get:function(){var e=this,t=this.attributes.style?function(e){var t={},n=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[Ze(r[0].trim())]=r[1].trim())}})),t}(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=function(r,i,o){if(!n.test(r)){var a=Ze(r);i?t[a]=i:delete t[a],"important"===o&&(t[a]+=" !important"),e.attributes.style=De(t)}},t.removeProperty=function(r){if(n.test(r))return"";var i=Ze(r),o=t[i]||"";return delete t[i],e.attributes.style=De(t),o},t}},{key:"getAttribute",value:function(e){return this.attributes[e]||null}},{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"setAttributeNS",value:function(e,t,n){this.setAttribute(t,n)}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"appendChild",value:function(e){return Ge(this,e)}},{key:"insertBefore",value:function(e,t){return $e(this,e,t)}},{key:"removeChild",value:function(e){return Ye(this,e)}},{key:"attachShadow",value:function(e){var t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}},{key:"dispatchEvent",value:function(e){return!0}},{key:"toString",value:function(){var e="";for(var t in this.attributes)e+="".concat(t,'="').concat(this.attributes[t],'" ');return"".concat(this.tagName," ").concat(e)}}]),n}(e)}function He(e){return function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=qe.TEXT_NODE,r.nodeName="#text",r.RRNodeType=ve.Text,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRText text=".concat(JSON.stringify(this.data))}}]),n}(e)}function We(e){return function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=qe.COMMENT_NODE,r.nodeName="#comment",r.RRNodeType=ve.Comment,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRComment text=".concat(JSON.stringify(this.data))}}]),n}(e)}function Ue(e){return function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeName="#cdata-section",r.nodeType=qe.CDATA_SECTION_NODE,r.RRNodeType=ve.CDATA,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRCDATASection data=".concat(JSON.stringify(this.data))}}]),n}(e)}var qe,ze=(0,s.Z)((function e(t,n){var r=this;if((0,a.Z)(this,e),this.classes=[],this.add=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var a=o[i],s=String(a);r.classes.indexOf(s)>=0||r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))},this.remove=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.classes=r.classes.filter((function(e){return-1===t.indexOf(e)})),r.onChange&&r.onChange(r.classes.join(" "))},t){var i,o=t.trim().split(/\s+/);(i=this.classes).push.apply(i,(0,x.Z)(o))}this.onChange=n}));function Ge(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function $e(e,t,n){if(!n)return Ge(e,t);if(n.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===n||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=n.previousSibling,n.previousSibling=t,t.nextSibling=n,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function Ye(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}!function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(qe||(qe={}));var Qe={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Xe={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},Ke=null;function Je(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.mirror||t.ownerDocument.mirror;e=function(e,t,n,r){var i;n.afterAppend&&!Ke&&(Ke=new WeakSet,setTimeout((function(){Ke=null}),0));if(!nt(e,t)){var o=tt(t,n.mirror,r);null===(i=e.parentNode)||void 0===i||i.replaceChild(o,e),e=o}switch(t.RRNodeType){case ve.Document:if(!rt(e,t,n.mirror,r)){var a=r.getMeta(t);a&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,a),null===Ke||void 0===Ke||Ke.add(e))}break;case ve.Element:var s=e,u=t;switch(u.tagName){case"IFRAME":var c=e.contentDocument;if(!c)break;Je(c,t.contentDocument,n,r)}u.shadowRoot&&(s.shadowRoot||s.attachShadow({mode:"open"}),et(s.shadowRoot,u.shadowRoot,n,r)),function(e,t,n){var r=e.attributes,i=t.attributes,o=function(){var r=i[a],o=n.getMeta(t);if((null===o||void 0===o?void 0:o.isSVG)&&Qe[a])e.setAttributeNS(Qe[a],a,r);else if("CANVAS"===t.tagName&&"rr_dataURL"===a){var s=document.createElement("img");s.src=r,s.onload=function(){var t=e.getContext("2d");t&&t.drawImage(s,0,0,s.width,s.height)}}else{if("IFRAME"===t.tagName&&"srcdoc"===a)return 1;e.setAttribute(a,r)}};for(var a in i)o();for(var s=0,u=Array.from(r);s<u.length;s++){var c=u[s].name;c in i||e.removeAttribute(c)}t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}(s,u,r)}return e}(e,t,n,r),et(e,t,n,r),function(e,t,n){var r;switch(t.RRNodeType){case ve.Document:var i=t.scrollData;i&&n.applyScroll(i,!0);break;case ve.Element:var o=e,a=t;switch(a.scrollData&&n.applyScroll(a.scrollData,!0),a.inputData&&n.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":var s=e,u=a;void 0!==u.paused&&(u.paused?s.pause():s.play()),void 0!==u.muted&&(s.muted=u.muted),void 0!==u.volume&&(s.volume=u.volume),void 0!==u.currentTime&&(s.currentTime=u.currentTime),void 0!==u.playbackRate&&(s.playbackRate=u.playbackRate),void 0!==u.loop&&(s.loop=u.loop);break;case"CANVAS":var c=t;if(null!==c.rr_dataURL){var l=document.createElement("img");l.onload=function(){var e=o.getContext("2d");e&&e.drawImage(l,0,0,l.width,l.height)},l.src=c.rr_dataURL}c.canvasMutations.forEach((function(t){return n.applyCanvas(t.event,t.mutation,e)}));break;case"STYLE":var d=o.sheet;d&&t.rules.forEach((function(e){return n.applyStyleSheetMutation(e,d)}))}break;case ve.Text:case ve.Comment:case ve.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}(null===Ke||void 0===Ke?void 0:Ke.has(e))&&(Ke.delete(e),null===(r=n.afterAppend)||void 0===r||r.call(n,e,n.mirror.getId(e)))}(e,t,n)}function et(e,t,n,r){var i=Array.from(e.childNodes),o=t.childNodes;if(0!==i.length||0!==o.length){for(var a=0,s=i.length-1,u=0,c=o.length-1,l=i[a],d=i[s],f=o[u],h=o[c],p=void 0,v=void 0;a<=s&&u<=c;)if(void 0===l)l=i[++a];else if(void 0===d)d=i[--s];else if(rt(l,f,n.mirror,r))l=i[++a],f=o[++u];else if(rt(d,h,n.mirror,r))d=i[--s],h=o[--c];else if(rt(l,h,n.mirror,r)){try{e.insertBefore(l,d.nextSibling)}catch(xt){console.warn(xt)}l=i[++a],h=o[--c]}else if(rt(d,f,n.mirror,r)){try{e.insertBefore(d,l)}catch(xt){console.warn(xt)}d=i[--s],f=o[++u]}else{if(!p){p={};for(var m=a;m<=s;m++){var y=i[m];y&&n.mirror.hasNode(y)&&(p[n.mirror.getId(y)]=m)}}var g=i[v=p[r.getId(f)]];if(void 0!==v&&g&&rt(g,f,n.mirror,r)){try{e.insertBefore(g,l)}catch(xt){console.warn(xt)}i[v]=void 0}else{var b=tt(f,n.mirror,r);"#document"===e.nodeName&&l&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(e.removeChild(l),n.mirror.removeNodeFromMap(l),l=i[++a]);try{e.insertBefore(b,l||null)}catch(xt){console.warn(xt)}}f=o[++u]}if(a>s){var w=o[c+1],k=null;for(w&&(k=n.mirror.getNode(r.getId(w)));u<=c;++u){var S=tt(o[u],n.mirror,r);try{e.insertBefore(S,k)}catch(xt){console.warn(xt)}}}else if(u>c)for(;a<=s;a++){var E=i[a];if(E&&E.parentNode===e)try{e.removeChild(E),n.mirror.removeNodeFromMap(E)}catch(xt){console.warn(xt)}}for(var x=e.firstChild,I=t.firstChild;null!==x&&null!==I;)Je(x,I,n,r),x=x.nextSibling,I=I.nextSibling}}function tt(e,t,n){var r=n.getId(e),i=n.getMeta(e),o=null;if(r>-1&&(o=t.getNode(r)),null!==o&&nt(o,e))return o;switch(e.RRNodeType){case ve.Document:o=new Document;break;case ve.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case ve.Element:var a=e.tagName.toLowerCase();a=Xe[a]||a,o=i&&"isSVG"in i&&(null===i||void 0===i?void 0:i.isSVG)?document.createElementNS(Qe.svg,a):document.createElement(e.tagName);break;case ve.Text:o=document.createTextNode(e.data);break;case ve.Comment:o=document.createComment(e.data);break;case ve.CDATA:o=document.createCDATASection(e.data)}i&&t.add(o,Object.assign({},i));try{null===Ke||void 0===Ke||Ke.add(o)}catch(xt){}return o}function nt(e,t){return e.nodeType===t.nodeType&&(e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName)}function rt(e,t,n,r){var i=n.getId(e),o=r.getId(t);return-1!==i&&i===o&&nt(e,t)}var it=function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).UNSERIALIZED_STARTING_ID=-2,r._unserializedId=r.UNSERIALIZED_STARTING_ID,r.mirror=new mt,r.scrollData=null,e&&(r.mirror=e),r}return(0,s.Z)(n,[{key:"unserializedId",get:function(){return this._unserializedId--}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new ot(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t,n=e.toUpperCase();switch(n){case"AUDIO":case"VIDEO":t=new st(n);break;case"IFRAME":t=new lt(n,this.mirror);break;case"CANVAS":t=new ut(n);break;case"STYLE":t=new ct(n);break;default:t=new at(n)}return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new ft(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new ht(e);return t.ownerDocument=this,t}},{key:"createTextNode",value:function(e){var t=new dt(e);return t.ownerDocument=this,t}},{key:"destroyTree",value:function(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}},{key:"open",value:function(){(0,Y.Z)((0,Q.Z)(n.prototype),"open",this).call(this),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}]),n}(function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call(this,i)).nodeType=qe.DOCUMENT_NODE,e.nodeName="#document",e.compatMode="CSS1Compat",e.RRNodeType=ve.Document,e.textContent=null,e.ownerDocument=(0,Ne.Z)(e),e}return(0,s.Z)(n,[{key:"documentElement",get:function(){return this.childNodes.find((function(e){return e.RRNodeType===ve.Element&&"HTML"===e.tagName}))||null}},{key:"body",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===ve.Element&&"BODY"===e.tagName})))||null}},{key:"head",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===ve.Element&&"HEAD"===e.tagName})))||null}},{key:"implementation",get:function(){return this}},{key:"firstElementChild",get:function(){return this.documentElement}},{key:"appendChild",value:function(e){var t=e.RRNodeType;if((t===ve.Element||t===ve.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===t})))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ".concat(t===ve.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var n=Ge(this,e);return n.parentElement=null,n}},{key:"insertBefore",value:function(e,t){var n=e.RRNodeType;if((n===ve.Element||n===ve.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===n})))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ".concat(n===ve.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var r=$e(this,e,t);return r.parentElement=null,r}},{key:"removeChild",value:function(e){return Ye(this,e)}},{key:"open",value:function(){this.firstChild=null,this.lastChild=null}},{key:"close",value:function(){}},{key:"write",value:function(e){var t;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===e?t="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===e&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){var n=this.createDocumentType("html",t,"");this.open(),this.appendChild(n)}}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new(Ve(je))(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t=new(Be(je))(e);return t.ownerDocument=this,t}},{key:"createElementNS",value:function(e,t){return this.createElement(t)}},{key:"createTextNode",value:function(e){var t=new(He(je))(e);return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new(We(je))(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new(Ue(je))(e);return t.ownerDocument=this,t}},{key:"toString",value:function(){return"RRDocument"}}]),n}(je)),ot=Ve(je),at=function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).inputData=null,e.scrollData=null,e}return(0,s.Z)(n)}(Be(je)),st=function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n)}(function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"attachShadow",value:function(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}},{key:"play",value:function(){this.paused=!1}},{key:"pause",value:function(){this.paused=!0}}]),n}(at)),ut=function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rr_dataURL=null,e.canvasMutations=[],e}return(0,s.Z)(n,[{key:"getContext",value:function(){return null}}]),n}(at),ct=function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rules=[],e}return(0,s.Z)(n)}(at),lt=function(e){(0,V.Z)(n,e);var t=(0,B.Z)(n);function n(e,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e)).contentDocument=new it,i.contentDocument.mirror=r,i}return(0,s.Z)(n)}(at),dt=He(je),ft=We(je),ht=Ue(je);function pt(e,t,n,r){var i,o;switch(e.nodeType){case qe.DOCUMENT_NODE:r&&"IFRAME"===r.nodeName?i=r.contentDocument:(i=t).compatMode=e.compatMode;break;case qe.DOCUMENT_TYPE_NODE:var a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break;case qe.ELEMENT_NODE:for(var s=e,u=(o=s)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),c=i=t.createElement(u),l=0,d=Array.from(s.attributes);l<d.length;l++){var f=d[l],h=f.name,p=f.value;c.attributes[h]=p}s.scrollLeft&&(c.scrollLeft=s.scrollLeft),s.scrollTop&&(c.scrollTop=s.scrollTop);break;case qe.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case qe.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case qe.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case qe.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}var v=n.getMeta(e);return t instanceof it&&(v||(v=yt(i,t.unserializedId),n.add(e,v)),t.mirror.add(i,Object.assign({},v))),i}function vt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Re,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new it;return function e(r,i){var o=pt(r,n,t,i);if(null!==o)if("IFRAME"!==(null===i||void 0===i?void 0:i.nodeName)&&r.nodeType!==qe.DOCUMENT_FRAGMENT_NODE&&(null===i||void 0===i||i.appendChild(o),o.parentNode=i,o.parentElement=i),"IFRAME"===r.nodeName){var a=r.contentDocument;a&&e(a,o)}else r.nodeType!==qe.DOCUMENT_NODE&&r.nodeType!==qe.ELEMENT_NODE&&r.nodeType!==qe.DOCUMENT_FRAGMENT_NODE||(r.nodeType===qe.ELEMENT_NODE&&r.shadowRoot&&e(r.shadowRoot,o),r.childNodes.forEach((function(t){return e(t,o)})))}(e,null),n}var mt=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function yt(e,t){switch(e.RRNodeType){case ve.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case ve.DocumentType:var n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case ve.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case ve.Text:case ve.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case ve.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function gt(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map((function(e){e(n)})),(r=e.get("*"))&&r.slice().map((function(e){e(t,n)}))}}}function bt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,"undefined"===typeof e?this.scrollLeft:~~e,"undefined"===typeof t?this.scrollTop:~~t)}else{if("number"===typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=function(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function u(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!==typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=l(e,"Y")&&d(e,"Y"),n=l(e,"X")&&d(e,"X");return t||n}function h(t){var n,r,o,s,u=(a()-t.startTime)/i;s=u=u>1?1:u,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,r,i){var s,c,l,d,f=a();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,l=e.scrollY||e.pageYOffset,d=o.scroll):(s=n,c=n.scrollLeft,l=n.scrollTop,d=u),h({scrollable:s,method:d,startTime:f,startX:c,startY:l,x:r,y:i})}}var wt,kt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,a.Z)(this,e),this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n.speed}return(0,s.Z)(e,[{key:"addAction",value:function(e){var t=!0===this.raf;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{var n=this.findActionIndex(e);this.actions.splice(n,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}},{key:"start",value:function(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}},{key:"rafCheck",value:function(){var e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){var t=this.actions[0];if(!(this.timeOffset>=t.delay))break;this.actions.shift(),t.doAction()}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}},{key:"clear",value:function(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}},{key:"setSpeed",value:function(e){this.speed=e}},{key:"isActive",value:function(){return null!==this.raf}},{key:"findActionIndex",value:function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r+1;n=r-1}}return t}}]),e}();function St(e,t){if(e.type===ke.tw.IncrementalSnapshot&&e.data.source===ke.yh.MouseMove&&e.data.positions&&e.data.positions.length){var n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}function Et(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(wt||(wt={}));var xt={type:"xstate.init"};function It(e){return void 0===e?[]:[].concat(e)}function Ct(e){return{type:"xstate.assign",assignment:e}}function Mt(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function Tt(e){return function(t){return e===t}}function _t(e){return"string"==typeof e?{type:e}:e}function At(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Tt(e)}}function Nt(e,t,n){var r=t,i=!1;return[e.filter((function(e){if("xstate.assign"===e.type){i=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(i){t[i]="function"==typeof e.assignment[i]?e.assignment[i](r,n):e.assignment[i]})),r=t,!1}return!0})),r,i]}function Rt(e,t){void 0===t&&(t={});var n=Et(Nt(It(e.states[e.initial].entry).map((function(e){return Mt(e,t.actions)})),e.context,xt),2),r=n[0],i=n[1],o={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Tt(e.initial)},transition:function(t,n){var r,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,u=a.context,c=_t(n),l=e.states[s];if(l.on){var d=It(l.on[c.type]);try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),h=f.next();!h.done;h=f.next()){var p=h.value;if(void 0===p)return At(s,u);var v="string"==typeof p?{target:p}:p,m=v.target,y=v.actions,g=void 0===y?[]:y,b=v.cond,w=void 0===b?function(){return!0}:b,k=void 0===m,S=null!=m?m:s,E=e.states[S];if(w(u,c)){var x=Et(Nt((k?It(g):[].concat(l.exit,g,E.entry).filter((function(e){return e}))).map((function(e){return Mt(e,o._options.actions)})),u,c),3),I=x[0],C=x[1],M=x[2],T=null!=m?m:s;return{value:T,context:C,actions:I,changed:m!==s||I.length>0||M,matches:Tt(T)}}}}catch(Et){r={error:Et}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}return At(s,u)}};return o}var Dt=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function Ot(e){var t=e.initialState,n=wt.NotStarted,r=new Set,i={_machine:e,send:function(i){n===wt.Running&&(t=e.transition(t,i),Dt(t,_t(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var o="object"==typeof r?r:{context:e.config.context,value:r};t={value:o.value,actions:[],context:o.context,matches:Tt(o.value)}}return n=wt.Running,Dt(t,xt),i},stop:function(){return n=wt.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function Lt(e,t){var n=t.getCastFn,r=t.applyEventsSynchronously,i=t.emitter,o=Rt({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ct({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:Ct((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),Object.assign(Object.assign({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,o=e.timer,a=e.events,s=e.baselineTime,u=e.lastPlayedEvent;o.clear();var c,l=(0,W.Z)(a);try{for(l.s();!(c=l.n()).done;){St(c.value,s)}}catch(y){l.e(y)}finally{l.f()}var d=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===ke.tw.Meta&&r.timestamp<=t)return e.slice(n)}return e}(a,s),f=null===u||void 0===u?void 0:u.timestamp;(null===u||void 0===u?void 0:u.type)===ke.tw.IncrementalSnapshot&&u.data.source===ke.yh.MouseMove&&(f=u.timestamp+(null===(t=u.data.positions[0])||void 0===t?void 0:t.timeOffset)),s<(f||0)&&i.emit(ke.SA.PlayBack);var h,p=new Array,v=(0,W.Z)(d);try{var m=function(){var e=h.value;if(f&&f<s&&(e.timestamp<=f||e===u))return 1;if(e.timestamp<s)p.push(e);else{var t=n(e,!1);o.addAction({doAction:function(){t()},delay:e.delay})}};for(v.s();!(h=v.n()).done;)m()}catch(y){v.e(y)}finally{v.f()}r(p),i.emit(ke.SA.Flush),o.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:Ct((function(e){return Object.assign(Object.assign({},e),{lastPlayedEvent:null})})),startLive:Ct({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:Ct((function(e,t){var r=e.baselineTime,i=e.timer,o=e.events;if("ADD_EVENT"===t.type){var a=t.payload.event;St(a,r);var s=o.length-1;if(!o[s]||o[s].timestamp<=a.timestamp)o.push(a);else{for(var u=-1,c=0;c<=s;){var l=Math.floor((c+s)/2);o[l].timestamp<=a.timestamp?c=l+1:s=l-1}-1===u&&(u=c),o.splice(u,0,a)}var d=a.timestamp<r,f=n(a,d);d?f():i.isActive()&&i.addAction({doAction:function(){f()},delay:a.delay})}return Object.assign(Object.assign({},e),{events:o})}))}});return Ot(o)}var Zt=n(1737),Ft=n(5647),Pt=n(3464),jt=new Map;function Vt(e,t){var n=jt.get(e);return n||(n=new Map,jt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function Bt(e,n,r){var i=this;return function(o){return(0,_e.m)(i,void 0,void 0,(0,t.Z)().mark((function i(){var a,s,u,c,l,d,f,h,p,v,m;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o||"object"!==typeof o||!("rr_type"in o)){t.next=55;break}if(r&&(r.isUnchanged=!1),"ImageBitmap"!==o.rr_type||!("args"in o)){t.next=11;break}return t.next=5,Bt(e,n,r)(o.args);case 5:return a=t.sent,t.next=8,createImageBitmap.apply(null,a);case 8:return t.abrupt("return",t.sent);case 11:if(!("index"in o)){t.next=18;break}if(!r&&null!==n){t.next=14;break}return t.abrupt("return",o);case 14:return s=o.rr_type,u=o.index,t.abrupt("return",Vt(n,s)[u]);case 18:if(!("args"in o)){t.next=31;break}return c=o.rr_type,l=o.args,d=window[c],t.t0=Ft.Z,t.t1=d,t.t2=x.Z,t.next=26,Promise.all(l.map(Bt(e,n,r)));case 26:return t.t3=t.sent,t.t4=(0,t.t2)(t.t3),t.abrupt("return",(0,t.t0)(t.t1,t.t4));case 31:if(!("base64"in o)){t.next=35;break}return t.abrupt("return",(0,Pt.J)(o.base64));case 35:if(!("src"in o)){t.next=47;break}if(!(f=e.get(o.src))){t.next=41;break}return t.abrupt("return",f);case 41:return(h=new Image).src=o.src,e.set(o.src,h),t.abrupt("return",h);case 45:t.next=53;break;case 47:if(!("data"in o)||"Blob"!==o.rr_type){t.next=53;break}return t.next=50,Promise.all(o.data.map(Bt(e,n,r)));case 50:return p=t.sent,v=new Blob(p,{type:o.type}),t.abrupt("return",v);case 53:t.next=60;break;case 55:if(!Array.isArray(o)){t.next=60;break}return t.next=58,Promise.all(o.map(Bt(e,n,r)));case 58:return m=t.sent,t.abrupt("return",m);case 60:return t.abrupt("return",o);case 61:case"end":return t.stop()}}),i)})))}}function Ht(e,t){try{return t===ke.FX.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(xt){return null}}var Wt=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ut(e,t){if(null===t||void 0===t?void 0:t.constructor){var n=t.constructor.name;if(Wt.includes(n)){var r=Vt(e,n);r.includes(t)||r.push(t)}}}function qt(e){var n=e.mutation,r=e.target,i=e.type,o=e.imageMap,a=e.errorHandler;return(0,_e.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=Ht(r,i)){e.next=4;break}return e.abrupt("return");case 4:if(!n.setter){e.next=7;break}return s[n.property]=n.args[0],e.abrupt("return");case 7:return u=s[n.property],e.next=10,Promise.all(n.args.map(Bt(o,s)));case 10:c=e.sent,l=u.apply(s,c),Ut(s,l),!1,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),a(n,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}function zt(e){var n=e.event,r=e.mutations,i=e.target,o=e.imageMap,a=e.errorHandler;return(0,_e.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=i.getContext("2d")){e.next=4;break}return a(r[0],new Error("Canvas context is null")),e.abrupt("return");case 4:return u=r.map((function(e){return(0,_e.m)(c,void 0,void 0,(0,t.Z)().mark((function n(){return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e.args.map(Bt(o,s))));case 1:case"end":return t.stop()}}),n)})))})),e.next=7,Promise.all(u);case 7:e.sent.forEach((function(e,t){var i=r[t];try{if(i.setter)return void(s[i.property]=i.args[0]);var u=s[i.property];"drawImage"===i.property&&"string"===typeof i.args[0]?(o.get(n),u.apply(s,i.args)):u.apply(s,e)}catch(c){a(i,c)}}));case 9:case"end":return e.stop()}}),e)})))}function Gt(e){var n=e.event,r=e.mutation,i=e.target,o=e.imageMap,a=e.canvasEventMap,s=e.errorHandler;return(0,_e.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var u,c,l,d;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,u=a.get(n)||r,c="commands"in u?u.commands:[u],![ke.FX.WebGL,ke.FX.WebGL2].includes(r.type)){e.next=13;break}l=0;case 5:if(!(l<c.length)){e.next=12;break}return d=c[l],e.next=9,qt({mutation:d,type:r.type,target:i,imageMap:o,errorHandler:s});case 9:l++,e.next=5;break;case 12:return e.abrupt("return");case 13:return e.next=15,zt({event:n,mutations:c,target:i,imageMap:o,errorHandler:s});case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),s(r,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}var $t=function(){function e(t){var n=this;(0,a.Z)(this,e),this.mediaMap=new Map,this.metadataCallbackMap=new Map,this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(ke.SA.Start,this.start.bind(this)),this.emitter.on(ke.SA.SkipStart,this.start.bind(this)),this.emitter.on(ke.SA.Pause,this.pause.bind(this)),this.emitter.on(ke.SA.Finish,this.pause.bind(this)),this.speedService.subscribe((function(){n.syncAllMediaElements()}))}return(0,s.Z)(e,[{key:"syncAllMediaElements",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pause:!1};this.mediaMap.forEach((function(n,r){e.syncTargetWithState(r),t.pause&&r.pause()}))}},{key:"start",value:function(){this.syncAllMediaElements()}},{key:"pause",value:function(){this.syncAllMediaElements({pause:!0})}},{key:"seekTo",value:function(e){var t=e.time,n=e.target,r=e.mediaState;if(r.isPlaying){var i=(t-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in n&&n.duration;if(Number.isNaN(o))return void this.waitForMetadata(n);var a=r.currentTimeAtLastInteraction+i;n.loop&&!1!==o&&(a%=o),n.currentTime=a}else n.pause(),n.currentTime=r.currentTimeAtLastInteraction}},{key:"waitForMetadata",value:function(e){var t=this;if(!this.metadataCallbackMap.has(e)&&"addEventListener"in e){var n=function(){t.metadataCallbackMap.delete(e);var n=t.mediaMap.get(e);n&&t.seekTo({time:t.getCurrentTime(),target:e,mediaState:n})};this.metadataCallbackMap.set(e,n),e.addEventListener("loadedmetadata",n,{once:!0})}}},{key:"getMediaStateFromMutation",value:function(e){var t,n,r,i,o,a=e.target,s=e.timeOffset,u=e.mutation,c=this.mediaMap.get(a),l=u.type,d=u.playbackRate,f=u.currentTime,h=u.muted,p=u.volume,v=u.loop;return{isPlaying:0===l||1!==l&&((null===c||void 0===c?void 0:c.isPlaying)||null!==a.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(t=null!==f&&void 0!==f?f:null===c||void 0===c?void 0:c.currentTimeAtLastInteraction)&&void 0!==t?t:0,lastInteractionTimeOffset:s,playbackRate:null!==(n=null!==d&&void 0!==d?d:null===c||void 0===c?void 0:c.playbackRate)&&void 0!==n?n:1,volume:null!==(r=null!==p&&void 0!==p?p:null===c||void 0===c?void 0:c.volume)&&void 0!==r?r:1,muted:null!==(i=null!==h&&void 0!==h?h:null===c||void 0===c?void 0:c.muted)&&void 0!==i?i:null===a.getAttribute("muted"),loop:null!==(o=null!==v&&void 0!==v?v:null===c||void 0===c?void 0:c.loop)&&void 0!==o?o:null===a.getAttribute("loop")}}},{key:"syncTargetWithState",value:function(e){var t=this.mediaMap.get(e);if(t){var n=t.muted,r=t.loop,i=t.volume,o=t.isPlaying,a=this.service.state.matches("paused"),s=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==i&&(e.volume=i),e.muted=n,e.loop=r,e.playbackRate!==s&&(e.playbackRate=s),o&&!a?e.play():e.pause()}catch(u){this.warn("Failed to replay media interactions: ".concat(u.message||u))}}}},{key:"addMediaElements",value:function(e,t,n){if(["AUDIO","VIDEO"].includes(e.nodeName)){var r=e,i=n.getMeta(r);if(i&&"attributes"in i){var o=this.service.state.matches("paused"),a=i.attributes,s=!1;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==r.getAttribute("autoplay"))&&o&&r.pause();var u=1;"number"===typeof a.rr_mediaPlaybackRate&&(u=a.rr_mediaPlaybackRate);var c=!1;c="boolean"===typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==r.getAttribute("muted");var l=!1;l="boolean"===typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==r.getAttribute("loop");var d=1;"number"===typeof a.rr_mediaVolume&&(d=a.rr_mediaVolume);var f=0;"number"===typeof a.rr_mediaCurrentTime&&(f=a.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:s,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:t,playbackRate:u,volume:d,muted:c,loop:l}),this.syncTargetWithState(r)}}}},{key:"mediaMutation",value:function(e){var t=e.target,n=e.timeOffset,r=e.mutation;this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:n,mutation:r})),this.syncTargetWithState(t)}},{key:"isSupportedMediaElement",value:function(e){return["AUDIO","VIDEO"].includes(e.nodeName)}},{key:"reset",value:function(){this.mediaMap.clear()}}]),e}(),Yt=gt||e,Qt="[replayer]",Xt={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Kt(e){return e.type==ke.tw.IncrementalSnapshot&&(e.data.source==ke.yh.TouchMove||e.data.source==ke.yh.MouseInteraction&&e.data.type==ke.Y2.TouchStart)}var Jt=function(){function e(t,n){var r=this;if((0,a.Z)(this,e),this.usingVirtualDom=!1,this.virtualDom=new it,this.mouseTail=null,this.tailPositions=[],this.emitter=Yt(),this.legacy_missingNodeRetryMap={},this.cache=(0,Ae.Df)(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=(0,Ae.bZ)(),this.styleMirror=new Zt.ug,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=function(e){r.iframe.style.display="inherit";for(var t=0,n=[r.mouseTail,r.iframe];t<n.length;t++){var i=n[t];i&&(i.setAttribute("width",String(e.width)),i.setAttribute("height",String(e.height)))}},this.applyEventsSynchronously=function(e){var t,n=(0,W.Z)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;switch(i.type){case ke.tw.DomContentLoaded:case ke.tw.Load:case ke.tw.Custom:continue;case ke.tw.FullSnapshot:case ke.tw.Meta:case ke.tw.Plugin:case ke.tw.IncrementalSnapshot:}r.getCastFn(i,!0)()}}catch(o){n.e(o)}finally{n.f()}},this.getCastFn=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.type){case ke.tw.DomContentLoaded:case ke.tw.Load:break;case ke.tw.Custom:t=function(){r.emitter.emit(ke.SA.CustomEvent,e)};break;case ke.tw.Meta:t=function(){return r.emitter.emit(ke.SA.Resize,{width:e.data.width,height:e.data.height})};break;case ke.tw.FullSnapshot:t=function(){var t;if(r.firstFullSnapshot){if(r.firstFullSnapshot===e)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.mediaManager.reset(),r.styleMirror.reset(),r.rebuildFullSnapshot(e,n),null===(t=r.iframe.contentWindow)||void 0===t||t.scrollTo(e.data.initialOffset)};break;case ke.tw.IncrementalSnapshot:t=function(){if(r.applyIncremental(e,n),!n&&(e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){var t,i=(0,W.Z)(r.service.state.context.events);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(!(o.timestamp<=e.timestamp)&&r.isUserInteraction(o)){o.delay-e.delay>r.config.inactivePeriodThreshold*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=o);break}}}catch(u){i.e(u)}finally{i.f()}if(r.nextUserInteractionEvent){var a=r.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/5e3),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:s}),r.emitter.emit(ke.SA.SkipStart,s)}}}}return function(){t&&t();var i,o=(0,W.Z)(r.config.plugins||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.handler&&a.handler(e,n,{replayer:r})}}catch(c){o.e(c)}finally{o.f()}r.service.send({type:"CAST_EVENT",payload:{event:e}});var s=r.service.state.context.events.length-1;if(!r.config.liveMode&&e===r.service.state.context.events[s]){var u=50;e.type===ke.tw.IncrementalSnapshot&&e.data.source===ke.yh.MouseMove&&e.data.positions.length&&(u+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout((function(){s<r.service.state.context.events.length-1||(r.backToNormal(),r.service.send("END"),r.emitter.emit(ke.SA.Finish))}),u)}r.emitter.emit(ke.SA.EventCast,e)}},!(null===n||void 0===n?void 0:n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Xt,useVirtualDom:!0,logger:console};this.config=Object.assign({},i,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(ke.SA.Resize,this.handleResize),this.setupDom();var o,s=(0,W.Z)(this.config.plugins||[]);try{for(s.s();!(o=s.n()).done;){var u=o.value;u.getMirror&&u.getMirror({nodeMirror:this.mirror})}}catch(v){s.e(v)}finally{s.f()}this.emitter.on(ke.SA.Flush,(function(){if(r.usingVirtualDom){var e={mirror:r.mirror,applyCanvas:function(e,t,n){Gt({event:e,mutation:t,target:n,imageMap:r.imageMap,canvasEventMap:r.canvasEventMap,errorHandler:r.warnCanvasMutationFailed.bind(r)})},applyInput:r.applyInput.bind(r),applyScroll:r.applyScroll.bind(r),applyStyleSheetMutation:function(e,t){e.source===ke.yh.StyleSheetRule?r.applyStyleSheetRule(e,t):e.source===ke.yh.StyleDeclaration&&r.applyStyleDeclaration(e,t)},afterAppend:function(e,t){var n,i=(0,W.Z)(r.config.plugins||[]);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.onBuild&&o.onBuild(e,{id:t,replayer:r})}}catch(v){i.e(v)}finally{i.f()}}};if(r.iframe.contentDocument)try{Je(r.iframe.contentDocument,r.virtualDom,e,r.virtualDom.mirror)}catch(xt){console.warn(xt)}if(r.virtualDom.destroyTree(),r.usingVirtualDom=!1,Object.keys(r.legacy_missingNodeRetryMap).length)for(var t in r.legacy_missingNodeRetryMap)try{var n=r.legacy_missingNodeRetryMap[t],i=tt(n.node,r.mirror,r.virtualDom.mirror);Je(i,n.node,e,r.virtualDom.mirror),n.node=i}catch(u){r.warn(u)}r.constructedStyleMutations.forEach((function(e){r.applyStyleSheetMutation(e)})),r.constructedStyleMutations=[],r.adoptedStyleSheets.forEach((function(e){r.applyAdoptedStyleSheet(e)})),r.adoptedStyleSheets=[]}if(r.mousePos&&(r.moveAndHover(r.mousePos.x,r.mousePos.y,r.mousePos.id,!0,r.mousePos.debugData),r.mousePos=null),!0===r.touchActive?r.mouse.classList.add("touch-active"):!1===r.touchActive&&r.mouse.classList.remove("touch-active"),r.touchActive=null,r.lastMouseDownEvent){var o=(0,Te.Z)(r.lastMouseDownEvent,2),a=o[0],s=o[1];a.dispatchEvent(s)}r.lastMouseDownEvent=null,r.lastSelectionData&&(r.applySelection(r.lastSelectionData),r.lastSelectionData=null)})),this.emitter.on(ke.SA.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset(),r.styleMirror.reset(),r.mediaManager.reset()}));var c=new kt([],{speed:this.config.speed});this.service=Lt({events:t.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:c,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(ke.SA.StateChange,{player:e})})),this.speedService=Ot(Rt({id:"speed",context:{normalSpeed:-1,timer:c},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:Ct({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(ke.SA.StateChange,{speed:e})})),this.mediaManager=new $t({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var l=this.service.state.context.events.find((function(e){return e.type===ke.tw.Meta})),d=this.service.state.context.events.find((function(e){return e.type===ke.tw.FullSnapshot}));if(l){var f=l.data,h=f.width,p=f.height;setTimeout((function(){r.emitter.emit(ke.SA.Resize,{width:h,height:p})}),0)}d&&setTimeout((function(){var e;r.firstFullSnapshot||(r.firstFullSnapshot=d,r.rebuildFullSnapshot(d),null===(e=r.iframe.contentWindow)||void 0===e||e.scrollTo(d.data.initialOffset))}),1),this.service.state.context.events.find(Kt)&&this.mouse.classList.add("touch-device")}return(0,s.Z)(e,[{key:"timer",get:function(){return this.service.state.context.timer}},{key:"on",value:function(e,t){return this.emitter.on(e,t),this}},{key:"off",value:function(e,t){return this.emitter.off(e,t),this}},{key:"setConfig",value:function(e){var t=this;Object.keys(e).forEach((function(n){e[n],t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal(),"undefined"!==typeof e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),"undefined"!==typeof e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}},{key:"getMetaData",value:function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}},{key:"getCurrentTime",value:function(){return this.timer.timeOffset+this.getTimeOffset()}},{key:"getTimeOffset",value:function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp}},{key:"getMirror",value:function(){return this.mirror}},{key:"play",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:n}}),null===(t=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.getElementsByTagName("html")[0])||void 0===t||t.classList.remove("rrweb-paused"),this.emitter.emit(ke.SA.Start)}},{key:"pause",value:function(e){var t,n;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"===typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(n=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.getElementsByTagName("html")[0])||void 0===n||n.classList.add("rrweb-paused"),this.emitter.emit(ke.SA.Pause)}},{key:"resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(ke.SA.Resume)}},{key:"destroy",value:function(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(ke.SA.Destroy)}},{key:"startLive",value:function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}},{key:"addEvent",value:function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Kt(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))}},{key:"enableInteract",value:function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}},{key:"disableInteract",value:function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}},{key:"resetCache",value:function(){this.cache=(0,Ae.Df)()}},{key:"setupDom",value:function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(bt(this.iframe.contentWindow,this.iframe.contentDocument),(0,Zt.OK)(this.iframe.contentWindow))}},{key:"rebuildFullSnapshot",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var r=[],i=function(n,i){if(t.collectIframeAndAttachDocument(r,n),t.mediaManager.isSupportedMediaElement(n)){var o=t.service.state.context.events;t.mediaManager.addMediaElements(n,e.timestamp-o[0].timestamp,t.mirror)}var a,s=(0,W.Z)(t.config.plugins||[]);try{for(s.s();!(a=s.n()).done;){var u=a.value;u.onBuild&&u.onBuild(n,{id:i,replayer:t})}}catch(c){s.e(c)}finally{s.f()}};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),(0,Ae.VU)(e.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror}),i(this.iframe.contentDocument,e.data.node.id);for(var o=function(){var e=s[a],n=e.mutationInQueue,r=e.builtNode;t.attachDocumentToIframe(n,r),t.newDocumentQueue=t.newDocumentQueue.filter((function(e){return e!==n}))},a=0,s=r;a<s.length;a++)o();var u=this.iframe.contentDocument,c=u.documentElement,l=u.head;this.insertStyleRules(c,l),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(ke.SA.FullsnapshotRebuilded,e),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}},{key:"insertStyleRules",value:function(e,t){var n,r,i=(r=this.config.blockClass,[".".concat(r," { background: currentColor }"),"noscript { display: none !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,yt(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:ke.yh.StyleSheetRule,adds:i.map((function(e,t){return{rule:e,index:t}}))})}else{var a=document.createElement("style");e.insertBefore(a,t);for(var s=0;s<i.length;s++)null===(n=a.sheet)||void 0===n||n.insertRule(i[s],s)}}},{key:"attachDocumentToIframe",value:function(e,t){var n=this,r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=function(e,o){n.collectIframeAndAttachDocument(i,e);var a=r.getMeta(e);if((null===a||void 0===a?void 0:a.type)===Ae.Jq.Element&&"HTML"===(null===a||void 0===a?void 0:a.tagName.toUpperCase())){var s=t.contentDocument,u=s.documentElement,c=s.head;n.insertStyleRules(u,c)}if(!n.usingVirtualDom){var l,d=(0,W.Z)(n.config.plugins||[]);try{for(d.s();!(l=d.n()).done;){var f=l.value;f.onBuild&&f.onBuild(e,{id:o,replayer:n})}}catch(h){d.e(h)}finally{d.f()}}};(0,Ae.GQ)(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(var a=function(){var e=u[s],t=e.mutationInQueue,r=e.builtNode;n.attachDocumentToIframe(t,r),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==t}))},s=0,u=i;s<u.length;s++)a()}},{key:"collectIframeAndAttachDocument",value:function(e,t){var n=this;if((0,Zt.Cj)(t,this.mirror)){var r=this.newDocumentQueue.find((function(e){return e.parentId===n.mirror.getId(t)}));r&&e.push({mutationInQueue:r,builtNode:t})}}},{key:"waitForStylesheetLoad",value:function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(ke.SA.Start,a),this.emitter.on(ke.SA.Pause,a);var s=function(){t.emitter.off(ke.SA.Start,a),t.emitter.off(ke.SA.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(ke.SA.LoadStylesheetEnd),r&&clearTimeout(r),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(ke.SA.LoadStylesheetStart),r=setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}}},{key:"preloadAllImages",value:function(){return(0,_e.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var n,r,i,o,a,s=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.service.state,n=function(){s.service.state},this.emitter.on(ke.SA.Start,n),this.emitter.on(ke.SA.Pause,n),r=[],i=(0,W.Z)(this.service.state.context.events),e.prev=6,a=(0,t.Z)().mark((function e(){var n;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=o.value).type===ke.tw.IncrementalSnapshot&&n.data.source===ke.yh.CanvasMutation&&(r.push(s.deserializeAndPreloadCanvasEvents(n.data,n)),("commands"in n.data?n.data.commands:[n.data]).forEach((function(e){s.preloadImages(e,n)})));case 2:case"end":return e.stop()}}),e)})),i.s();case 9:if((o=i.n()).done){e.next=13;break}return e.delegateYield(a(),"t0",11);case 11:e.next=9;break;case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),i.e(e.t1);case 18:return e.prev=18,i.f(),e.finish(18);case 21:return e.abrupt("return",Promise.all(r));case 22:case"end":return e.stop()}}),e,this,[[6,15,18,21]])})))}},{key:"preloadImages",value:function(e,t){if("drawImage"===e.property&&"string"===typeof e.args[0]&&!this.imageMap.has(t)){var n=document.createElement("canvas"),r=n.getContext("2d"),i=null===r||void 0===r?void 0:r.createImageData(n.width,n.height);null===i||void 0===i||i.data,JSON.parse(e.args[0]),null===r||void 0===r||r.putImageData(i,0,0)}}},{key:"deserializeAndPreloadCanvasEvents",value:function(e,n){return(0,_e.m)(this,void 0,void 0,(0,t.Z)().mark((function r(){var i,o,a,s=this;return(0,t.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.canvasEventMap.has(n)){r.next=13;break}if(i={isUnchanged:!0},!("commands"in e)){r.next=9;break}return r.next=5,Promise.all(e.commands.map((function(e){return(0,_e.m)(s,void 0,void 0,(0,t.Z)().mark((function n(){var r;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.args.map(Bt(this.imageMap,null,i)));case 2:return r=t.sent,t.abrupt("return",Object.assign(Object.assign({},e),{args:r}));case 4:case"end":return t.stop()}}),n,this)})))})));case 5:o=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{commands:o})),r.next=13;break;case 9:return r.next=11,Promise.all(e.args.map(Bt(this.imageMap,null,i)));case 11:a=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{args:a}));case 13:case"end":return r.stop()}}),r,this)})))}},{key:"applyIncremental",value:function(e,t){var n,r,i,o=this,a=e.data;switch(a.source){case ke.yh.Mutation:try{this.applyMutation(a,t)}catch(b){this.warn("Exception in mutation ".concat(b.message||b),a)}break;case ke.yh.Drag:case ke.yh.TouchMove:case ke.yh.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(n){var r={doAction:function(){o.moveAndHover(n.x,n.y,n.id,t,a)},delay:n.timeOffset+e.timestamp-o.service.state.context.baselineTime};o.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case ke.yh.MouseInteraction:if(-1===a.id)break;var u=new Event((0,Ae.UR)(ke.Y2[a.type])),c=this.mirror.getNode(a.id);if(!c)return this.debugNodeNotFound(a,a.id);this.emitter.emit(ke.SA.MouseInteraction,{type:a.type,target:c});var l=this.config.triggerFocus;switch(a.type){case ke.Y2.Blur:"blur"in c&&c.blur();break;case ke.Y2.Focus:l&&c.focus&&c.focus({preventScroll:!0});break;case ke.Y2.Click:case ke.Y2.TouchStart:case ke.Y2.TouchEnd:case ke.Y2.MouseDown:case ke.Y2.MouseUp:t?(a.type===ke.Y2.TouchStart?this.touchActive=!0:a.type===ke.Y2.TouchEnd&&(this.touchActive=!1),a.type===ke.Y2.MouseDown?this.lastMouseDownEvent=[c,u]:a.type===ke.Y2.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===ke.Y2.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,t,a),a.type===ke.Y2.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===ke.Y2.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===ke.Y2.TouchEnd?this.mouse.classList.remove("touch-active"):c.dispatchEvent(u));break;case ke.Y2.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(u)}break;case ke.yh.Scroll:if(-1===a.id)break;if(this.usingVirtualDom){var d=this.virtualDom.mirror.getNode(a.id);if(!d)return this.debugNodeNotFound(a,a.id);d.scrollData=a;break}this.applyScroll(a,t);break;case ke.yh.ViewportResize:this.emitter.emit(ke.SA.Resize,{width:a.width,height:a.height});break;case ke.yh.Input:if(-1===a.id)break;if(this.usingVirtualDom){var f=this.virtualDom.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);f.inputData=a;break}this.applyInput(a);break;case ke.yh.MediaInteraction:var h=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!h)return this.debugNodeNotFound(a,a.id);var p=h,v=this.service.state.context.events;this.mediaManager.mediaMutation({target:p,timeOffset:e.timestamp-v[0].timestamp,mutation:a});break;case ke.yh.StyleSheetRule:case ke.yh.StyleDeclaration:this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&(null===(r=this.virtualDom.mirror.getNode(a.id))||void 0===r||r.rules.push(a)):this.applyStyleSheetMutation(a);break;case ke.yh.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var m=this.virtualDom.mirror.getNode(a.id);if(!m)return this.debugNodeNotFound(a,a.id);m.canvasMutations.push({event:e,mutation:a})}else{var y=this.mirror.getNode(a.id);if(!y)return this.debugNodeNotFound(a,a.id);Gt({event:e,mutation:a,target:y,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case ke.yh.Font:try{var g=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(g)}catch(b){this.warn(b)}break;case ke.yh.Selection:if(t){this.lastSelectionData=a;break}this.applySelection(a);break;case ke.yh.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a)}}},{key:"applyMutation",value:function(e,t){var n=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,vt(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(var r in this.legacy_missingNodeRetryMap)try{var i=this.legacy_missingNodeRetryMap[r],o=pt(i.node,this.virtualDom,this.mirror);o&&(i.node=o)}catch(v){this.warn(v)}var a=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter((function(t){return!!a.getNode(t.id)||(n.warnNodeNotFound(e,t.id),!1)})),e.removes.forEach((function(t){var r,i=a.getNode(t.id);if(i){var o=a.getNode(t.parentId);if(!o)return n.warnNodeNotFound(e,t.parentId);if(t.isShadow&&(0,Zt.He)(o)&&(o=o.shadowRoot),a.removeNodeFromMap(i),o)try{o.removeChild(i),n.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===o.nodeName&&(null===(r=o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}catch(v){if(!(v instanceof DOMException))throw v;n.warn("parent could not remove child in mutation",o,i,e)}}}));var s=Object.assign({},this.legacy_missingNodeRetryMap),u=[],c=function(e){var t,r;if(!n.iframe.contentDocument)return n.warn("Looks like your replayer has been destroyed.");var i=a.getNode(e.parentId);if(!i)return e.node.type===Ae.Jq.Document?n.newDocumentQueue.push(e):u.push(e);e.node.isShadow&&((0,Zt.He)(i)||i.attachShadow({mode:"open"}),i=i.shadowRoot);var o=null,c=null;if(e.previousId&&(o=a.getNode(e.previousId)),e.nextId&&(c=a.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=a.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return u.push(e);if(!e.node.rootId||a.getNode(e.node.rootId)){var l=e.node.rootId?a.getNode(e.node.rootId):n.usingVirtualDom?n.virtualDom:n.iframe.contentDocument;if((0,Zt.Cj)(i,a))n.attachDocumentToIframe(e,i);else{var d=function(e,t){if(!n.usingVirtualDom){var r,i=(0,W.Z)(n.config.plugins||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.onBuild&&o.onBuild(e,{id:t,replayer:n})}}catch(a){i.e(a)}finally{i.f()}}},f=(0,Ae.GQ)(e.node,{doc:l,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache,afterAppend:d});if(-1!==e.previousId&&-1!==e.nextId){var h=a.getMeta(i);if(h&&h.type===Ae.Jq.Element&&"textarea"===h.tagName&&e.node.type===Ae.Jq.Text){var p,v=Array.isArray(i.childNodes)?i.childNodes:Array.from(i.childNodes),m=(0,W.Z)(v);try{for(m.s();!(p=m.n()).done;){var y=p.value;y.nodeType===i.TEXT_NODE&&i.removeChild(y)}}catch(k){m.e(k)}finally{m.f()}}else if((null===h||void 0===h?void 0:h.type)===Ae.Jq.Document){var g=i;e.node.type===Ae.Jq.DocumentType&&(null===(t=g.childNodes[0])||void 0===t?void 0:t.nodeType)===Node.DOCUMENT_TYPE_NODE&&g.removeChild(g.childNodes[0]),"HTML"===f.nodeName&&g.documentElement&&g.removeChild(g.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?i.insertBefore(f,o.nextSibling):c&&c.parentNode?i.contains(c)?i.insertBefore(f,c):i.insertBefore(f,null):i.appendChild(f),d(f,e.node.id),n.usingVirtualDom&&"#text"===f.nodeName&&"STYLE"===i.nodeName&&(null===(r=i.rules)||void 0===r?void 0:r.length)>0&&(i.rules=[]),(0,Zt.Cj)(f,n.mirror)){var b=n.mirror.getId(f),w=n.newDocumentQueue.find((function(e){return e.parentId===b}));w&&(n.attachDocumentToIframe(w,f),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==w})))}(e.previousId||e.nextId)&&n.legacy_resolveMissingNode(s,i,f,e)}else s[e.node.id]={node:f,mutation:e}}}};e.adds.forEach((function(e){c(e)}));for(var l=Date.now();u.length;){var d=(0,Zt.s6)(u);if(u.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}var f,h=(0,W.Z)(d);try{for(h.s();!(f=h.n()).done;){var p=f.value;a.getNode(p.value.parentId)?(0,Zt.Fn)(p,(function(e){c(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",p)}}catch(m){h.e(m)}finally{h.f()}}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),(0,Zt.E2)(e.texts).forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}if(i.textContent=t.value,n.usingVirtualDom){var o=i.parentNode;(null===(r=null===o||void 0===o?void 0:o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}})),e.attributes.forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}var o=function(){if("string"===typeof s){var e=t.attributes[s];if(null===e)i.removeAttribute(s);else if("string"===typeof e)try{if("_cssText"===s&&("LINK"===i.nodeName||"STYLE"===i.nodeName))try{var o=a.getMeta(i);Object.assign(o.attributes,t.attributes);var u=(0,Ae.GQ)(o,{doc:i.ownerDocument,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache}),c=i.nextSibling,l=i.parentNode;if(u&&l)return l.removeChild(i),l.insertBefore(u,c),a.replace(t.id,u),1}catch(xt){}if("value"===s&&"TEXTAREA"===i.nodeName){var d=i;d.childNodes.forEach((function(e){return d.removeChild(e)}));var f=null===(r=i.ownerDocument)||void 0===r?void 0:r.createTextNode(e);f&&d.appendChild(f)}else i.setAttribute(s,e)}catch(v){n.warn("An error occurred may due to the checkout feature.",v)}else if("style"===s){var h=e,p=i;for(var m in h)if(!1===h[m])p.style.removeProperty(m);else if(h[m]instanceof Array){var y=h[m];p.style.setProperty(m,y[0],y[1])}else{var g=h[m];p.style.setProperty(m,g)}}}};for(var s in t.attributes)if(o())break}))}},{key:"applyScroll",value:function(e,t){var n,r,i=this.mirror.getNode(e.id);if(!i)return this.debugNodeNotFound(e,e.id);var o=this.mirror.getMeta(i);if(i===this.iframe.contentDocument)null===(n=this.iframe.contentWindow)||void 0===n||n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((null===o||void 0===o?void 0:o.type)===Ae.Jq.Document)null===(r=i.defaultView)||void 0===r||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}},{key:"applyInput",value:function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(n){}}},{key:"applySelection",value:function(e){var t=this;try{var n=new Set,r=e.ranges.map((function(e){var r=e.start,i=e.startOffset,o=e.end,a=e.endOffset,s=t.mirror.getNode(r),u=t.mirror.getNode(o);if(s&&u){var c=new Range;c.setStart(s,i),c.setEnd(u,a);var l=s.ownerDocument,d=null===l||void 0===l?void 0:l.getSelection();return d&&n.add(d),{range:c,selection:d}}}));n.forEach((function(e){return e.removeAllRanges()})),r.forEach((function(e){var t;return e&&(null===(t=e.selection)||void 0===t?void 0:t.addRange(e.range))}))}catch(i){}}},{key:"applyStyleSheetMutation",value:function(e){var t,n=null;e.styleId?n=this.styleMirror.getStyle(e.styleId):e.id&&(n=(null===(t=this.mirror.getNode(e.id))||void 0===t?void 0:t.sheet)||null),n&&(e.source===ke.yh.StyleSheetRule?this.applyStyleSheetRule(e,n):e.source===ke.yh.StyleDeclaration&&this.applyStyleDeclaration(e,n))}},{key:"applyStyleSheetRule",value:function(e,t){var n,r,i,o;if(null===(n=e.adds)||void 0===n||n.forEach((function(e){var n=e.rule,r=e.index;try{if(Array.isArray(r)){var i=(0,Zt._X)(r),o=i.positions,a=i.index;(0,Zt.md)(t.cssRules,o).insertRule(n,a)}else{var s=void 0===r?void 0:Math.min(r,t.cssRules.length);null===t||void 0===t||t.insertRule(n,s)}}catch(xt){}})),null===(r=e.removes)||void 0===r||r.forEach((function(e){var n=e.index;try{if(Array.isArray(n)){var r=(0,Zt._X)(n),i=r.positions,o=r.index;(0,Zt.md)(t.cssRules,i).deleteRule(o||0)}else null===t||void 0===t||t.deleteRule(n)}catch(xt){}})),e.replace)try{null===(i=t.replace)||void 0===i||i.call(t,e.replace)}catch(xt){}if(e.replaceSync)try{null===(o=t.replaceSync)||void 0===o||o.call(t,e.replaceSync)}catch(xt){}}},{key:"applyStyleDeclaration",value:function(e,t){e.set&&(0,Zt.md)(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority);e.remove&&(0,Zt.md)(t.rules,e.index).style.removeProperty(e.remove.property)}},{key:"applyAdoptedStyleSheet",value:function(e){var t,n=this,r=this.mirror.getNode(e.id);if(r){null===(t=e.styles)||void 0===t||t.forEach((function(e){var t,i=null,o=null;if((0,Zt.He)(r)?o=(null===(t=r.ownerDocument)||void 0===t?void 0:t.defaultView)||null:"#document"===r.nodeName&&(o=r.defaultView),o)try{i=new o.CSSStyleSheet,n.styleMirror.add(i,e.styleId),n.applyStyleSheetRule({source:ke.yh.StyleSheetRule,adds:e.rules},i)}catch(xt){}}));var i=0;!function e(t,r){var o=r.map((function(e){return n.styleMirror.getStyle(e)})).filter((function(e){return null!==e}));(0,Zt.He)(t)?t.shadowRoot.adoptedStyleSheets=o:"#document"===t.nodeName&&(t.adoptedStyleSheets=o),o.length!==r.length&&i<10&&(setTimeout((function(){return e(t,r)}),0+100*i),i++)}(r,e.styleIds)}}},{key:"legacy_resolveMissingNode",value:function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var u=a.node,c=a.mutation;t.insertBefore(u,n),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(s){var l=s.node,d=s.mutation;t.insertBefore(l,n.nextSibling),delete e[d.node.id],delete this.legacy_missingNodeRetryMap[d.node.id],(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(e,t,l,d)}}},{key:"moveAndHover",value:function(e,t,n,r,i){var o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(i,n);var a=(0,Zt.vD)(o,this.iframe),s=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left="".concat(s,"px"),this.mouse.style.top="".concat(u,"px"),r||this.drawMouseTail({x:s,y:u}),this.hoverElements(o)}},{key:"drawMouseTail",value:function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?Xt:Object.assign({},Xt,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,o=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=r,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}}},{key:"hoverElements",value:function(e){var t;null===(t=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")})),this.lastHoveredRootNode=e.getRootNode();for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}},{key:"isUserInteraction",value:function(e){return e.type===ke.tw.IncrementalSnapshot&&(e.data.source>ke.yh.Mutation&&e.data.source<=ke.yh.Input)}},{key:"backToNormal",value:function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(ke.SA.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}},{key:"warnNodeNotFound",value:function(e,t){this.warn("Node with id '".concat(t,"' not found. "),e)}},{key:"warnCanvasMutationFailed",value:function(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}},{key:"debugNodeNotFound",value:function(e,t){this.debug("Node with id '".concat(t,"' not found. "),e)}},{key:"warn",value:function(){var e;if(this.config.showWarning){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).warn.apply(e,[Qt].concat(n))}}},{key:"debug",value:function(){var e;if(this.config.showDebug){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).log.apply(e,[Qt].concat(n))}}}]),e}(),en=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.events=[],this.castedEvents=[],this.isLive=!0,this.liveEvents=void 0,this.currentTraveledTimestamp=void 0,this.replayer=void 0,this.onEventCast=void 0,this.config={enableInteract:!1},this.useTimestampCompression=!0,this.startOptions=void 0,this.fastForward=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i,o,a,s,u,c,d,f=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f.length>1&&void 0!==f[1]&&f[1]||n.isLive){e.next=4;break}return(i=n.liveEvents).push.apply(i,(0,x.Z)(r)),e.abrupt("return");case 4:o=r.sort((function(e,t){return e.timestamp-t.timestamp})),n.useTimestampCompression&&(a=Date.now(),o=o.map((function(e,t){var r;return(0,l.Z)((0,l.Z)({},e),{},{timestamp:a+t,originalTimestamp:null!==(r=n.getOriginalTimestamp(e))&&void 0!==r?r:e.timestamp})}))),n.events=[].concat((0,x.Z)(n.events),(0,x.Z)(o)),s=new Promise((function(e){n.onEventCast=function(t){n.castedEvents.push(t),n.castedEvents.length===n.events.length&&(n.onEventCast=void 0,e())}})),u=(0,W.Z)(o);try{for(u.s();!(c=u.n()).done;)d=c.value,n.replayer.addEvent(d)}catch(t){u.e(t)}finally{u.f()}return e.abrupt("return",s);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.stop=function(){n.replayer.destroy()},this.getOriginalTimestamp=function(e){return e.originalTimestamp},this.getNodeById=function(e){return n.replayer.getMirror().getNode(e)},this.getMeta=function(e){return n.replayer.getMirror().getMeta(e)},this.config=(0,l.Z)((0,l.Z)({},this.config),i)}return(0,s.Z)(e,[{key:"start",value:function(e){var t=this;this.startOptions=e;var n=e.firstEventTimestamp,r=e.speed,i=void 0===r?8:r,o=e.useTimestampCompression,a=void 0===o||o;this.replayer=new Jt([],{mouseTail:!1,pauseAnimation:!1,speed:i,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0}),this.config.enableInteract?this.replayer.enableInteract():this.replayer.disableInteract(),this.useTimestampCompression=a,this.replayer.startLive(this.useTimestampCompression?Date.now():n),this.replayer.on("event-cast",(function(e){t.onEventCast&&t.onEventCast(e)}))}},{key:"goBack",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u=this,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).sleepAfter,o=void 0===i?1e3:i,a=r.beforeTimestamp,s=void 0!==a&&a,this.currentTraveledTimestamp!==n){e.next=3;break}return e.abrupt("return");case 3:return this.currentTraveledTimestamp=n,this.isLive&&(this.liveEvents=this.events),this.stop(),this.events=[],this.castedEvents=[],this.start(this.startOptions),this.isLive=!1,e.next=12,this.fastForward(this.liveEvents.filter((function(e){return s?u.getOriginalTimestamp(e)<n:u.getOriginalTimestamp(e)<=n})),!0);case 12:if(!o){e.next=15;break}return e.next=15,Ie()(o);case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"goLive",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>0&&void 0!==r[0]?r[0]:1e3,!this.isLive){e.next=3;break}return e.abrupt("return");case 3:return this.stop(),this.currentTraveledTimestamp=void 0,this.events=[],this.castedEvents=[],this.start(this.startOptions),this.isLive=!0,e.next=11,this.fastForward(this.liveEvents);case 11:if(!n){e.next=14;break}return e.next=14,Ie()(n);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),tn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.eventProcessor=void 0,this.sessionReplayer=void 0,this.eventHandlers=void 0,this.sessionReplayer=new en(t),this.eventProcessor=new Me.u({eventHandlers:new Se.E})}return(0,s.Z)(e,[{key:"setEventHandlers",value:function(e){this.eventHandlers=e,this.eventProcessor.setHandlers(this.eventHandlers)}},{key:"start",value:function(e){this.sessionReplayer.start(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.preCastEvent(n);case 2:return e.next=4,this.sessionReplayer.fastForward([n]);case 4:return e.next=6,this.eventProcessor.processEvent(n);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"skipEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.skipEvents(n);case 2:return e.next=4,this.sessionReplayer.fastForward(n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"stop",value:function(){this.sessionReplayer.stop()}}]),e}(),nn=function(e){(0,V.Z)(i,e);var n=(0,B.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).pageIdentifiers=void 0,e.elementSelector=new we,e.appSpecificRules=void 0,e.setEventHandlers(new Ce({sessionMirror:e.sessionReplayer,elementSelector:e.elementSelector})),e}return(0,s.Z)(i,[{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward;this.eventHandlers.setConfiguration({enableRecordingAvailableInteractableElements:t,useTextInputFastForward:n})}},{key:"setEvents",value:function(e){this.eventHandlers.setEvents(e)}},{key:"setOptions",value:function(e){this.elementSelector.setOptions({defaultExtractReducedHtmlAndSelector:e.extractReducedHTML,defaultInspectInteractableElements:e.inspectInteractables})}},{key:"setAppRules",value:function(e){this.appSpecificRules=e,this.elementSelector.setAppRules(e),this.eventHandlers.setAppRules(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Y.Z)((0,Q.Z)(i.prototype),"handleEvent",this).call(this,n);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),i}(tn),rn=n(4925),on=n(408),an=["aria-label","aria-labelledby","label","title","alt"];function sn(e){var t,n;return null!==(t=e._debugSource)&&void 0!==t&&t.fileName?null===(n=e._debugSource)||void 0===n?void 0:n.fileName:""}function un(e,t){if("Unknown"===e)return!1;if("string"!==typeof e)return!1;if(e[0]!==e[0].toUpperCase())return!1;if(t.type.$$typeof===Symbol.for("react.context")||t.type.$$typeof===Symbol.for("react.forward_ref")||t.type.$$typeof===Symbol.for("react.memo")||t.type.$$typeof===Symbol.for("react.profiler")||t.type.$$typeof===Symbol.for("react.suspense"))return!1;var n=sn(t);return!/.*\/node_modules\//.test(n)&&e!==n&&!/^(?!.*src).*$/.test(n)}function cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return["",{}];var n=e.type,r=n?n.name||n:"Unknown",i="";if(un(r,e)){i+="<".concat(r,">");var o=sn(e);t[r]=o}if(e.child){var a=cn(e.child,t),s=(0,Te.Z)(a,2),u=s[0],c=s[1];i+=u,t=(0,l.Z)((0,l.Z)({},t),c)}if(un(r,e)&&(i+="</".concat(r,">")),e.sibling){var d=cn(e.sibling,t),f=(0,Te.Z)(d,2),h=f[0],p=f[1];i+=h,t=(0,l.Z)((0,l.Z)({},t),p)}return[i,t]}function ln(e){var t,n=null===(t=e._reactRootContainer)||void 0===t?void 0:t._internalRoot.current;return n||console.log("No react tree in element",e),cn(n)}var dn=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"setPrefix",value:function(t){"false"!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TYPE:"script",REACT_APP_TEST_APP_NAME:"todo"}.REACT_APP_HIDE_LOGS&&["log","warn","error"].forEach((function(n){e.original[n]||(e.original[n]=console[n]),console[n]=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];i.unshift(t),e.original[n].apply(console,i)}}))}}]),e}();dn.original={};var fn,hn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.map((function(e){return e.target}))},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collectElement:!0};(0,a.Z)(this,e),this.filterElements=t,this.observeOptions=n,this.options=r,this.elements=void 0,this.observer=void 0,this.mutationEventListeners=[]}return(0,s.Z)(e,[{key:"addEventListener",value:function(e,t){this.mutationEventListeners.push({selector:e,listener:t})}},{key:"startListening",value:function(){var e=this;this.elements=[],this.observer=new MutationObserver((function(t){e.options.collectElement&&(e.elements=[].concat((0,x.Z)(e.elements),(0,x.Z)(e.filterElements(t)))),e.mutationEventListeners.length&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE){var n=t;e.mutationEventListeners.forEach((function(e){n.matches(e.selector)?e.listener(n):n.querySelectorAll(e.selector).forEach((function(t){e.listener(t)}))}))}}))}))})),this.observer.observe(document.body,this.observeOptions)}},{key:"stopListening",value:function(){return this.observer.disconnect(),this.elements}}]),e}();function pn(e){var t=e.filter((function(e){return e.addedNodes.length>0})).reduce((function(e,t){return[].concat((0,x.Z)(e),(0,x.Z)(t.addedNodes))}),[]),n=e.filter((function(e){return"attributes"===e.type&&"style"===e.attributeName&&e.target instanceof HTMLElement&&/display\s*:\s*none/.test(e.oldValue)&&(0,v.Zl)(e.target).visible})).map((function(e){return e.target}));return[].concat((0,x.Z)(t),(0,x.Z)(n))}function vn(e){fn=!1;var t=mn(e);return fn?t:null}var mn=function e(t){var n=function(e){var t=window.getComputedStyle(e).backgroundImage;if(t&&"none"!==t){var n=t.match(/url\("(.+)"\)/);if(n)return fn=!0,"BGIMG:".concat(e.tagName.toLowerCase()+n[1])}for(var r=0,i=["::before","::after"];r<i.length;r++){var o=i[r],a=window.getComputedStyle(e,o).content.replace(/['"]/g,""),s=window.getComputedStyle(e,o).fontFamily;if("none"!==a&&""!==a){fn=!0;var u=a.charCodeAt(0).toString(16).padStart(4,"0");return"FONT:".concat(e.tagName.toLowerCase()+s+u)}}return e.tagName.toLowerCase()};if(t&&t.nodeType!==Node.TEXT_NODE&&t.tagName){var r=t instanceof SVGElement?function(e){if(!(e.tagName.toLowerCase()in h))return e.tagName.toLowerCase();var t=h[e.tagName.toLowerCase()].map((function(t){return"".concat(t,":").concat(e.getAttribute(t))})).join(",");return t?(fn=!0,"SVG:".concat(t)):e.tagName.toLowerCase()}(t):t instanceof HTMLImageElement?function(e){fn=!0;var t=n(e);return"IMG:".concat(e.src)+(t!==e.tagName.toLowerCase()?"(".concat(t,")"):"")}(t):n(t);if(t.childNodes.length>0){var i=Array.from(t.childNodes).map(e).filter(Boolean).join("+");i&&i.length>0&&(r+="("+i+")")}return r}};function yn(e,t){var n,r=function(e,t){for(var n=new Set;e;)n.add(e),e=e.parentNode;for(;t;){if(n.has(t))return t;t=t.parentNode}return null}(e,t),i=0;if(!r)return 99999;for(n=e;n&&n!==r;)i++,n=n.parentNode;for(n=t;n&&n!==r;)i++,n=n.parentNode;return i}var gn=function(){function e(t,n){(0,a.Z)(this,e),this.rawDbName=t,this.storeName=n,this.db=null,this._dbName=void 0}return(0,s.Z)(e,[{key:"getDBName",value:function(){if(!this._dbName){if(!window.name){var e,t=null!==(e=window.sessionStorage.getItem("nextTabIndex"))&&void 0!==e?e:"0";window.name=t,window.sessionStorage.setItem("nextTabIndex","".concat(parseInt(t)+1))}this._dbName="".concat(this.rawDbName,"-").concat(window.name)}return this._dbName}},{key:"open",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return new Promise((function(n,r){var i=indexedDB.open(e.getDBName(),t);i.onupgradeneeded=function(t){e.db=i.result,e.db.objectStoreNames.contains(e.storeName)||e.db.createObjectStore(e.storeName)},i.onsuccess=function(t){e.db=i.result,n(e.db)},i.onerror=function(e){console.log("IndexedDBClient.open() error",e,i.error),r(i.error)}}))}},{key:"count",value:function(){var e=this;return new Promise((function(t,n){if(e.db){var r=e.db.transaction([e.storeName]).objectStore(e.storeName).count();r.onsuccess=function(){return t(r.result)},r.onerror=function(){return n(r.error)}}else n("Database has not been initialized")}))}},{key:"set",value:function(e,t){var n=this;return new Promise((function(r,i){if(n.db){var o=n.db.transaction([n.storeName],"readwrite").objectStore(n.storeName).add(e,t);o.onsuccess=function(){return r()},o.onerror=function(){return i(o.error)}}else i("Database has not been initialized")}))}},{key:"get",value:function(e,t,n){var r=this;return new Promise((function(i,o){if(r.db){var a=r.db.transaction([r.storeName]).objectStore(r.storeName),s=e?a.getAll(t,n):a.get(t);s.onsuccess=function(){return i(s.result)},s.onerror=function(){return o(s.error)}}else o("Database has not been initialized")}))}},{key:"getOne",value:function(e){return this.get(!1,e)}},{key:"getAll",value:function(e,t){return this.get(!0,e,t)}}]),e}(),bn=["element","innerText"],wn=function(e){(0,V.Z)(i,e);var n=(0,B.Z)(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)(this,i),dn.setPrefix("$checksum"),(e=n.call(this)).options={skipElementHighlighting:!1},e.elementSelector=void 0,e.testIdCounter=0,e.currentESRASelector=void 0,e.lastHighlights=[],e.initialized=!1,e.htmlReducer=void 0,e.appSpecificRules=void 0,e.config=void 0,e.sessionMirror=void 0,e.rrwebEventsIndexedDB=void 0,e.rrwebEventsLoaded=!1,e.loadRRwebEvents=[],e.rrwebCrossFrameEventIdCounter=0,e.mutationDetector=void 0,e.elementSelector=new X,e.options=(0,l.Z)((0,l.Z)({},e.options),t),e.htmlReducer=new be,e}return(0,s.Z)(i,[{key:"init",value:function(e){var t,n,r,i,o=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).sessionRecorder,u=void 0===s||s,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.appSpecificRules=e,this.config=a,this.options=(0,l.Z)((0,l.Z)({},this.options),c),this.initialized||(this.initialized=!0,u&&(this.sessionMirror=new on.L((function(e){return o.onRRwebEvent(e),o.eventProcessor.processEvent(e)})),this.initRRwebEvents()),this.sessionMirror&&(this.sessionMirror.start(),this.htmlReducer.setSessionRecorder(this.sessionMirror)),q.limitChildren=null!==(t=null===(n=this.appSpecificRules)||void 0===n||null===(r=n.esraSelectionRules)||void 0===r?void 0:r.limitChildren)&&void 0!==t?t:[],q.timeout=this.config.esraTimeout,null!==(i=this.config.logPrefix)&&void 0!==i&&i.length&&dn.setPrefix(this.config.logPrefix))}},{key:"getElementSelector",value:function(){return this.elementSelector}},{key:"getLastSelectionLogs",value:function(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}},{key:"getBestMatchingElementSimilarityScore",value:function(e){return this.currentESRASelector=new q(e),this.currentESRASelector.selectOne().score}},{key:"extractESRAMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new j(document).extract(n).toMetadata());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"select",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.elementSelector.selector(n,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getSelectionDataForSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.elementSelector.selector(n,r);case 3:if(a=e.sent){e.next=7;break}return console.warn("could not find element for selector: "+n),e.abrupt("return",null);case 7:return e.next=9,this.elementSelector.getSelectorAndLocator(a,{testIdSelector:null===(i=this.appSpecificRules)||void 0===i||null===(o=i.esraSelectionRules)||void 0===o?void 0:o.testIdSelector});case 9:return s=e.sent,u=s.locator,e.next=13,this.extractESRAMetadata(a);case 13:return c=e.sent,e.abrupt("return",{generatedLocator:u,esraMetadata:c,selector:n,parentFramesSelectors:r});case 17:return e.prev=17,e.t0=e.catch(0),console.log("getMetadataForSelector exception",e.t0),e.abrupt("return");case 21:case"end":return e.stop()}}),e,this,[[0,17]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=h.length>1&&void 0!==h[1]?h[1]:{minSelectionScore:.3}).minSelectionScore,o=r.cachedSelector,a=r.staticMetadata,s=h.length>2&&void 0!==h[2]&&h[2],e.prev=2,!o){e.next=8;break}return console.log("Trying to locate using cached selector",o),e.next=7,this.elementSelector.selector(o);case 7:u=e.sent;case 8:if(u||(console.log("Trying to locate using ESRA",n),w(a)&&console.log("and static data",a),this.currentESRASelector=new q(n,a),(d=this.currentESRASelector.selectOne({minSelectionScore:i})).score>=i?(u=d.candidate,c=d.score,l=d.clickOffset):console.log("Best matching element was below threshold",d)),console.log(u?["Located with score ".concat(c),u]:"Element not located"),u){e.next=12;break}return e.abrupt("return");case 12:return s&&new P.t(u).scrollIntoView(),this.highlightElement(u),e.next=16,this.makeMatchingElementSelectionData(u,c);case 16:return f=e.sent,l&&(f.clickOffset=l),e.abrupt("return",f);case 21:return e.prev=21,e.t0=e.catch(2),console.log("getMatchingElementSelectionData exception",e.t0),e.abrupt("return");case 25:case"end":return e.stop()}}),e,this,[[2,21]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getAllInteractableElementsForLastSelectQuery",value:function(){var e=this,n=this.currentESRASelector.getFinalCandidates();return Promise.all(n.map(function(){var n=(0,r.Z)((0,t.Z)().mark((function n(r){return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=r.esraMetadata,t.next=3,e.makeMatchingElementSelectionData(r.candidate,r.score);case 3:return t.t1=t.sent,t.abrupt("return",{esraMetadata:t.t0,selectionData:t.t1});case 5:case"end":return t.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()))}},{key:"getInteractableElementsRaw",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,v.w1)());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getInteractableElements",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,v.w1)(),i=new j(document),e.abrupt("return",Promise.all(n.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.extract(n).toMetadata(),e.next=3,o.makeMatchingElementSelectionData(n);case 3:return a=e.sent,e.abrupt("return",{esraMetadata:r,selectionData:a});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getCurrentESRASelector",value:function(){return this.currentESRASelector}},{key:"startFlashingElementsDetection",value:function(){return this.htmlReducer.startFlashingElementsDetection()}},{key:"onRRwebEvent",value:function(e){this.rrwebEventsLoaded?this.rrwebEventsIndexedDB.set(e,this.rrwebCrossFrameEventIdCounter++):this.loadRRwebEvents.push(e)}},{key:"initRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.rrwebEventsIndexedDB=new gn("checksum","rrwebEvents"),e.prev=1,e.next=4,this.rrwebEventsIndexedDB.open();case 4:e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(1),e.abrupt("return");case 9:return e.next=11,this.rrwebEventsIndexedDB.count();case 11:this.rrwebCrossFrameEventIdCounter=e.sent,this.loadRRwebEvents.forEach((function(e){n.rrwebEventsIndexedDB.set(e,n.rrwebCrossFrameEventIdCounter++)})),this.rrwebEventsLoaded=!0;case 14:case"end":return e.stop()}}),e,this,[[1,6]])})));return function(){return e.apply(this,arguments)}}()},{key:"postRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.rrwebEventsLoaded){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.rrwebEventsIndexedDB.getAll();case 4:return r=e.sent,e.abrupt("return",fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.rrwebEventsLoaded){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.rrwebEventsIndexedDB.getAll(IDBKeyRange.lowerBound(n));case 4:return r=e.sent,e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>0&&void 0!==s[0]?s[0]:{},r=s.length>1&&void 0!==s[1]?s[1]:{},i=s.length>2&&void 0!==s[2]?s[2]:document,e.next=5,this.htmlReducer.reduceHTML((0,l.Z)((0,l.Z)({},this.appSpecificRules),n),r,i);case 5:return o=e.sent,r.extractESRAForInterpretationRequiredElements&&(console.log("Extracting ESRA for interpretation required elements..."),a=this.htmlReducer.getInteractableElementsInReducedHTML(),o.elementsForNodeInterpretation=a.reduce((function(e,t){var n,r=t.checksumId,i=t.element;if(!(i instanceof HTMLElement))return e;if(null!==(n=i.innerText)&&void 0!==n&&n.trim().length)return e;var o=new j(document).extract(i).toMetadata();return[].concat((0,x.Z)(e),[{checksumId:r,esraMetadata:o}])}),[]),console.log("Done with ESRA extraction for interpretation required elements")),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getMoreItemsForTemplate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.htmlReducer.getMoreElementsFromTemplate(e,(0,l.Z)((0,l.Z)({},this.appSpecificRules),t))}},{key:"displayInterpretationForElements",value:function(e){var t=this;this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach((function(n){var r=n.checksumId,i=n.element,o=e[r];o&&(i.isConnected?t.highlightElement(i,{text:o,textType:"hover",clear:!1,textStyle:{width:"120px"}}):console.log("Element ".concat(r," is not connected to the DOM, skipping display")))}))}},{key:"overlayInteractableElementsWithChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,d,f,h,p,m=this,y=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(n=y.length>0&&void 0!==y[0]?y[0]:{}).reduceBeforeRender,i=void 0!==r&&r,o=n.mode,a=void 0===o?"full":o,s=n.textPosition,u=void 0===s?"tag"===a?"above":void 0:s,c=n.shouldFlipHighlightTextOutsideViewport,d=void 0===c||c,f=n.scrollIntoView,h=void 0!==f&&f,this.clearHighlights(),!i){e.next=5;break}return e.next=5,this.reduceHTML();case 5:p=function(e,t,n){if(t.isConnected){var r=t.getBoundingClientRect(),i=r.width,o=r.height;if(!(i<=0||o<=0)){var s=function(e){var t=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return e?t[e%t.length]:"red"}(n);m.highlightElement(t,(0,l.Z)((0,l.Z)({text:e,clear:!1,highlightStyle:{outline:"tag"===a?"3px dashed ".concat(s):"none"}},u?{textPosition:u}:{}),{},{textStyle:function(e){switch(a){case"tag":return{background:e,width:"initial",left:"-2px",border:"3px dashed ".concat(e),"font-weight":"bold"};case"full":return{background:"black",height:"100%"}}}(s),shouldFlipHighlightTextOutsideViewport:d}))}}else console.log("Element ".concat(e," is not connected to the DOM, skipping display"))},this.htmlReducer.getInteractableElementsInReducedHTML().filter((function(e){return!(0,v.GF)(e.element,(0,l.Z)((0,l.Z)({},ge),{},{scrollIntoView:h})).isHidden})).forEach((function(e,t){var n=e.checksumId,r=e.element;p(n,r,t)}));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getElementForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.htmlReducer.getSelectorForChecksumId(n);case 2:if(e.t1=r=e.sent,e.t0=null===e.t1,e.t0){e.next=6;break}e.t0=void 0===r;case 6:if(!e.t0){e.next=10;break}e.t2=void 0,e.next=11;break;case 10:e.t2=r.element;case 11:return e.abrupt("return",e.t2);case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSelectorForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.htmlReducer.getSelectorForChecksumId(n);case 2:return r=e.sent,r.element,r.innerText,i=(0,rn.Z)(r,bn),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"hasInnerTextByChecksumId",value:function(e){return this.htmlReducer.hasInnerTextByChecksumId(e)}},{key:"getSelectorByPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=document.elementFromPoint(n,r),e.next=3,this.elementSelector.getSelectorAndLocator(i);case 3:return o=e.sent,a=o.selector,s=o.locator,u=o.parentFramesSelectors,e.abrupt("return",{selector:a,locator:s,parentFramesSelectors:u});case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isInput",value:function(e){var t=(0,v.RA)(e);if(t.length)return["input","textarea"].includes(t[0].tagName.toLowerCase())}},{key:"querySelectorExtended",value:function(e){return(0,v.RA)(e)}},{key:"getReactTree",value:function(e){return ln(e)}},{key:"isHidden",value:function(e,t){return(0,v.GF)(e,t)}},{key:"showGrid",value:function(){this.removeGrid();var e=document.createElement("style");e.id="checksum_grid_style",e.innerHTML='\n .checksum_grid {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAJ1JREFUaEPtksEJgDAUxX73H1oRxAECkSrppacXaNI1M8f84Kz7Idf95XP0kM3yVWSzIFORikgG+lqSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddKwIpJYjK0IVicNKyKJxdiKYHXSsCKSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddLwKSLx38Oej8ZiASoSUGMAAAAASUVORK5CYII=");\n background-repeat: repeat;\n background-size: 20px;\n background-position: 0px 0px;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n z-index: 1000;\n }\n',document.body.prepend(e);var t=document.createElement("div");t.classList.add("checksum_grid"),document.body.prepend(t)}},{key:"removeGrid",value:function(){var e=document.querySelector("#checksum_grid_style");e&&e.remove();var t=document.querySelector(".checksum_grid");t&&t.remove()}},{key:"clearHighlights",value:function(){this.lastHighlights.length&&(this.lastHighlights.forEach((function(e){return e.remove()})),this.lastHighlights=[])}},{key:"highlightElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.highlightStyle,r=void 0===n?{}:n,i=t.textStyle,o=void 0===i?{}:i,a=t.mousePosition,s=t.text,u=t.textType,c=void 0===u?"static":u,l=t.textPosition,d=void 0===l?"overlap":l,f=t.textWidthType,h=void 0===f?"rect":f,p=t.clear,m=void 0===p||p,y=t.shouldFlipHighlightTextOutsideViewport,g=void 0===y||y,b=t.pointerEvents,w=t.classNames,k=void 0===w?[]:w;if(!this.options.skipElementHighlighting&&(m&&this.clearHighlights(),e)){var S=e.ownerDocument,E=(0,v.$s)(e),I=e.getBoundingClientRect(),C=S.createElement("div");if(C.style.outline="2px dashed rgba(255,0,0,.75)",C.style.position=E?"fixed":"absolute",C.style.left=I.left+"px",C.style.top=I.top+"px",C.style.width=I.right-I.left+"px",C.style.height=I.bottom-I.top+"px",C.style.pointerEvents=null!==b&&void 0!==b?b:"none",C.style.zIndex="2147483647",C.className=["checksum-dom-cache-ignore"].concat((0,x.Z)(k)).join(" "),this.mergeStyle(C,r),a){var M=S.createElement("div");if(M.style.position="absolute",M.style.left=+a.x-16+"px",M.style.top=+a.y-16+"px",M.style.color="#004DFF",M.className=["checksum-dom-cache-ignore","mouse-cross"].concat((0,x.Z)(k)).join(" "),M.style.zIndex="2147483648",!S.head.querySelector("style[role=mouse-location]")){var T=S.head.appendChild(S.createElement("style"));T.setAttribute("role","mouse-location"),T.innerHTML=".mouse-cross:before, .mouse-cross:after {position: absolute;left: 15px;content: ' ';height: 33px;width: 3px;background-color: #004DFF;}.mouse-cross:before {transform: rotate(0deg);}.mouse-cross:after {transform: rotate(-90deg);}"}S.body.appendChild(M),this.lastHighlights.push(M)}var _=S.createElement("div");s&&(_.className=["checksum-dom-cache-ignore"].concat((0,x.Z)(k)).join(" "),_.innerText=s,_.style.fontSize="12px",_.style.width="rect"===h?"".concat(I.width,"px"):"auto",_.style.background="#000000a1",_.style.color="white",_.style.padding="5px",_.style.position="absolute",_.style.pointerEvents="none",_.style.userSelect="none","above"===d?_.style.bottom="".concat(I.height,"px"):"below"===d&&(_.style.top="".concat(I.height,"px")),this.mergeStyle(_,o),C.appendChild(_),C.style.pointerEvents=null!==b&&void 0!==b?b:"none","hover"===c&&(_.style.display="none",C.addEventListener("mouseover",(function(){_.style.display="block"})),C.addEventListener("mouseout",(function(){_.style.display="none"})))),S.body.appendChild(C),"above"===d&&(0,v.ZS)(_)>0?(_.style.bottom="initial",_.style.top="".concat(I.height,"px")):"below"===d&&(0,v._N)(_)>0&&(_.style.top="initial",_.style.bottom="".concat(I.height,"px")),this.lastHighlights.push(C),g&&this.flipHighlightTextPositionOutsideViewport(_,d,I.height)}}},{key:"getInspectedElementSelectionResultByRRwebId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(r=a.length>1&&void 0!==a[1]?a[1]:{fromTimeMachine:!1}).fromTimeMachine?window.checksum.timeMachine.sessionReplayer:this.sessionMirror,e.next=4,i.getNodeById(n);case 4:if(o=e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.elementSelector.getSelectorAndLocator(o,{ignoredIframesSelectors:r.fromTimeMachine?[".replayer-wrapper > iframe"]:[]});case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"flipHighlightTextPositionOutsideViewport",value:function(e,t,n){"above"===t&&(0,v.ZS)(e)>0?(e.style.bottom="initial",e.style.top="".concat(n,"px")):"below"===t&&(0,v._N)(e)>0&&(e.style.top="initial",e.style.bottom="".concat(n,"px"))}},{key:"getNodeSelector",value:function(e){return(new we).getSelector(e)}},{key:"startListeningForHTMLChanges",value:function(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new hn(pn),this.mutationDetector.startListening()}},{key:"stopListeningForHTMLChanges",value:function(e){return this.mutationDetector.stopListening().map((function(e){var t,n;return null===(t=null!==(n=e.innerText)&&void 0!==n?n:e.textContent)||void 0===t?void 0:t.trim()}))}},{key:"recordScrollPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getElementForChecksumId(n);case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:(i=new P.t(r)).getScrollableParentsPositions(),r._checksumScrollHelper=i;case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"restoreScrollPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getElementForChecksumId(n);case 2:if((r=e.sent)&&"_checksumScrollHelper"in r){e.next=5;break}return e.abrupt("return");case 5:r._checksumScrollHelper.restore(),delete r._checksumScrollHelper;case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getElementCaptioningKeyForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.htmlReducer.getElementForChecksumId(n)){e.next=4;break}return console.warn("Element with checksumId ".concat(n," not found")),e.abrupt("return");case 4:return e.abrupt("return",vn(r));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"determineClosestNode",value:function(e,t,n){return yn(e,n)-yn(t,n)}},{key:"addForceIncludeElement",value:function(e,t){this.htmlReducer.addForceIncludeElement({element:e,checksumid:t})}},{key:"shouldCaptionElement",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{recursive:!0}).recursive,n=this.htmlReducer.getElementForChecksumId(e);if(!n)return!1;for(var r,i=an,o=!1,a=n,s=function(){var e=function(){var e;return o?a=null===(e=a)||void 0===e?void 0:e.parentElement:o=!0,a}();return i.some((function(t){return e.getAttribute(t)}))||e.querySelectorAll("[checksuminteractable]").length>0||1===i.filter((function(t){return e.querySelectorAll("[".concat(t,"]"))})).length?{v:!1}:t&&function(e){var t=e.parentElement;if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;var n=t.getBoundingClientRect(),r=n.width,i=n.height,o=e.getBoundingClientRect(),a=o.width,s=o.height;return Math.abs(r-a)<15&&Math.abs(i-s)<15}(e)?void 0:0};0!==(r=s());)if(r)return r.v;return!0}},{key:"mergeStyle",value:function(e,t){for(var n in t)e.style[n]=t[n]}},{key:"makeMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i,o){var a,s,u,c,l,d,f,h,p,v,m,y,g,b,w,k,S,E,x,I,C,M;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,f=this.setAndGetTestId(n),h=this.getVisibleParent(n),p=this.setAndGetTestId(h),v=this.getElementAtCenterOfElement(n),m=this.setAndGetTestId(v),y={element:f,visibleElement:p===f?void 0:p,atPointElement:m===f||m===p?void 0:m},e.next=9,this.elementSelector.getSelectorAndLocator(n,{testIdSelector:null===(a=this.appSpecificRules)||void 0===a||null===(s=a.esraSelectionRules)||void 0===s?void 0:s.testIdSelector});case 9:return g=e.sent,e.next=12,this.elementSelector.getSelectorAndLocator(v,{testIdSelector:null===(u=this.appSpecificRules)||void 0===u||null===(c=u.esraSelectionRules)||void 0===c?void 0:c.testIdSelector});case 12:return b=e.sent,e.next=15,this.elementSelector.getSelectorAndLocator(h,{testIdSelector:null===(l=this.appSpecificRules)||void 0===l||null===(d=l.esraSelectionRules)||void 0===d?void 0:d.testIdSelector});case 15:return w=e.sent,k={element:null===g||void 0===g?void 0:g.selector,visibleElement:null===w||void 0===w?void 0:w.selector,atPointElement:null===b||void 0===b?void 0:b.selector},S={element:null===g||void 0===g?void 0:g.parentFramesSelectors,visibleElement:null===w||void 0===w?void 0:w.parentFramesSelectors,atPointElement:null===b||void 0===b?void 0:b.parentFramesSelectors},x={element:(E=function(e){return{tag:e.tagName.toLowerCase()}})(n),visibleElement:y.visibleElement?E(h):void 0,atPointElement:y.atPointElement?E(v):void 0},I=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r!==n||!o){e.next=2;break}return e.abrupt("return",o);case 2:return i=new j(document),e.abrupt("return",i.extract(r).toMetadata());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=23,I(n);case 23:if(e.t0=e.sent,!y.visibleElement){e.next=30;break}return e.next=27,I(h);case 27:e.t1=e.sent,e.next=31;break;case 30:e.t1=void 0;case 31:if(e.t2=e.t1,!y.atPointElement){e.next=38;break}return e.next=35,I(v);case 35:e.t3=e.sent,e.next=39;break;case 38:e.t3=void 0;case 39:return e.t4=e.t3,C={element:e.t0,visibleElement:e.t2,atPointElement:e.t4},M=null===g||void 0===g?void 0:g.locator,e.abrupt("return",{testIds:y,selectors:k,parentFramesSelectors:S,elementData:x,score:i,esraMetadata:C,generatedLocator:M});case 45:return e.prev=45,e.t5=e.catch(0),console.log("[makeMatchingElementSelectionData] exception",e.t5),e.abrupt("return",{testIds:{element:void 0},selectors:{element:void 0},parentFramesSelectors:{element:void 0},elementData:{element:void 0},esraMetadata:{element:void 0},generatedLocator:void 0});case 49:case"end":return e.stop()}}),e,this,[[0,45]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"getElementAtCenterOfElement",value:function(e){var t=e.getBoundingClientRect(),n=t.x,r=t.y,i=e.ownerDocument.elementFromPoint(n,r);return i instanceof HTMLElement?i:void 0}},{key:"setAndGetTestId",value:function(e){if(e){var t=e.getAttribute("data-checksum-testid");if(t)return t;var n=(this.testIdCounter++).toString();return e.setAttribute("data-checksum-testid",n),n}}},{key:"getVisibleParent",value:function(e){return e instanceof HTMLElement?null!==e.offsetParent?e:this.getVisibleParent((0,v.nq)(e)):e}}]),i}(tn),kn=function(){function e(){(0,a.Z)(this,e),this.goals=void 0,this.goals={}}return(0,s.Z)(e,[{key:"init",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"recordGoalFinished",value:function(e){var t;console.log("Goal reached: ".concat(e)),this.goals[e]||(this.goals[e]=0),this.goals[e]+=1,null===(t=window.checksumai)||void 0===t||t.capture("goal_reached",{goalName:e})}},{key:"getGoals",value:function(){return this.goals}}]),e}(),Sn=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"findSequence",value:function(e,t,n){for(var r=0;r<=e.length-t.length;r++){var i=this.findMatch(r,e,t,n);if(null!==i)return i}return null}},{key:"findMatch",value:function(e,t,n,r){for(var i={},o=[],a=0;a<n.length;a++){var s=t[e+a],u=n[a];if(!this.matchItem(u,s,i,null!==r&&void 0!==r?r:s))return null;o.push(s)}return{items:o,token_values:i}}},{key:"matchItem",value:function(e,t,n,r){if(Array.isArray(e)&&Array.isArray(t))return this.matchArray(e,t,n,r);if("object"===typeof e&&null!==e&&"object"===typeof t&&null!==t){for(var i in e){var o=e[i],a=t[i];if("string"===typeof o&&o.startsWith("$")){if(void 0===n[o])n[o]={value:a,item:r};else if(n[o].value!==a)return!1}else if("object"===typeof o&&null!==o){if(!this.matchItem(o,a,n,r))return!1}else if(o!==a)return!1}return!0}return e===t}},{key:"matchArray",value:function(e,t,n,r){for(var i=0;i<=t.length-e.length;i++){var o=t.slice(i,i+e.length),a=this.findSequence(o,e,r);if(a){for(var s in a.token_values)if(void 0===n[s])n[s]={value:a.token_values[s].value,item:r};else if(n[s].value!==a.token_values[s].value)return!1;return!0}}return!1}},{key:"runExample",value:function(){var t=(new e).findSequence([{x:"banana",id:"1gf3",class:"fruit",index:"3",details:{a:1,b:2,nested:{key:"value1"}},arr:[{a:3,b:2},{a:1,b:2}]},{y:"apple",id:"4gs2",class:"fruit",parentIndex:"3",index:"7",details:{a:1,b:2,nested:{key:"value1"}}}],[{class:"$1",index:"$2",details:{a:1,b:"$3",nested:{key:"$4"}},arr:[{a:1,b:"$5"}]},{class:"$1",parentIndex:"$2",details:{a:1,b:"$3",nested:{key:"$4"}}}]);console.log(t)}}]),e}(),En=n(4228),xn=function(e){(0,V.Z)(i,e);var n=(0,B.Z)(i);function i(e){var o,s=e.sessionReplayer,u=e.elementSelector;return(0,a.Z)(this,i),(o=n.call(this)).sessionReplayer=void 0,o.elementSelector=void 0,o.events=[],o.interactions=[],o.lastInteractionEventIndex=0,o.sequences=[],o.sequenceMatcher=new Sn,o.inputFilter=void 0,o.clickFilter=void 0,o.releasePendingInputAction=function(){clearTimeout(o.inputFilter.timeout),o.addInteraction(o.inputFilter.action),o.inputFilter=void 0},o.releasePendingClickActions=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];clearTimeout(o.clickFilter.timeout),e&&o.clickFilter.actions.forEach((function(e){return o.addInteraction(e)})),o.clickFilter=void 0},o.dragAndDropSequence={events:[{type:ke.tw.IncrementalSnapshot,data:{source:ke.yh.MouseInteraction,type:ke.Y2.MouseDown}},{type:ke.tw.IncrementalSnapshot,data:{source:ke.yh.Mutation,adds:[{parentId:"$dropzoneId",node:{id:"$draggableId"}}],removes:[{id:"$draggableId"}]}}],handler:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,a,s,u,c,l,d,f,h;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.token_values,i=r.$dropzoneId,a=r.$draggableId,s=n.items,e.next=3,o.sessionReplayer.goBack(a.item.timestamp);case 3:return u=a.value,e.next=6,o.getNodeById(u);case 6:if(c=e.sent){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,o.elementSelector.getSelector(c);case 11:return l=e.sent,e.next=14,o.sessionReplayer.goBack(i.item.timestamp);case 14:return d=i.value,e.next=17,o.getNodeById(d);case 17:if(f=e.sent){e.next=20;break}return e.abrupt("return");case 20:return e.next=22,o.elementSelector.getSelector(f);case 22:return h=e.sent,console.log("Drag and drop",l.playwrightLocator,h.playwrightLocator),e.abrupt("return",[o.makePageAction(Ee.$.DragAndDrop,s[0],l,{dropTarget:{selector:h.playwrightSelector,locator:h.playwrightLocator,parentFramesSelectors:h.playwrightParentFramesSelectors,esraMetadata:h.esraMetadata}})]);case 25:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},o.maxNumberOfGetNodeRetries=3,o.sessionReplayer=s,o.elementSelector=u,o.buildSequences(),o}return(0,s.Z)(i,[{key:"getInteractions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.interactions.slice(e)}},{key:"preEvent",value:function(e){this.inputFilter&&this.isActionEvent(e)&&!this.isConsecutiveInputEvent(e)&&this.releasePendingInputAction(),this.clickFilter&&this.isActionEvent(e)&&!this.isConsecutiveClickEvent(e)&&this.releasePendingClickActions(),this.events.push(e)}},{key:"postEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.performSequenceSearch();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("performSequenceSearch",e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleInput",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=u.length>2&&void 0!==u[2]&&u[2],!this.inputFilter){e.next=5;break}return this.inputFilter.action.fillValue=n.text,this.inputFilter.timeout=this.setInputWaitTimeout(),e.abrupt("return");case 5:if(n.userTriggered){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.getNodeById(n.id);case 9:if(o=e.sent){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,this.elementSelector.getSelector(o);case 14:if(a=e.sent,(s=this.makePageAction(this.getInputEventCode(o,n),r,a)).eventCode!==Ee.$.Input){e.next=20;break}return s.fillValue=n.text,this.inputFilter={action:s,nodeId:n.id,contenteditable:i,timeout:this.setInputWaitTimeout()},e.abrupt("return");case 20:s.eventCode===Ee.$.UploadFiles&&(s.files=[],s.files.push(n.text)),this.addInteraction(s);case 22:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isConsecutiveInputEvent",value:function(e){return!!this.inputFilter&&(this.inputFilter.contenteditable?e.type===ke.tw.Custom&&e.data.tag===En.N.ContentEditableInput&&e.data.payload.id===this.inputFilter.nodeId:e.type===ke.tw.IncrementalSnapshot&&e.data.source===ke.yh.Input&&e.data.id===this.inputFilter.nodeId&&!!e.data.userTriggered)}},{key:"setInputWaitTimeout",value:function(){var e;return null!==(e=this.inputFilter)&&void 0!==e&&e.timeout&&clearTimeout(this.inputFilter.timeout),setTimeout(this.releasePendingInputAction,1e3)}},{key:"handleContentEditableInput",value:function(e,t){this.handleInput({userTriggered:!0,id:e.id,text:e.text,isChecked:void 0,source:ke.yh.Input},t,!0)}},{key:"handleKeyStroke",value:function(e,t){}},{key:"handleClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.elementSelector.getSelector(i);case 9:if(o=e.sent,a=this.makePageAction(Ee.$.Click,r,o),!this.clickFilter){e.next=14;break}return this.clickFilter.actions.push(a),e.abrupt("return");case 14:this.clickFilter={actions:[a],nodeId:n.id,timeout:this.setClickWaitTimeout()};case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isConsecutiveClickEvent",value:function(e){return!!this.clickFilter&&(e.type===ke.tw.IncrementalSnapshot&&e.data.source===ke.yh.MouseInteraction&&e.data.type===ke.Y2.Click&&e.data.id===this.inputFilter.nodeId)}},{key:"setClickWaitTimeout",value:function(){var e;return null!==(e=this.clickFilter)&&void 0!==e&&e.timeout&&clearTimeout(this.clickFilter.timeout),setTimeout(this.releasePendingClickActions,600)}},{key:"handleDblClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.elementSelector.getSelector(i);case 9:o=e.sent,a=this.makePageAction(Ee.$.DoubleClick,r,o),this.addInteraction(a),this.releasePendingClickActions(!1);case 13:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"buildSequences",value:function(){this.sequences.push(this.dragAndDropSequence)}},{key:"performSequenceSearch",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.events.slice(this.lastInteractionEventIndex),r=(0,W.Z)(this.sequences),e.prev=2,r.s();case 4:if((i=r.n()).done){e.next=14;break}if(o=i.value,!(a=this.sequenceMatcher.findSequence(n,o.events))){e.next=12;break}return e.next=10,o.handler(a);case 10:(s=e.sent)&&s.forEach((function(e){return u.addInteraction(e)}));case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return e.next=24,this.sessionReplayer.goLive();case 24:case"end":return e.stop()}}),e,this,[[2,16,19,22]])})));return function(){return e.apply(this,arguments)}}()},{key:"isActionEvent",value:function(e){switch(e.type){case ke.tw.Meta:return!1;case ke.tw.IncrementalSnapshot:switch(e.data.source){case ke.yh.Input:return e.data.userTriggered;case ke.yh.MouseInteraction:case ke.yh.MouseMove:return!0;default:return!1}case ke.tw.Custom:return e.data.tag===En.N.ContentEditableInput;default:return!1}}},{key:"addInteraction",value:function(e){this.interactions.push(e),this.lastInteractionEventIndex=this.events.length}},{key:"makePageAction",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,l.Z)({nodeId:this.interactions.length.toString(),eventCode:e,selector:n.playwrightSelector,locator:n.playwrightLocator,parentFramesSelectors:n.playwrightParentFramesSelectors,esraMetadata:n.esraMetadata,pageId:void 0,timestamp:t.timestamp},r)}},{key:"getNodeById",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).retriesLeft,o=void 0===i?this.maxNumberOfGetNodeRetries:i,a=r.useCompoundInteractableDetection,s=void 0===a||a,o){e.next=4;break}return console.error("no node"),e.abrupt("return",null);case 4:if(u=this.sessionReplayer.getNodeById(n)){e.next=9;break}return e.next=8,Ie()(100*(this.maxNumberOfGetNodeRetries-o+1));case 8:return e.abrupt("return",this.getNodeById(n,{retriesLeft:o-1,useCompoundInteractableDetection:s}));case 9:return e.abrupt("return",s?(0,v.QI)(u,[]):u);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getInputEventCode",value:function(e,t){switch(e.getAttribute("type")){case"file":return Ee.$.UploadFiles;case"checkbox":case"radio":return t.isChecked?Ee.$.Check:Ee.$.UnCheck;default:return Ee.$.Input}}}]),i}(Se.E),In=function(e){return e.VisualTestGenerationProducer="VisualTestGenerationProducer",e.VisualTestGenerationConsumer="VisualTestGenerationConsumer",e.AssertionGenerationProducer="AssertionGenerationProducer",e}({}),Cn=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,o=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0;(0,a.Z)(this,e),this.rootDocument=i,this.defaultView=o,this.topLevelInspector=s,this.playwrightElementSelectorGenerator=void 0,this.hoveredElement=void 0,this.hoveredElementSelection=void 0,this.wasHoveredElementSelected=!1,this.selected=[],this.singleSelection=!0,this.subDocumentInspector=null,this.listening=!1,this.onMouseOver=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i,o,a,s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("getRootNode"in(i=r.composedPath()[0]))){e.next=6;break}if((o=i.getRootNode())===n.rootDocument){e.next=6;break}return n.handleSubDocument(o,n.defaultView),e.abrupt("return");case 6:if(!(i instanceof n.defaultView.HTMLIFrameElement)){e.next=9;break}return n.handleSubDocument(i.contentDocument,i.contentDocument.defaultView),e.abrupt("return");case 9:if(n.subDocumentInspector&&n.stopSubDocumentInspector(!0),i instanceof n.defaultView.Element){e.next=12;break}return e.abrupt("return");case 12:if(i!==n.hoveredElement&&!i.matches(".element-inspector-ignore")){e.next=14;break}return e.abrupt("return");case 14:return window.checksum.testGenerator.clearHighlights(),n.hoveredElement&&n.hoveredElement.removeEventListener("click",n.onClick,{capture:!0}),e.next=18,n.playwrightElementSelectorGenerator.getSelectorAndLocator(i);case 18:return a=e.sent,s=a.locator,u=a.selector,c=a.parentFramesSelectors,window.checksum.testGenerator.highlightElement(i,{text:s.replace("frameLocator('iframe').",""),textPosition:"below",textWidthType:"auto",pointerEvents:"none",classNames:["element-inspector-ignore"]}),e.next=25,n.playwrightElementSelectorGenerator.selector(u,c);case 25:(l=e.sent)!==i&&window.checksum.testGenerator.highlightElement(l,{clear:!1,pointerEvents:"none",classNames:["element-inspector-ignore"]}),n.hoveredElement=i,n.hoveredElementSelection={locator:s,selector:u,parentFramesSelectors:c},n.wasHoveredElementSelected=!1,i.addEventListener("click",n.onClick,{capture:!0});case 31:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.onClick=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.stopPropagation(),r.preventDefault(),!n.wasHoveredElementSelected){e.next=4;break}return e.abrupt("return");case 4:n.wasHoveredElementSelected=!0,n.selected.push(n.hoveredElementSelection),n.singleSelection&&(n.topLevelInspector?n.topLevelInspector.stop():n.stop()),console.log("selected",n.selected);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.handleSubDocument=function(t,r){var i;if(n.subDocumentInspector){if(n.subDocumentInspector.rootDocument===t)return!0;n.stopSubDocumentInspector(!0)}return n.subDocumentInspector=new e(t,r,null!==(i=n.topLevelInspector)&&void 0!==i?i:n),n.subDocumentInspector.start(n.singleSelection),!0},this.stopSubDocumentInspector=function(e){n.subDocumentInspector&&(n.subDocumentInspector.stop(e),n.subDocumentInspector=null)},this.playwrightElementSelectorGenerator=new X,o||(this.defaultView=this.rootDocument.nodeType===Node.DOCUMENT_NODE?this.rootDocument.defaultView:window)}return(0,s.Z)(e,[{key:"start",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.singleSelection=e,this.stop(),this.cleanSelection(),this.rootDocument.addEventListener("mouseover",this.onMouseOver),this.listening=!0}},{key:"stop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.listening&&(this.listening=!1,this.subDocumentInspector&&this.stopSubDocumentInspector(e),window.checksum.testGenerator.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0}),this.hoveredElement=null,this.wasHoveredElementSelected=!1,this.rootDocument.removeEventListener("mouseover",this.onMouseOver),e&&this.cleanSelection())}},{key:"cleanSelection",value:function(){this.subDocumentInspector&&this.subDocumentInspector.cleanSelection(),this.selected=[]}},{key:"consumeSelections",value:function(){if(this.subDocumentInspector)return this.subDocumentInspector.consumeSelections();var e=this.selected;return this.cleanSelection(),e}}]),e}(),Mn=function(e){(0,V.Z)(i,e);var n=(0,B.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).elementSelector=new we,e.elementInspector=void 0,e.lengthOfConsumedInteractions=0,e.shouldHandleEvents=!0,e}return(0,s.Z)(i,[{key:"init",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];switch(this.shouldHandleEvents=t,e){case In.VisualTestGenerationProducer:break;case In.VisualTestGenerationConsumer:this.setEventHandlers(new xn({sessionReplayer:this.sessionReplayer,elementSelector:this.elementSelector}))}}},{key:"handleEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("starting handleEvents",r),e.prev=1,i=(0,W.Z)(n),e.prev=3,i.s();case 5:if((o=i.n()).done){e.next=13;break}return a=o.value,e.next=9,this.eventProcessor.processEvent(a,this.shouldHandleEvents);case 9:return e.next=11,this.skipEvents([a]);case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),i.e(e.t0);case 18:return e.prev=18,i.f(),e.finish(18);case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(1),console.error(e.t1);case 26:console.log("done handleEvents",r);case 27:case"end":return e.stop()}}),e,this,[[1,23],[3,15,18,21]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"consumeInteractions",value:function(){var e=this.eventHandlers.getInteractions(this.lengthOfConsumedInteractions);return this.lengthOfConsumedInteractions+=e.length,e}},{key:"setShouldHandleEvents",value:function(e){this.shouldHandleEvents=e}},{key:"startInspector",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;this.elementInspector=new Cn(null!==t&&void 0!==t?t:document.querySelector(".replayer-wrapper > iframe").contentDocument),this.elementInspector.start(e)}},{key:"stopInspector",value:function(){this.elementInspector.stop()}},{key:"consumeSelections",value:function(){return this.elementInspector.consumeSelections()}},{key:"goBack",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?this.sessionReplayer.goBack(e,t):this.goLive()}},{key:"goLive",value:function(){return this.sessionReplayer.goLive()}}]),i}(tn);!function(){var e=Element.prototype.addEventListener;Element.prototype.addEventListener=function(t,n,r){e.call(this,t,n,r),this._checksum_eventListenerList||(this._checksum_eventListenerList={}),this._checksum_eventListenerList[t]||(this._checksum_eventListenerList[t]=[]),this._checksum_eventListenerList[t].push(n)}}(),window.checksum||(window.checksum={testGenerator:new wn,sessionDigester:new nn,goalTracker:new kn,timeMachine:new Mn});var Tn=!!(0,i.v)().app,_n=(0,i.v)().type||Tn?o.pR.App:void 0;function An(){return(An=(0,r.Z)((0,t.Z)().mark((function e(){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=_n||o.De.appType,e.next=e.t0===o.pR.App?3:e.t0===o.pR.Script?9:10;break;case 3:return e.next=5,Promise.all([n.e(542),n.e(736)]).then(n.bind(n,9607));case 5:return r=e.sent,(0,r.bootstrapApp)(),e.abrupt("break",10);case 9:return e.abrupt("break",10);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}"true"===(0,i.v)().injectESRA&&(window.esraExtractor=new j(document),window.esraSelector=function(e){return new q(e)},window.esraMetadata=u),function(){An.apply(this,arguments)}()}()}();
3
+ //# sourceMappingURL=main.ef218c88.js.map