@sideex/api
Version:
This is SideeX JavaScript API for recording and playing web browsing behavior. The API can be embeded in a webpage without installing a browser web extension.
1 lines • 178 kB
JavaScript
!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){var t={};function r(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(o,i,function(t){return e[t]}.bind(null,i));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=21)}([function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return l}));var o=r(13),i=r.n(o);var s=r(14),a=r.n(s);String.prototype.supplant=function(e,t){return this.replace(/\${([^{}]*)}/g,(r,o)=>{for(let r of[e,t]){let e=r[o.trim()];if("string"==typeof e||"number"==typeof e)return e.toString()}throw new TypeError("Variable "+r+" does not defined")})},String.prototype.lcfirst=function(){return this.charAt(0).toLowerCase()+this.substr(1)},String.prototype.ucfirst=function(){return this.charAt(0).toUpperCase()+this.substr(1)},Array.prototype.remove=function(e){const t=this.indexOf(e);return t>-1&&this.splice(t,1),this},Array.prototype.insert=function(e,t){return this.splice(e,0,t)},Reflect.defineProperty(Array.prototype,"remove",{configurable:!0,writable:!0,value(e){const t=this.indexOf(e);return t>-1&&(this.splice(t,1),!0)}}),Reflect.defineProperty(Array.prototype,"insert",{configurable:!0,writable:!0,value(e,t){return this.splice(e,0,t)}});class n{static lcfirst(e){return e.charAt(0).toLowerCase()+e.substr(1)}static ucfirst(e){return e.charAt(0).toUpperCase()+e.substr(1)}static getText(e){let t=e.innerText;return t=n.normalizeNewlines(t),t=n.normalizeSpaces(t,e),t.trim()}static getTooltip(e){if(n.is(e,e instanceof window.HTMLElement))return n.is(e,"IMG"===e.tagName),e.title;if(e instanceof SVGElement){if(e.children.length>0)for(let t=0;t<e.children.length;t++)if("title"===e.children[t].tagName)return e.children[t].textContent;let t=e.parentNode;for(;t instanceof SVGElement;){for(let e=0;e<t.children.length;e++)if("title"===t.children[e].tagName)return t.children[e].textContent;t=t.parentNode}}return""}static escape(e){return e.replace(/[&"'<>\n\t]/g,e=>({"&":"&",'"':""","'":"'","<":"<",">":">","\n":"\\n","\t":"\\t"}[e]))}static unescape(e){return e.replace(/(&)|(")|(')|(<)|(>)|(\\n)|(\\t)/g,e=>({"&":"&",""":'"',"'":"'","<":"<",">":">","\\n":"\n","\\t":"\t"}[e]))}static normalizeNewlines(e){return e.replace(/\r\n|\r/g,"\n")}static normalizeSpaces(e,t){return t&&getComputedStyle(t).whiteSpace.match("^(pre|pre-line)$")||(e=e.replace(/ +/g," ")),e.replace(new RegExp(String.fromCharCode(160),"g")," ")}static getElementValue(e){var t;let r=null!==(t=e.getAttribute("value"))&&void 0!==t?t:"";return e instanceof HTMLInputElement&&["checkbox","radio"].includes(e.type)?r=e.checked?"on":"off":(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)&&(r=e.value),r}static getInputValue(e){try{if(e.type.match("^(checkbox|radio)$"))return e.checked?"on":"off"}catch(e){}return e.value}static getTagName(e){try{return e.tagName.toLowerCase()}catch(e){return null}}static isInShadowDom(e){for(;e;e=e.parentNode)if(e.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return!0;return!1}static extractExceptionMessage(e){if(null==e)return"null exception";if(e instanceof Error)return e.message;try{return e.toString()}catch(e){return null}}static parse_locator(e){if(e.includes("TAC_LOCATOR"))return{type:"tac",string:e};{const t=e.match(/^([A-Za-z]+)=.+/);if(t){const r=t[1].toLowerCase();return{type:r,string:e.substring(r.length+1)}}return{type:"implicit",string:e}}}static exactMatchPattern(e=null){return e&&(e.match(/^\w*:/)||e.match(/\?\*/))?"exact:"+e:e}static xpathGenerator(e){let t="";for(let r=e;null!=r;r=r.parentElement){if(null==r.parentElement){t="//"+r.tagName.toLowerCase()+t;break}{let e=r.tagName.toLowerCase();"[object HTMLUnknownElement]"==document.createElement(e).toString()&&(e="*[name()='"+e+"']");let o=0,i=0,s=!1;for(const e of r.parentElement.children)e.tagName==r.tagName&&(s||o++,i++),e==r&&(s=!0);let a="/"+e;i>1&&(a+="["+o+"]"),t=a+t}}return t}static async delay(e){await new Promise(t=>{setTimeout(t,e)})}static isWebdriver(){return"webdriver"==window.sideex}static getFormatTime(){let e=new Date;return`${""+e.getFullYear()}${(""+(e.getMonth()+1)).padStart(2,"0")}${(""+e.getDate()).padStart(2,"0")} ${(""+e.getHours()).padStart(2,"0")}-${(""+e.getMinutes()).padStart(2,"0")}-${(""+e.getSeconds()).padStart(2,"0")}`}static makeTextFile(e,t){let r="text/plain";switch(t){case"html":r="text/html";break;case"json":r="application/json";break;case"csv":r="text/csv";break;case"zip":r="application/zip"}return URL.createObjectURL(new Blob([e],{type:r}))}static releaseObjectURL(e){URL.revokeObjectURL(e)}static compareTwoArray(e,t){if(!t)return!1;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]instanceof Array&&t[r]instanceof Array){if(!n.compareTwoArray(e,t))return!1}else if(!i()(e[r],t[r]))return!1;return!0}static emptyNode(e){for(;e.firstChild;)e.firstChild.remove()}static async promiseTimeout(e,t,r,o=!1){let i;return i=e instanceof Promise?e:e(),Promise.race([(async()=>{if(await n.delay(t),o)throw r;return r})(),i])}static is(e,t=!0){return t}static stopNativeEvent(e){e.preventDefault(),e.stopPropagation()}static assertSutieCaseNameValid(e){if(e.length<=0)throw new Error("You need to type something");if(e.match(/\/|\\|:|\?|"|\*|<|>|\||\./gi))throw new Error('The name cannot contain . / \\ : * ? " < > |')}static eval_css(e,t){return a()(e,t)}}n.SeleniumError=class extends Error{constructor(e){super(e),this.isSeleniumError=!0}};class l{constructor(e){this.matcher=void 0,this.selectStrategy(e)}selectStrategy(e){let t="glob";if(/^([a-z-]+):(.*)/.test(e)){var r=RegExp.$1,o=RegExp.$2;l.strategies[r]&&(t=r,e=o)}const i=l.strategies[t];if(!i)throw new n.SeleniumError("cannot find PatternMatcher.strategies."+t);this.matcher=new i(e)}matches(e){return this.matcher.matches(e+"")}static matches(e,t){return new l(e).matches(t)}static convertGlobMetaCharsToRegexpMetaChars(e){return e.replace(/([.^$+(){}[\]\\|])/g,"\\$1").replace(/\?/g,"(.|[\r\n])").replace(/\*/g,"(.|[\r\n])*")}static regexpFromGlobContains(e){return l.convertGlobMetaCharsToRegexpMetaChars(e)}}l.strategies=void 0,l.regexpFromGlob=function(e){return"^"+l.convertGlobMetaCharsToRegexpMetaChars(e)+"$"}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var o=r(8),i=r(10),s=r(2);class a{constructor(e){this.window=e,this.attached=!1,this.locatorBuilders=new o.a(e),this.frameLocation=this.getFrameLocation(),s.a.runtimeSendMessage({frameLocation:this.frameLocation}).catch((function(){})),this.listenerMap={}}initialize(){this.pageLoaded=!0,this.totalNode=0,this.scrollDetector=!1,this.mouseOverElement={},this.mouseOverCache={},this.mouseOverDelayTime=200,this.mouseOverQueue=[],this.mouseOutElements=[],this.lastRecordMouseOver=0,this.deleteTimestamp=[],this.mouseDownDetector=!1,this.typeRecorded=!0,this.typeType="",this.typeTagName="",this.enterWithPress=!1,this.tempEnterPress=!1,this.submitEvent=!1,this.commandTimestamp=0,this.prevCommandTimestamp=0}parseEventKey(e){return e.match(/^C_/)?{eventName:e.substring(2),capture:!0}:{eventName:e,capture:!1}}attach(){if(!this.attached){this.attached=!0,this.initialize(),this.eventListeners={};for(let[o,i]of Object.entries(a.eventHandlers)){var e=this.parseEventKey(o),t=e.eventName,r=e.capture;this.eventListeners[o]=e=>{for(const t of i)t.call(this,e)},this.window.document.addEventListener(t,this.eventListeners[o],r)}if(!this.executeOnce){this.executeOnce=!0;for(let e in a.initialVars)if(a.initialVars[e].ctor){let t=a.initialVars[e].ctor,r=[null].concat(a.initialVars[e].args),o=t.bind.apply(t,r);this[e]=new o}else this[e]=a.initialVars[e].value}}}detach(){if(this.attached){this.attached=!1;for(let o in this.eventListeners){var e=this.parseEventKey(o),t=e.eventName,r=e.capture;this.window.document.removeEventListener(t,this.eventListeners[o],r)}delete this.eventListeners}}getFrameLocation(){let e,t=window,r="";for(;t!==window.top;){e=t.parent;for(let o=0;o<e.frames.length;o++)if(e.frames[o]===t){r=":"+o+r,t=e;break}}return"root"+r}record(e,t,r,o,i){function a(e){let t=[],r={options:[],tac:""};for(let r of e)t.push({type:r[1]?r[1]:"other",value:r[0]});return r.options=t,r}0===t.length&&(t=this.prebuildedTarget,this.prebuildedTarget=null),async function(e,t,r,o,i){try{console.log("-> Record: %c"+e,"color: blue;"),await s.a.runtimeSendMessage({command:e,target:t,value:r,insertBeforeLastCommand:o,frameLocation:null!=i?i:this.frameLocation})}catch(e){console.log(e),this.detach()}}.call(this,e,a(t),function(e){return"string"!=typeof e?a(e):{options:[{type:"other",value:e}],tac:""}}(r),o,i)}static addEventHandlerVar(e,t,...r){this.initialVars[e]={},t instanceof Function?(this.initialVars[e].ctor=t,this.initialVars[e].args=r):this.initialVars[e].value=t}static addEventHandler(e,t,r,o){r.handlerName=e;let i=o?"C_"+t:t;this.eventHandlers[i]||(this.eventHandlers[i]=[]),this.eventHandlers[i].push(r)}}a.eventHandlers={},a.initialVars={},Object(i.a)()},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var o=r(12),i=r(0);class s extends Error{constructor(e){super(e),this.name="TimeoutError"}}const a={};!async function(){"loading"==document.readyState&&await new Promise(e=>{document.addEventListener("DOMContentLoaded",e,{once:!0})}),window.addEventListener("message",async e=>{if(e.data&&e.data._details&&!e.data._details.callbackId&&e.data._details.eventName in a){var t;const r=[];for(const t of a[e.data._details.eventName])r.push(t(e.data,e.source));let s=[];const n={_details:{id:Object(o.v4)(),callbackId:e.data._details.id,eventName:e.data._details.eventName}};try{s=(await Promise.all(r)).filter(e=>e),n._details.returnValue=s[0]}catch(e){e instanceof Error?n._details.error=e.message:n._details.error=e instanceof String?e.toString():JSON.stringify(e)}if(i.b.is(e.source,(null==e||null===(t=e.source)||void 0===t?void 0:t.postMessage)instanceof Function)?e.source.postMessage(n,"*"):window.postMessage.call(e.source,n,"*"),s.length>1)throw new Error("More than one onMessage listener send response, eventName="+e.data._details.eventName)}})}(),Reflect.defineProperty(window,"postMessageAsync",{configurable:!0,writable:!0,async value(e,t,r){return await async function(e,t,r,a){const n=Object.assign({targetOrigin:"*",timeout:0},a),l=Object(o.v4)();r._details={id:l,eventName:t};const c=async()=>await new Promise((t,o)=>{const i=e=>{var r,s;(null===(r=e.data)||void 0===r||null===(s=r._details)||void 0===s?void 0:s.callbackId)==l&&(window.removeEventListener("message",i),e.data._details.error?o(e.data._details.error):t(e.data._details.returnValue))};window.addEventListener("message",i),(null==e?void 0:e.postMessage)instanceof Function?e.postMessage(r,n.targetOrigin):window.postMessage.call(e,r,n.targetOrigin)});"loading"==document.readyState&&await new Promise(e=>{document.addEventListener("DOMContentLoaded",e,{once:!0})});return n.timeout>0?await i.b.promiseTimeout(c,n.timeout,new s("postMessageAsync timeout, eventName="+t),!0):await c()}(this,e,t,r)}}),Reflect.defineProperty(window,"addAsyncMessageListener",{configurable:!0,writable:!0,value(e,t){null==a[e]&&(a[e]=[]),a[e].includes(t)||a[e].push(t)}}),Reflect.defineProperty(window,"removeAsyncMessageListener",{configurable:!0,writable:!0,value(e,t){a[e]&&a[e].includes(t)&&(a[e].remove(t),0==a[e].length&&(a[e]=void 0))}});class n{static tabSendMessage(e,t,r){return this.isExtension?browser.tabs.sendMessage(t,e,r):window.postMessageAsync("message",e)}static runtimeSendMessage(e,t,r){return this.isExtension?browser.runtime.sendMessage(t,e,r):window.postMessageAsync("message",e)}static addListener(e){return this.isExtension?browser.runtime.onMessage.addListener(e):window.addAsyncMessageListener("message",e)}}n.isExtension=!1},function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return l})),r.d(t,"d",(function(){return c})),r.d(t,"b",(function(){return d}));var o=r(1),i=r(7),s=r(19),a=r(8);const n=new o.a(window),l=new i.a,c=new s.a(l),d=new a.a(window)},function(e,t,r){"use strict";t.a={ControlKeysMap:{"${KEY_BACKSPACE}":{keyCode:8,which:8,charCode:0,code:"Backspace",key:"Backspace"},"${KEY_TAB}":{keyCode:9,which:9,charCode:0,code:"Tab",key:"Tab"},"${KEY_ENTER}":{keyCode:13,which:13,charCode:13,code:"Enter",key:"Enter",press:!0},"${KEY_ENTER_NOPRESS}":{keyCode:13,which:13,charCode:13,code:"Enter",key:"Enter",press:!1},"${KEY_SHIFTLEFT}":{keyCode:16,which:16,charCode:0,code:"ShiftLeft",key:"Shift"},"${KEY_SHIFTRIGHT}":{keyCode:16,which:16,charCode:0,code:"ShiftRight",key:"Shift"},"${KEY_CONTROLLEFT}":{keyCode:17,which:17,charCode:0,code:"ControlLeft",key:"Control"},"${KEY_CONTROLRIGHT}":{keyCode:17,which:17,charCode:0,code:"ControlRight",key:"Control"},"${KEY_ALTLEFT}":{keyCode:18,which:18,charCode:0,code:"AltLeft",key:"Alt"},"${KEY_ALTRIGHT}":{keyCode:18,which:18,charCode:0,code:"AltRight",key:"Alt"},"${KEY_CAPSLOCK}":{keyCode:20,which:20,charCode:0,code:"CapsLock",key:"CapsLock"},"${KEY_ESC}":{keyCode:27,which:27,charCode:0,code:"Escape",key:"Escape"},"${KEY_PAGEUP}":{keyCode:33,which:33,charCode:0,code:"PageUp",key:"PageUp"},"${KEY_PAGEDOWN}":{keyCode:34,which:34,charCode:0,code:"PageDown",key:"PageDown"},"${KEY_END}":{keyCode:35,which:35,charCode:0,code:"End",key:"End"},"${KEY_HOME}":{keyCode:36,which:36,charCode:0,code:"Home",key:"Home"},"${KEY_LEFT}":{keyCode:37,which:37,charCode:0,code:"ArrowLeft",key:"ArrowLeft"},"${KEY_UP}":{keyCode:38,which:38,charCode:0,code:"ArrowUp",key:"ArrowUp"},"${KEY_RIGHT}":{keyCode:39,which:39,charCode:0,code:"ArrowRight",key:"ArrowRight"},"${KEY_DOWN}":{keyCode:40,which:40,charCode:0,code:"ArrowDown",key:"ArrowDown"},"${KEY_INSERT}":{keyCode:45,which:45,charCode:0,code:"Insert",key:"Insert"},"${KEY_DELETE}":{keyCode:46,which:46,charCode:0,code:"Delete",key:"Delete"},"${KEY_NUMLOCK}":{keyCode:144,which:144,charCode:0,code:"NumLock",key:"NumLock"}},NormalKeyMap:{A:{keyCode:65,which:65,charCode:65,code:"KeyA",key:"A",data:"A"},B:{keyCode:66,which:66,charCode:66,code:"KeyB",key:"B",data:"B"},C:{keyCode:67,which:67,charCode:67,code:"KeyC",key:"C",data:"C"},D:{keyCode:68,which:68,charCode:68,code:"KeyD",key:"D",data:"D"},E:{keyCode:69,which:69,charCode:69,code:"KeyE",key:"E",data:"E"},F:{keyCode:70,which:70,charCode:70,code:"KeyF",key:"F",data:"F"},G:{keyCode:71,which:71,charCode:71,code:"KeyG",key:"G",data:"G"},H:{keyCode:72,which:72,charCode:72,code:"KeyH",key:"H",data:"H"},I:{keyCode:73,which:73,charCode:73,code:"KeyI",key:"I",data:"I"},J:{keyCode:74,which:74,charCode:74,code:"KeyJ",key:"J",data:"J"},K:{keyCode:75,which:75,charCode:75,code:"KeyK",key:"K",data:"K"},L:{keyCode:76,which:76,charCode:76,code:"KeyL",key:"L",data:"L"},M:{keyCode:77,which:77,charCode:77,code:"KeyM",key:"M",data:"M"},N:{keyCode:78,which:78,charCode:78,code:"KeyN",key:"N",data:"N"},O:{keyCode:79,which:79,charCode:79,code:"KeyO",key:"O",data:"O"},P:{keyCode:80,which:80,charCode:80,code:"KeyP",key:"P",data:"P"},Q:{keyCode:81,which:81,charCode:81,code:"KeyQ",key:"Q",data:"Q"},R:{keyCode:82,which:82,charCode:82,code:"KeyR",key:"R",data:"R"},S:{keyCode:83,which:83,charCode:83,code:"KeyS",key:"S",data:"S"},T:{keyCode:84,which:84,charCode:84,code:"KeyT",key:"T",data:"T"},U:{keyCode:85,which:85,charCode:85,code:"KeyU",key:"U",data:"U"},V:{keyCode:86,which:86,charCode:86,code:"KeyV",key:"V",data:"V"},W:{keyCode:87,which:87,charCode:87,code:"KeyW",key:"W",data:"W"},X:{keyCode:88,which:88,charCode:88,code:"KeyX",key:"X",data:"X"},Y:{keyCode:89,which:89,charCode:89,code:"KeyY",key:"Y",data:"Y"},Z:{keyCode:90,which:90,charCode:90,code:"KeyZ",key:"Z",data:"Z"},a:{keyCode:65,which:65,charCode:97,code:"KeyA",key:"a",data:"a"},b:{keyCode:66,which:66,charCode:98,code:"KeyB",key:"b",data:"b"},c:{keyCode:67,which:67,charCode:99,code:"KeyC",key:"c",data:"c"},d:{keyCode:68,which:68,charCode:100,code:"KeyD",key:"d",data:"d"},e:{keyCode:69,which:69,charCode:101,code:"KeyE",key:"e",data:"e"},f:{keyCode:70,which:70,charCode:102,code:"KeyF",key:"f",data:"f"},g:{keyCode:71,which:71,charCode:103,code:"KeyG",key:"g",data:"g"},h:{keyCode:72,which:72,charCode:104,code:"KeyH",key:"h",data:"h"},i:{keyCode:73,which:73,charCode:105,code:"KeyI",key:"i",data:"i"},j:{keyCode:74,which:74,charCode:106,code:"KeyJ",key:"j",data:"j"},k:{keyCode:75,which:75,charCode:107,code:"KeyK",key:"k",data:"k"},l:{keyCode:76,which:76,charCode:108,code:"KeyL",key:"l",data:"l"},m:{keyCode:77,which:77,charCode:109,code:"KeyM",key:"m",data:"m"},n:{keyCode:78,which:78,charCode:110,code:"KeyN",key:"n",data:"n"},o:{keyCode:79,which:79,charCode:111,code:"KeyO",key:"o",data:"o"},p:{keyCode:80,which:80,charCode:112,code:"KeyP",key:"p",data:"p"},q:{keyCode:81,which:81,charCode:113,code:"KeyQ",key:"q",data:"q"},r:{keyCode:82,which:82,charCode:114,code:"KeyR",key:"r",data:"r"},s:{keyCode:83,which:83,charCode:115,code:"KeyS",key:"s",data:"s"},t:{keyCode:84,which:84,charCode:116,code:"KeyT",key:"t",data:"t"},u:{keyCode:85,which:85,charCode:117,code:"KeyU",key:"u",data:"u"},v:{keyCode:86,which:86,charCode:118,code:"KeyV",key:"v",data:"v"},w:{keyCode:87,which:87,charCode:119,code:"KeyW",key:"w",data:"w"},x:{keyCode:88,which:88,charCode:120,code:"KeyX",key:"x",data:"x"},y:{keyCode:89,which:89,charCode:121,code:"KeyY",key:"y",data:"y"},z:{keyCode:90,which:90,charCode:122,code:"KeyZ",key:"z",data:"z"},0:{keyCode:48,which:48,charCode:48,code:"Digit0",key:"0",data:"0"},")":{keyCode:48,which:48,charCode:41,code:"Digit0",key:")",data:")"},1:{keyCode:49,which:49,charCode:49,code:"Digit1",key:"1",data:"1"},"!":{keyCode:49,which:49,charCode:33,code:"Digit1",key:"!",data:"!"},2:{keyCode:50,which:50,charCode:50,code:"Digit2",key:"2",data:"2"},"@":{keyCode:50,which:50,charCode:64,code:"Digit2",key:"@",data:"@"},3:{keyCode:51,which:51,charCode:51,code:"Digit3",key:"3",data:"3"},"#":{keyCode:51,which:51,charCode:35,code:"Digit3",key:"#",data:"#"},4:{keyCode:52,which:52,charCode:52,code:"Digit4",key:"4",data:"4"},$:{keyCode:52,which:52,charCode:36,code:"Digit4",key:"$",data:"$"},5:{keyCode:53,which:53,charCode:53,code:"Digit5",key:"5",data:"5"},"%":{keyCode:53,which:53,charCode:37,code:"Digit5",key:"%",data:"%"},6:{keyCode:54,which:54,charCode:54,code:"Digit6",key:"6",data:"6"},"^":{keyCode:54,which:54,charCode:94,code:"Digit6",key:"^",data:"^"},7:{keyCode:55,which:55,charCode:55,code:"Digit7",key:"7",data:"7"},"&":{keyCode:55,which:55,charCode:38,code:"Digit7",key:"&",data:"&"},8:{keyCode:56,which:56,charCode:56,code:"Digit8",key:"8",data:"8"},"*":{keyCode:56,which:56,charCode:42,code:"Digit8",key:"*",data:"*"},9:{keyCode:57,which:57,charCode:57,code:"Digit9",key:"9",data:"9"},"(":{keyCode:57,which:57,charCode:40,code:"Digit9",key:"(",data:"("},",":{keyCode:186,which:186,charCode:59,code:"Semicolon",key:",",data:","},":":{keyCode:186,which:186,charCode:58,code:"Semicolon",key:":",data:":"},"=":{keyCode:187,which:187,charCode:61,code:"Equal",key:"=",data:"="},"+":{keyCode:187,which:187,charCode:43,code:"Equal",key:"+",data:"+"},";":{keyCode:188,which:188,charCode:44,code:"Comma",key:";",data:";"},"<":{keyCode:188,which:188,charCode:60,code:"Comma",key:"<",data:"<"},"-":{keyCode:189,which:189,charCode:45,code:"Minus",key:"-",data:"-"},_:{keyCode:189,which:189,charCode:95,code:"Minus",key:"_",data:"_"},".":{keyCode:190,which:190,charCode:46,code:"Period",key:".",data:"."},">":{keyCode:190,which:190,charCode:62,code:"Period",key:">",data:">"},"/":{keyCode:191,which:191,charCode:47,code:"Slash",key:"/",data:"/"},"?":{keyCode:191,which:191,charCode:63,code:"Slash",key:"?",data:"?"},"`":{keyCode:192,which:192,charCode:96,code:"Backquote",key:"`",data:"`"},"~":{keyCode:192,which:192,charCode:126,code:"Backquote",key:"~",data:"~"},"[":{keyCode:219,which:219,charCode:91,code:"BracketLeft",key:"[",data:"["},"{":{keyCode:219,which:219,charCode:123,code:"BracketLeft",key:"{",data:"{"},"\\":{keyCode:220,which:220,charCode:92,code:"Backslash",key:"\\",data:"\\"},"|":{keyCode:220,which:220,charCode:124,code:"Backslash",key:"|",data:"|"},"]":{keyCode:221,which:221,charCode:93,code:"BracketRight",key:"]",data:"]"},"}":{keyCode:221,which:221,charCode:125,code:"BracketRight",key:"}",data:"}"},"'":{keyCode:222,which:222,charCode:39,code:"Quote",key:"'",data:"'"},'"':{keyCode:222,which:222,charCode:34,code:"Quote",key:'"',data:'"'}," ":{keyCode:32,which:32,charCode:32,code:"Space",key:"Process",data:" "}},NumpadKeyMap:{0:{keyCode:96,which:96,charCode:48,code:"Numpad0",key:"0",data:"0"},1:{keyCode:97,which:97,charCode:49,code:"Numpad1",key:"1",data:"1"},2:{keyCode:98,which:98,charCode:50,code:"Numpad2",key:"2",data:"2"},3:{keyCode:99,which:99,charCode:51,code:"Numpad3",key:"3",data:"3"},4:{keyCode:100,which:100,charCode:52,code:"Numpad4",key:"4",data:"4"},5:{keyCode:101,which:101,charCode:53,code:"Numpad5",key:"5",data:"5"},6:{keyCode:102,which:102,charCode:54,code:"Numpad6",key:"6",data:"6"},7:{keyCode:103,which:103,charCode:55,code:"Numpad7",key:"7",data:"7"},8:{keyCode:104,which:104,charCode:56,code:"Numpad8",key:"8",data:"8"},9:{keyCode:105,which:105,charCode:57,code:"Numpad9",key:"9",data:"9"},"*":{keyCode:106,which:106,charCode:42,code:"NumpadMultiply",key:"*",data:"*"},"+":{keyCode:107,which:107,charCode:43,code:"NumpadAdd",key:"+",data:"+"},"-":{keyCode:109,which:109,charCode:45,code:"NumpadSubtract",key:"-",data:"-"},".":{keyCode:110,which:110,charCode:46,code:"NumpadDecimal",key:".",data:"."},"/":{keyCode:111,which:111,charCode:47,code:"NumpadDivide",key:"/",data:"/"},"${KEY_NUMENTER}":{keyCode:13,which:13,charCode:13,code:"NumpadEnter",key:"Enter"}},FunctionalKeyMap:{"${KEY_F1}":{keyCode:112,which:112,charCode:0,code:"F1",key:"F1"},"${KEY_F2}":{keyCode:113,which:113,charCode:0,code:"F2",key:"F2"},"${KEY_F3}":{keyCode:114,which:114,charCode:0,code:"F3",key:"F3"},"${KEY_F4}":{keyCode:115,which:115,charCode:0,code:"F4",key:"F4"},"${KEY_F5}":{keyCode:116,which:116,charCode:0,code:"F5",key:"F5"},"${KEY_F6}":{keyCode:117,which:117,charCode:0,code:"F6",key:"F6"},"${KEY_F7}":{keyCode:118,which:118,charCode:0,code:"F7",key:"F7"},"${KEY_F8}":{keyCode:119,which:119,charCode:0,code:"F8",key:"F8"},"${KEY_F9}":{keyCode:120,which:120,charCode:0,code:"F9",key:"F9"},"${KEY_F10}":{keyCode:121,which:121,charCode:0,code:"F10",key:"F10"},"${KEY_F11}":{keyCode:122,which:122,charCode:0,code:"F11",key:"F11"},"${KEY_F12}":{keyCode:123,which:123,charCode:0,code:"F12",key:"F12"}}}},function(e,t,r){"use strict";function o(e){return e.replace(/&/gi,"&").replace(/"/gi,'"').replace(/</gi,"<").replace(/>/gi,">").replace(/'/gi,"'")}function i(e){for(var t=0,r=-1,o=e,i="",s="",a="",l=!1;;){if(t=e.indexOf(" "),(r=e.indexOf(" ",t+1))>=0)for(;"'"!=e.charAt(r-1)&&'"'!=e.charAt(r-1)&&!((r=e.indexOf(" ",r+1))<0););if(t>=0&&r>=0)i=e.substring(t+1,r),o=e.substring(0,t+1),e=e.substring(r);else{if(!(t>=0&&r<0)){l?a+=">":a=e;break}i=e.substring(t+1,e.length-1),o=e.substring(0,t+1),e=""}l=!0;var c=i.indexOf("=");if("'"==i.charAt(c+1)&&-1!=i.indexOf("'")){var d=i.indexOf("'"),u=i.lastIndexOf("'");s=i.substring(d+1,u),i=i.substring(0,d+1),i+=(s=n(s))+"'"}if('"'==i.charAt(c+1)&&-1!=i.indexOf('"')){var h=i.indexOf('"'),m=i.lastIndexOf('"');s=i.substring(h+1,m),i=i.substring(0,h+1),i+=(s=n(s))+'"'}a+=o+i}return a}function s(e){return e.replace(/[&"'<>]/g,e=>({"&":"&",'"':""","'":"'","<":"<",">":">"}[e]))}function a(e,t,r){switch(r){case 1:return e+(t+"&");case 2:return e+(t+""");case 3:return e+(t+"'");case 4:return e+(t+"<");case 5:return e+(t+">");default:return e}}function n(e){for(var t,r=-1,o="",i="",n=0;;){if(t=0,-1==(r=e.indexOf("&",r+1))){o+=e;break}"&"==e.substring(r,r+5)?(t=1,i=e.substring(0,r),e=e.substring(r+5)):"""==e.substring(r,r+6)?(t=2,i=e.substring(0,r),e=e.substring(r+6)):"'"==e.substring(r,r+5)?(t=3,i=e.substring(0,r),e=e.substring(r+5)):"<"==e.substring(r,r+4)?(t=4,i=e.substring(0,r),e=e.substring(r+4)):">"==e.substring(r,r+4)&&(t=5,i=e.substring(0,r),e=e.substring(r+4)),0!=t&&(r=-1,o=a(o,i=s(i),t),n=1)}return 0==n?s(e):o}function l(e){for(var t=e.indexOf("<"),r=e.indexOf(">"),o="",s="",a="",l=0;;){if(!(t>=0)){n(e);break}if(!(r>=0)){n(e);break}do{t+=l,o=e.substring(0,t),l=(s=e.substring(t,r+1)).lastIndexOf("<")}while(0!=l);s=i(s),e=e.substring(r+1),a+=n(o)+s,t=e.indexOf("<"),r=0;do{r=e.indexOf(">",r+1)}while(r<t&&-1!=r)}return""!=e&&(a+=n(e)),a}r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l}))},function(e,t){e.exports=require("autobind-decorator")},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var o=r(0);class i{constructor(){this.altKeyDown=!1,this.controlKeyDown=!1,this.shiftKeyDown=!1,this.metaKeyDown=!1,this.window=window}triggerFocusEvent(e){var t=new FocusEvent("focus");e.dispatchEvent(t)}triggerChangeEvent(e){const t=new Event("change",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(t)}fireMouseEvent(e,t,r=!0,o=0,i=0,s=0){const a=new MouseEvent(t,{bubbles:r,cancelable:!0,clientX:o,clientY:i,ctrlKey:this.controlKeyDown,shiftKey:this.shiftKeyDown,altKey:this.altKeyDown,metaKey:this.metaKeyDown,button:s});return e.dispatchEvent(a)}triggerDragEvent(e,t){var r=` function simulateDragDrop(sourceNode, destinationNode){ function createCustomEvent(type) { var event = new CustomEvent('CustomEvent'); event.initCustomEvent(type, true, true, null); event.dataTransfer = { data: { }, setData: function(type, val) { this.data[type] = val; }, getData: function(type) { return this.data[type]; } }; return event; } function dispatchEvent(node, type, event) { if (node.dispatchEvent) { return node.dispatchEvent(event); } if (node.fireEvent) { return node.fireEvent('on' + type, event); } } var event = createCustomEvent('dragstart'); dispatchEvent(sourceNode, 'dragstart', event); var dropEvent = createCustomEvent('drop'); dropEvent.dataTransfer = event.dataTransfer; dispatchEvent(destinationNode, 'drop', dropEvent); var dragEndEvent = createCustomEvent('dragend'); dragEndEvent.dataTransfer = event.dataTransfer; dispatchEvent(sourceNode, 'dragend', dragEndEvent); } simulateDragDrop(document.evaluate('${o.b.xpathGenerator(e)}', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue, document.evaluate('${o.b.xpathGenerator(t)}', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue); `;const i=this.getCurrentWindow().document,s=i.createElement("script");s.type="text/javascript",s.text=r,i.body.appendChild(s)}openLocation(e){var t=this.getCurrentWindow();t.location.href===e?t.location.reload():t.location.href=e}getCurrentWindow(){return window}getTitle(){var e=this.getCurrentWindow().document.title;return"string"==typeof e&&(e=e.trim()),e}findElementBy(e,t,r,s){const a=i.locationStrategies[e];if(!a)throw new o.b.SeleniumError("Unrecognised locator type: '"+e+"'");return a.call(this,t,r,s)}findElementRecursive(e,t,r,o){var i=this.findElementBy(e,t,r,o);if(null!=i)return i;for(var s=0;s<o.frames.length;s++)try{if(o.frames[s].document&&null!=(i=this.findElementRecursive(e,t,o.frames[s].document,o.frames[s])))return i}catch(e){return null}}findElementOrNull(e,t,r){e=o.b.parse_locator(e),null==t&&(t=this.getCurrentWindow()),null==r&&(r=t.document);var i=this.findElementBy(e.type,e.string,r,t);return null!=i?i:null}findElement(e,t,r){var o=this.findElementOrNull(e,t,r);return this.checkElementExist(o,e),o}checkElementExist(e,t){if(null==e)throw t.includes("TAC_LOCATOR")?new o.b.SeleniumError("Element located by TAC not found"):"auto-located-by-tac"==t?new this.SeleniumError('The value "auto-located-by-tac" only can be automatically generated when recording a command'):new o.b.SeleniumError("Element "+t+" not found")}selectOption(e,t){this.triggerFocusEvent(e);for(var r=!1,o=0;o<e.options.length;o++){var i=e.options[o];i.selected&&i!=t?(i.selected=!1,r=!0):i.selected||i!=t||(i.selected=!0,r=!0)}r&&this.triggerChangeEvent(e)}addSelection(e,t){this.checkMultiselect(e),this.triggerFocusEvent(e),t.selected||(t.selected=!0,this.triggerChangeEvent(e))}removeSelection(e,t){this.checkMultiselect(e),this.triggerFocusEvent(e),t.selected&&(t.selected=!1,this.triggerChangeEvent(e))}checkMultiselect(e){if(!e.multiple)throw new o.b.SeleniumError("Not a multi-select")}selectElementsBy(e,t,r){var s=i.filterFunctions[e];if(!s)throw new o.b.SeleniumError("Unrecognised element-filter type: '"+e+"'");return s(t,r)}selectElements(e,t,r){var o=r||"value",i=e.match(/^([A-Za-z]+)=(.+)/);return i&&(o=i[1].toLowerCase(),e=i[2]),this.selectElementsBy(o,e,t)}cancelNextPrompt(){return this.setNextPromptResult(null)}postMessageToPageEnv(e={}){e.from="sideex-content-env",window.postMessage(e,"*")}async setNextPromptResult(e){this.promptResponse=!1,this.postMessageToPageEnv({type:"command",args:{commandType:"setNextPromptResult",target:e}});for(let e=0;e<=60;e++){if(this.promptResponse)return void(this.promptResponse=!1);await o.b.delay(500)}throw"No response"}async getPromptMessage(){this.promptResponse=!1,this.promptMessage=null,this.postMessageToPageEnv({type:"command",args:{commandType:"getPromptMessage"}});for(let e=0;e<=60;e++){if(this.promptResponse){const e=this.promptMessage;return this.promptResponse=!1,this.promptMessage=null,e}await o.b.delay(500)}throw"No response"}async setNextConfirmationResult(e){this.confirmationResponse=!1,this.postMessageToPageEnv({type:"command",args:{commandType:"setNextConfirmationResult",target:e}});for(let e=0;e<=60;e++){if(this.confirmationResponse)return void(this.confirmationResponse=!1);await o.b.delay(500)}throw"No response"}async getConfirmationMessage(){this.confirmationResponse=!1,this.confirmationMessage=null,this.postMessageToPageEnv({type:"command",args:{commandType:"getConfirmationMessage"}});for(let e=0;e<=60;e++){if(this.confirmationResponse){const e=this.confirmationMessage;return this.confirmationResponse=!1,this.confirmationMessage=null,e}await o.b.delay(500)}throw"No response"}async getAlertMessage(){for(let e=0;e<=60;e++){if(this.alertResponse){const e=this.alertMessage;return this.alertResponse=!1,this.alertMessage=null,e}await o.b.delay(500)}throw"No response"}async getRunScriptMessage(e){-1==e&&(e=Number.MAX_SAFE_INTEGER);for(let t=0;t<=e;t+=100){if(this.runScriptResponse){const e=this.runScriptMessage;return this.runScriptResponse=!1,this.runScriptMessage=null,e}await o.b.delay(100)}return"No error!!!!"}}i.locationStrategies={implicit:(e,t,r)=>e.startsWith("//")?i.locationStrategies.xpath(e,t,r):e.startsWith("document.")?i.locationStrategies.domtraversal(e,t,r):i.locationStrategies.identifier(e,t,r),identifier:(e,t,r)=>i.locationStrategies.id(e,t,r)||i.locationStrategies.name(e,t,r)||null,id(e,t,r){var o=t.getElementById(e);return o&&o.getAttribute("id")===e?o:null},name(e,t,r){var o=t.getElementsByTagName("*"),i="name="+e;return(o=this.selectElements(i,o,"value")).length>0?o[0]:null},xpath:(e,t,r)=>t.evaluate(e,t,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue,link(e,t,r){for(var i=t.getElementsByTagName("a"),s=0;s<i.length;s++){var a=i[s];if(o.a.matches(e,o.b.getText(a)))return a}return null},tac(e,t,r){var o=t.getElementsByTagName("*");for(let e=0,i=o.length;e<i;e++){if(null==o[e])continue;let i=r.getComputedStyle(o[e]);if("none"==i.display||"hidden"==i.visibility){let r=t.createAttribute("hidden-annotated-by-tac");o[e].setAttributeNode(r)}}let i=t.documentElement.outerHTML;for(let e=0,t=o.length;e<t;e++)null!=o[e]&&o[e].hasAttribute("hidden-annotated-by-tac")&&o[e].removeAttribute("hidden-annotated-by-tac");var s=new Tac("//html","",i);s.testOldXPath()||s.fixOldXPath(),e=e.split("TAC_LOCATOR:")[1];var a=s.locate(e);return null!=a?t.evaluate(a,t,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue:null},css(e,t){var r=o.b.eval_css(e,t);return 0!=r.length?r[0]:null}},i.filterFunctions={name(e,t){for(var r=[],o=0;o<t.length;o++)t[o].name===e&&r.push(t[o]);return r},value(e,t){for(var r=[],o=0;o<t.length;o++)t[o].value===e&&r.push(t[o]);return r},index(e,t){if(e=Number(e),isNaN(e)||e<0)throw new o.b.SeleniumError("Illegal Index: "+e);if(t.length<=e)throw new o.b.SeleniumError("Index out of range: "+e);return[t[e]]}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var o=r(7),i=r(0);class s{constructor(e){this.window=void 0,this._pageBot=null,this.window=e}detach(){this._pageBot&&(this._pageBot=void 0)}get pageBot(){return null==this._pageBot&&(this._pageBot=new o.a,this._pageBot.getCurrentWindow=()=>this.window),this._pageBot}buildWith(e,t,r){return s.builderMap[e].call(this,t,r)}elementEquals(e,t,r){return t==this.findElement(r)}build(e){const t=this.buildAll(e);return t.length>0?t[0][0]:"LOCATOR_DETECTION_FAILED"}buildAll(e,t){const r=[],i=o.a.locationStrategies;for(const o of s.order)try{const s=this.buildWith(o,e,t);s&&("tac"==o||e==this.findElement(s,t)||i[o])&&r.push([s,o])}catch(e){console.error(e)}return r}findElement(e,t){try{return this.pageBot.findElement(e,null,t)}catch(e){return null}}attributeValue(e){const t=[];if(e.match(/.*?(["'])(\1|[^"'])*/g)){for(const r of e.match(/.*?(["'])(\1|[^"'])*/g))r.indexOf("'")>=0?t.push('"'+r+'"'):t.push("'"+r+"'");const r=t.join(",");return t.length>1?"concat("+r+")":r}return e}xpathHtmlElement(e){return"application/xhtml+xml"==this.window.document.contentType?"x:"+e:e}relativeXPathFromParent(e){const t=this.getNodeNumber(e);let r="/"+this.xpathHtmlElement(e.tagName.toLowerCase());return t>0&&(r+="["+t+"]"),r}getNodeNumber(e){const t=e.parentNode.children;let r=0;for(const o of t)if(o.tagName==e.tagName&&(r++,o==e))break;return r}getCSSSubPath(e){let t=["id","name","class","type","alt","title","value"],r=this.getNodeNumber(e),o=e.tagName.toLowerCase();for(let r of t){let t=e.getAttribute(r);if(t){o="id"==r?"#"+t:"class"==r?e.tagName.toLowerCase()+"."+t.replace(/\s+/g,".").replace("..","."):e.tagName.toLowerCase()+"["+r+'="'+t+'"]';break}}let s=i.b.eval_css(o,e.ownerDocument);return r>1&&s.length>1?o+":nth-child("+r+")":o}preciseXPath(e,t){if(this.findElement(e)!=t){const r=t.ownerDocument.evaluate(e,t.ownerDocument,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(let o=0;o<r.snapshotLength;o++){const r="xpath=("+e+")["+(o+1)+"]";if(this.findElement(r)==t)return r}}return e}static add(e,t){this.order.push(e),this.builderMap[e]=t,this._orderChanged()}static _orderChanged(){this._ensureAllPresent(this.order,this._preferredOrder);this._sortByRefOrder(this.order,this._preferredOrder)}static setPreferredOrder(e){this._preferredOrder=e instanceof String?e.split(","):e,this._orderChanged()}static get getPreferredOrder(){return this._preferredOrder}static _sortByRefOrder(e,t){var r=t.length;e.sort((function(e,o){var i=t.indexOf(e),s=t.indexOf(o);return(i>-1?i:r)-(s>-1?s:r)}))}static _ensureAllPresent(e,t){let r=!1;for(const o of e)-1==t.indexOf(o)&&(t.push(o),r=!0);return r}}s.order=void 0,s.builderMap=void 0,s._preferredOrder=void 0,s._preferredOrder=[],s.order=["id","name","xpath:link","xpath:img","xpath:attributes","xpath:idRelative","xpath:href","xpath:position","css","link"],s.builderMap={id:function(e){return e.id?"id="+e.id:null},link:function(e){if("A"==e.tagName){const t=e.textContent;if(!t.match(/^\s*$/))return"link="+i.b.exactMatchPattern(t.replace(/\xA0/g," ").replace(/^\s*(.*?)\s*$/,"$1"))}return null},name:function(e){return e.hasAttribute("name")?"name="+e.getAttribute("name"):null},"xpath:link":function(e){if("A"==e.tagName){const t=e.textContent;if(!t.match(/^\s*$/))return this.preciseXPath(`//${this.xpathHtmlElement("a")}[contains(text(),'${t.trim()}')]`,e)}return null},"xpath:img":function(e){if("IMG"==e.tagName){const t=e;if(""!=t.alt)return this.preciseXPath(`//${this.xpathHtmlElement("img")}[@alt='${this.attributeValue(t.alt)}']`,t);if(""!=t.title)return this.preciseXPath(`//${this.xpathHtmlElement("img")}[@title='${this.attributeValue(t.title)}']`,t);if(""!=t.src)return this.preciseXPath(`//${this.xpathHtmlElement("img")}[contains(@src,'${this.attributeValue(t.src)}')]`,t)}return null},"xpath:attributes":function(e){const t=["id","name","value","type","action","onclick"],r=(t,r,o)=>{let i="//"+this.xpathHtmlElement(t)+"[";for(const[e,t]of r.entries())+e>0&&(i+=" and "),i+="@"+t+"="+this.attributeValue(o[t]);return i+="]",this.preciseXPath(i,e)};if(e.attributes){const o={};for(const t of e.attributes)o[t.name]=t.value;const i=[];for(const s of t)if(null!=o[s]){i.push(s);const t=r(e.tagName.toLowerCase(),i,o);if(e==this.findElement(t))return t}}return null},"xpath:idRelative":function(e){let t="";for(let r=e;null!=r.parentElement;r=r.parentElement){t=this.relativeXPathFromParent(r)+t;const o=r.parentElement;if(o.hasAttribute("id"))return this.preciseXPath(`//${this.xpathHtmlElement(o.tagName.toLowerCase())}[@id='${this.attributeValue(o.getAttribute("id"))}']${t}`,e)}return null},"xpath:href":function(e){if(e.attributes&&e.hasAttribute("href")){const t=e.getAttribute("href");return t.search(/^http?:\/\//)?this.preciseXPath(`//${this.xpathHtmlElement("a")}[@href='${this.attributeValue(t)}']`,e):this.preciseXPath(`//${this.xpathHtmlElement("a")}[contains(@href,'${this.attributeValue(t)}']`,e)}return null},"xpath:position":function(e,t){let r="";for(let o=e;null!=o;o=o.parentElement){let i="";const s=o.tagName.toLowerCase();if(i=null!=o.parentElement?this.relativeXPathFromParent(o):"/"+this.xpathHtmlElement(s),"[object HTMLUnknownElement]"==this.window.document.createElement(s).toString()){const e=i.indexOf("[");i="/*[name()='"+s+"']"+(-1==e?"":i.substring(e))}r=i+r;const a="/"+r;if(e==this.findElement(a,t))return a}return null},css:function(e,t){let r=this.getCSSSubPath(e);for(let o=e;this.findElement("css="+r,t)!=e&&"HTML"!=o.tagName;o=o.parentElement)r=this.getCSSSubPath(o.parentElement)+" > "+r;return"css="+r}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));const o={open:{isDoSnapshot:!1,type:{record:"window",playback:"content"},isManual:!1,verifyLocator:!1,reference:{name:"open",target:"A URL",value:"X",description:"Open a webpage."}},selectWindow:{isDoSnapshot:!1,type:{record:"window",playback:"extension_select"},isManual:!1,verifyLocator:!1,reference:{name:"selectWindow",target:"Auto-generated",value:"X",description:"Select the target window. This command is intended to be auto-generated while recording."}},selectFrame:{isDoSnapshot:!1,type:{record:"window",playback:"extension_select"},isManual:!1,verifyLocator:!1,reference:{name:"selectFrame",target:"index=0 (Select the first frame of index 0), or relative=parent (Select the parent frame), or relative=top (Select the top frame)",value:"X",description:"Select the target frame. This command is intended to be auto-generated while recording."}},clearCookie:{isDoSnapshot:!1,type:{record:"others",playback:"content"},isManual:!0,verifyLocator:!1,reference:{name:"clearCookie",target:'an URL with "http://" or "https://" prefix included',value:"a cookie name or X",description:"Remove a cookie from the target URL, if value field is empty, all cookies in target URL will be removed."}},close:{isDoSnapshot:!1,type:{record:"window",playback:"extension"},isManual:!1,verifyLocator:!1,reference:{name:"close",target:"Auto-generated",value:"X",description:"Close the target window. This command is intended to be auto-generated while recording."}},clickAt:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"clickAt",target:"A locator",value:"x,y position of the mouse event relative to the target element. For example: 10,10. Left blank means a simple click.",description:""}},doubleClickAt:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"doubleClickAt",target:"A locator",value:"x,y position of the mouse event relative to the target element. For example: 10,10. Left blank means a simple double click.",description:""}},mouseDownAt:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"mouseDownAt",target:"A locator",value:"x,y position of the mouse event relative to the target element. For example: 10,10",description:""}},mouseMoveAt:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"mouseMoveAt",target:"A locator",value:"A JSON String containing a series of movements.",description:'An example of value: {"Movements":[{"TD":8,"OX":-2,"OY":0},{"TD":16,"OX":-4,"OY":1},{"TD":16,"OX":-5,"OY":1}]}. TD means the time delay to the previous movement. OX and OY mean the offset x and y to the previous movement. Supposely, a sequence of recorded mouseMoveAt commands is preceded by a mouseDownAt command, and the first movement\'s OX and OY of each command is relative to the last movement of the previous command. If a sequence of mouseMoveAt commands is not preceded by a mouseDownAt command, the OX and OY of the first movement of each command is relative to position (0,0) of the page.'}},mouseOut:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"mouseOut",target:"A locator",value:"X",description:""}},mouseOver:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"mouseOver",target:"A locator",value:"X",description:""}},setCSS:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"setCSS",target:"A locator",value:"A CSS style string. ",description:"An example of value: background-color: rgb(237, 238, 238); text-decoration: none solid rgb(102, 0, 51);"}},mouseUpAt:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"mouseUpAt",target:"A locator",value:"x,y position of the mouse event relative to the target element. For example: 10,10",description:""}},dragAndDrop:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"dragAndDrop",target:"The locator of the element to be dragged",value:"A JSON String containing start position, and a series of movements.",description:'An example of value: {"StartPoint":{"X":92,"Y":31},"Movements":[{"TD":8,"OX":-2,"OY":0},{"TD":16,"OX":-4,"OY":1},{"TD":16,"OX":-5,"OY":1}]}. TD means the time delay to the previous movement. OX and OY mean the offset x and y to the previous movement.'}},dragAndDropToObject:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"dragAndDropToObject",target:"The locator of the element to be dragged",value:"The locator of the element on which the target element is dropped",description:""}},sendKeys:{isDoSnapshot:!0,type:{record:"keyboard",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"sendKeys",target:"A locator",value:"A string or a special keystroke, e.g., ${KEY_DOWN}",description:" The target input element should be one of the following types: text, password, email, url, search, tel, number. A special keystroke can be one of the followings: ${KEY_BACKSPACE}, ${KEY_TAB}, ${KEY_ENTER}, ${KEY_ENTER_NOPRESS}, ${KEY_SHIFTLEFT}, ${KEY_SHIFTRIGHT}, ${KEY_CONTROLLEFT}, ${KEY_CONTROLRIGHT}, ${KEY_ALTLEFT}, ${KEY_ALTRIGHT}, ${KEY_CAPSLOCK}, ${KEY_ESC}, ${KEY_PAGEUP}, ${KEY_PAGEDOWN}, ${KEY_END}, ${KEY_HOME}, ${KEY_LEFT}, ${KEY_UP}, ${KEY_RIGHT}, ${KEY_DOWN}, ${KEY_INSERT}, ${KEY_DELETE}, ${KEY_NUMLOCK}, ${KEY_NUMENTER}, ${KEY_F1}, ${KEY_F2}, ${KEY_F3}, ${KEY_F4}, ${KEY_F5}, ${KEY_F6}, ${KEY_F7}, ${KEY_F8}, ${KEY_F9}, ${KEY_F10}, ${KEY_F11}, ${KEY_F12}."}},submit:{isDoSnapshot:!0,type:{record:"others",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"submit",target:"The locator of the form to be submitted",value:"X",description:""}},onsubmit:{isDoSnapshot:!0,type:{record:"others",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"onsubmit",target:"The locator of the form",value:"X",description:""}},type:{isDoSnapshot:!0,type:{record:"keyboard",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"type",target:"A locator",value:"The string to be set to the target element",description:"The target input element should be one of the following types: color, date, datetime-local, month, range, time, week."}},editContent:{isDoSnapshot:!0,type:{record:"keyboard",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"editContent",target:"A locator",value:'The string to be set to the content of the target element with attribute contenteditable="true"',description:""}},changeSelection:{isDoSnapshot:!0,type:{record:"keyboard",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"changeSelection",target:"A locator",value:"A JSON String containing node order, and text offset.",description:'An example of value: {"N":0,"O":5}. N means the order of node to select. O means the offset of text to focus.'}},addSelection:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"addSelection",target:"A locator of a multi-select box",value:"An option locator of the element to be added. For example: label=Option1.",description:""}},removeSelection:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"removeSelection",target:"A locator of a multi-select box",value:"An option locator of the element to be removed. For example: label=Option1",description:""}},select:{isDoSnapshot:!0,type:{record:"mouse",playback:"content"},isManual:!1,verifyLocator:!0,reference:{name:"select",target:"A locator of a drop-down menu",value:"An option locator. For example: label=Option1",description:""}},assertAlert:{isDoSnapshot:!1,type:{record:"assert",playback:"content"},isManual:!0,verifyLocator:!1,reference:{name:"assertAlert",target:"The expected alert message",value:"X",description:""}},assertConfirmation:{isDoSnapshot:!1,type:{record:"assert",playback:"content"},isManual:!0,verifyLocator:!1,reference:{name:"assertConfirmation",target:"The expected confirmation message",value:"X",description:""}},chooseOkOnNextConfirmation:{isDoSnapshot:!1,type:{record:"others",playback:"content"},isManual:!1,verifyLocator:!1,reference:{name:"chooseOkOnNextConfirmation",target:"X",value:"X",description:""}},chooseCancelOnNextConfirmation:{isDoSnapshot:!1,type:{record:"others",playback:"content"},isManual:!1,verifyLocator:!1,reference:{name:"chooseCancelOnNextConfirmation",target:"X",value:"X",description:""}},assertPrompt:{isDoSnapshot:!1,type:{record:"assert",playback:"content"},isManual:!0,verifyLocator:!1,reference:{name:"assertPrompt",target:"The expected prompt message",value:"X",description:""}},answerOnNextPrompt:{isDoSnapshot:!1,type:{record:"others",playback:"content"},isManual:!1,verifyLocator:!1,reference:{name:"answerOnNextPrompt",target:"The string to be set to the next prompt pop-up",value:"X",description:""}},chooseCancelOnNextPrompt:{isDoSnapshot:!1,type:{record:"assert",playback:"content"},isManual:!1,verifyLocator:!1,reference:{name:"chooseCancelOnNextPrompt",target:"X",value:"X",description:""}},echo:{isDoSnapshot:!1,type:{record:"others",playback:"content"},isManual:!0,verifyLocator:!1,reference:{name:"echo",target:"The string to be printed in the log tab. Variables declared in the storeXXX commands or Variable tab can be used in the string. For example: Hello ${var_usr}",value:"X",description:""}},pause:{isDoSnapshot:!1,type:{record:"others",playback:"extension"},isManual:!0,verifyLocator:!1,reference:{name:"pause",target:"X",value:"The amount of time to sleep in millisecond. For example: 5000 means sleeping for 5 seconds.",description:""}},runScript:{isDoSnapshot:!1,type:{record:"others",playback:"content"},isManual:!1,verifyLocator:!1,reference:{name:"runScript",target:"A Javascript expression to be run. For example: var a=10; var b=10; console.log(a+b);.",value:"The amount of time to wait before timeout in millisecond. Set -1 for infinite wait",description:"NOTE THAT: Avoid using alert(), prompt(), and confirm() in the Javascript expression. These three functions will not take effect while playing. Please use console.log() to log m