const offset={x:0,y:0};function createCalibrator(className,textContent){var calibrator=document.createElement("div");return calibrator.className=className,calibrator.textContent=textContent,calibrator}const latchCalibrator={};function checkCalibrator(class_name,check){return class_name in latchCalibrator||(latchCalibrator[class_name]=!1),latchCalibrator[class_name]||(check?(latchCalibrator[class_name]=check,latchCalibrator[class_name]):void 0)}function resetCalibrators(){for(const latchKey in latchCalibrator)latchCalibrator[latchKey]=!0}function setOffset(x,y){offset.x=x,offset.y=y}function create_instruction_box(name){var instruct_body=document.createElement("div"),instruction=(instruct_body.className="instruct_body",document.createElement("div")),arrow=(instruction.className="instruction",instruction.innerText="Look there",document.createElement("div"));arrow.className="arrow arrow_"+name,arrow.style.position="fixed";for(let i=0;i<3;i++)arrow.appendChild(document.createElement("span"));return instruct_body.appendChild(instruction),instruct_body.appendChild(arrow),instruct_body}function display_calibrator(name){var element=createCalibrator("calibrator calibrator_"+name+" message-"+name,"Move cursor here"),name=create_instruction_box(name),background=document.createElement("div");background.className="calibration_background",document.body.appendChild(name),document.body.appendChild(element),document.body.appendChild(background)}function remove_calibrator(name){name=document.getElementsByClassName("calibrator_"+name);0=calibration_sequence.length&&0MIN_TIME_WAIT):"right"==calibration_sequence[calibration_counter]?ret_val=checkCalibrator(".calibrator_"+calibration_sequence[calibration_counter],width-160<=x&&fix&&Date.now()-startTimestamp>MIN_TIME_WAIT):"bottom"==calibration_sequence[calibration_counter]?ret_val=checkCalibrator(".calibrator_"+calibration_sequence[calibration_counter],height-160<=y&&fix&&Date.now()-startTimestamp>MIN_TIME_WAIT):"top"==calibration_sequence[calibration_counter]&&(ret_val=checkCalibrator(".calibrator_"+calibration_sequence[calibration_counter],y<=160&&fix&&Date.now()-startTimestamp>MIN_TIME_WAIT))),ret_val&&(remove_calibrator(calibration_sequence[calibration_counter]),calibration_counter+=1,startTimestamp=Date.now(),calibration_counter=calibration_sequence.length}function checkCalibration(x,y,fix){var width=window.innerWidth||document.documentElement.clientWidth,height=window.innerHeight||document.documentElement.clientHeight,fix=.2{var gridContainer,colContainer=document.createElement("div"),row_height_prcnt=(colContainer.classList.add("container_col"),colContainer.style.width=col_width_prcnt+"%",colContainer.style.height="100%",100/numRows);1==i?colContainer.style.marginLeft="0px":i==numCols&&(colContainer.style.marginRight="0px");for(let j=1;j<=numRows;j++){var tile=document.createElement("div");tile.classList.add("tile"),tile.id="tile_"+counter,tile.style.height=row_height_prcnt+"%",1==j&&(tile.style.marginTop="0px"),j==numRows&&(tile.style.marginBottom="0px"),tiles_list.push(tile),colContainer.appendChild(tile),counter+=1}sightGrid&&((gridContainer=document.getElementById("grid_container")).style.width="100vw",gridContainer.style.height="100vh",gridContainer.style.display="flex",gridContainer.style.position="absolute",gridContainer.appendChild(colContainer)),i+=1})}),sightGrid&&document.addEventListener("DOMContentLoaded",function(){var gridEffect=document.createElement("div"),n_points=(gridEffect.classList.add("card__grid-effect"),200);(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/Android/i))&&(n_points=100,gridEffect.style.gridTemplateColumns="repeat(10, 1fr)");for(let i=1;i<=n_points;i++){var tile=document.createElement("a");tile.classList.add("card__grid-effect-tile"),tile.style.backgroundColor=sightGridColor,tile.href="#",tile.id=i+"_id",gridEffect.appendChild(tile)}document.getElementById("grid_container").appendChild(gridEffect)}),EyeGestureApi(API_KEY,fix_point,freeze_radius,{onCursor:function(x,y,fix,blink){eyeTilesRun&&(sightGrid&&document.querySelectorAll(".card__grid-effect-tile").forEach(grid_spot=>{var rect=grid_spot.getBoundingClientRect(),rect=1/calculateDistance(x,y,rect.x,rect.y)*200;rect<1?(grid_spot.style.width="0.1rem",grid_spot.style.height="0.1rem"):1{var rect=eyeTile.getBoundingClientRect();rect.x-5=left&&parseFloat(x)<=left+width&&parseFloat(y)>=topPos&&parseFloat(y)<=topPos+el}(center_x,center_y,el,margin)||(element=el)}),element}function getMagnetVector(x,y,magnet_x,magnet_y,strength){var[magnet_x,x]=[(magnet_x-x)*strength,(magnet_y-y)*strength];return[magnet_x,x]}var magnet_counter=0;function updateView(fix,blink){let sumX=0,sumY=0;for(const position of dot.history)sumX+=position.x,sumY+=position.y;array=dot.history,elapsed_time=array[array.length-1].time.getTime()-array[0].time.getTime(),dist_x=array[array.length-1].x-array[0].x,array=array[array.length-1].y-array[0].y;var magnet_x,dist_x=Math.sqrt(dist_x*dist_x+array*array)/elapsed_time,array=sumX/dot.history.length,elapsed_time=sumY/dot.history.length,el=scanMagnet(array,elapsed_time,magnetStrong,dot.margin);null!=el&&dist_xmagnetAssistanceRange)return magnetAssistanceRange;return diff_x}(magnet_x,el),setOffset(dot.offset_ret_x,dot.offset_ret_y)),magnet_counter+=1,onCursor(array,elapsed_time,fix,blink)):(currentElement.el=null,currentElement.frame=0,dist_x=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,magnet_x=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(dot.x+dot.offset_x<0||dot.x+dot.offset_x>dist_x||dot.y+dot.offset_y<0||dot.y+dot.offset_y>magnet_x)&&(dot.offset_x=0,dot.offset_y=0,dot.offset_ret_x=0,dot.offset_ret_y=0),onCursor(dot.x+dot.offset_x,dot.y+dot.offset_y,fix,blink))}function moveDot(x,y,fix,blink){!function(x,y){dot.x=x,dot.y=y,dot.history.push({x:dot.x+dot.offset_x,y:dot.y+dot.offset_y,time:new Date}),10