@polyup/tutorials
Advanced tools
Comparing version 0.0.31 to 0.0.32
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Tutorials",[],t):"object"==typeof exports?exports.Tutorials=t():e.Tutorials=t()}(window,(function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s="/hs+")}({"/hs+":function(e,t,n){"use strict";function r(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)}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return i="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},i(e)}function a(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){a(u,r,o,i,c,"next",e)}function c(e){a(u,r,o,i,c,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}n.r(t),n.d(t,"ObjectTypeIds",(function(){return u})),n.d(t,"ViewType",(function(){return s}));var u,s,l=n("hosL"),f=n("83Vu"),p=function(){function e(e){o(this,"element",void 0),o(this,"queueList",{}),this.element=e}var t,n,i;return t=e,(n=[{key:"dispatch",value:function(e,t){var n=new CustomEvent(this.getEventName(e),{detail:t});this.element.dispatchEvent(n)}},{key:"addEventListener",value:function(e,t){this.element.addEventListener(this.getEventName(e),t,!1)}},{key:"removeEventListener",value:function(e,t){this.element.removeEventListener(this.getEventName(e),t)}},{key:"queue",value:function(e,t){return this.queueList[e]=t,this}},{key:"dispatchQueue",value:function(e){this.isQueued(e)&&(this.dispatch(e,this.queueList[e]),delete this.queueList[e])}},{key:"isQueued",value:function(e){return this.queueList.hasOwnProperty(e)}},{key:"getEventName",value:function(e){return"bus:".concat(e)}}])&&r(t.prototype,n),i&&r(t,i),e}(),d=n("AoAR");!function(e){e[e.MACHINE=1]="MACHINE",e[e.CHIP=9]="CHIP"}(u||(u={})),function(e){e.PLAYER="PLAYER",e.AUTHER="AUTHER",e.WRAPPER="WRAPPER"}(s||(s={}));var h,m;t.default={i18next:void 0,render:function(e,t,n){if(!this.ready){this.apiUrl=t,this.ready=!0;var r=document.createElement("div");r.style.position="relative",r.style.zIndex="99999999",this.eventBus=new p(window),document.body.appendChild(r),Object(l.render)(Object(l.h)(f.a,{gameEngine:e,eventBus:this.eventBus,accessToken:n,apiUrl:t,i18next:this.i18next}),r)}},load:(m=c((function*(e,t,n,r){try{var o=yield d.a(e,t,n,this.apiUrl,r);o&&"object"===i(o)&&this.eventBus.dispatch("loaded",o)}catch(e){}})),function(){return m.apply(this,arguments)}),resetAndLoad:(h=c((function*(e,t,n,r){try{var o=yield d.b(e,t,n,this.apiUrl,r);o&&"object"===i(o)&&this.eventBus.dispatch("loaded",o)}catch(e){}})),function(){return h.apply(this,arguments)})}},"4Y0q":function(e,t){"use strict";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)}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(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.")}()}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 i,c=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){u=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(u)throw i}}}}function a(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}function c(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}function u(e){for(var t=[],n=0;n<e.children.length;n++){var r=e.children[n].getBoundingClientRect();(r.width||r.height)&&t.push(r)}return l(t)}var s=function(){function e(e,t){r(this,"object",void 0),r(this,"camera",void 0),r(this,"box",void 0),r(this,"size",void 0),r(this,"pos",void 0),r(this,"engine",void 0),r(this,"screenWidth",void 0),r(this,"screenHeight",void 0),this.object=e,this.engine=t;var n=t.game.threeContext;this.camera=n.activeCamera;n.renderer.domElement.getBoundingClientRect();this.screenWidth=t.game.width/t.multiplier,this.screenHeight=t.game.height/t.multiplier;var o=this.engine.game.threeContext.three().Vector2;if(this.size=new o(0,0),this.pos=new o(0,0),this.camera.isOrthographicCamera)this.size.x=120,this.size.y=120;else{var i=n.three().Box3;this.box=(new i).setFromObject(this.object);var a=this.distance();this.setSizeInPixel(a)}this.getPositionInPixel()}var t,o,i;return t=e,(o=[{key:"distance",value:function(){var e=this.camera.getWorldPosition(this.camera.position.clone().set(0,0,0)),t=this.object.getWorldPosition(this.object.position.clone().set(0,0,0));return e.distanceTo(t)}},{key:"setSizeInPixel",value:function(e){var t=this.engine.game.threeContext.three().Vector3,n=this.box.getSize(new t),r=this.engine.game.threeContext.three().Math.degToRad(this.camera.fov),o=2*Math.tan(r/2)*Math.abs(e),i=this.screenHeight/o;o=n.y*i,this.size.x=n.x*i,this.size.y=o}},{key:"getPositionInPixel",value:function(){var e=this.engine.game.threeContext.three().Vector3,t=this.engine.game.threeContext.three().Matrix4,n=new e,r=new t,o=new t;o.copy(this.camera.matrixWorldInverse),r.multiplyMatrices(this.camera.projectionMatrix,o);var i=.5*this.screenWidth,a=.5*this.screenHeight;this.object.updateMatrixWorld(),n.setFromMatrixPosition(this.object.matrixWorld),n.applyMatrix4(r),n.x=n.x*i+i,n.y=-n.y*a+a,this.pos.x=n.x-this.size.x/2,this.pos.y=n.y-this.size.y/2}}])&&n(t.prototype,o),i&&n(t,i),e}(),l=function(e){var t,n={x:{max:null,min:null},y:{max:null,min:null}},r=i(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;(o.width||o.height)&&(null===n.x.max?(n.x.min=o.x,n.x.max=o.x+o.width,n.y.min=o.y,n.y.max=o.y+o.height):(n.x.min=Math.min(n.x.min,o.x),n.x.max=Math.max(n.x.max,o.x+o.width),n.y.min=Math.min(n.y.min,o.y),n.y.max=Math.max(n.y.max,o.y+o.height)))}}catch(e){r.e(e)}finally{r.f()}return n.x.min=isNaN(n.x.min)?0:n.x.min,n.x.max=isNaN(n.x.max)?0:n.x.max,n.y.min=isNaN(n.y.min)?0:n.y.min,n.x.max=isNaN(n.x.max)?0:n.x.max,new DOMRect(n.x.min||0,n.y.min||0,n.x.max-n.x.min,n.y.max-n.y.min)};t.a=function(e,t){return function(){var n=function(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=e.localToGlobal(0,0),u=e.getTransformedBounds(),s=function e(t){return t?[].concat(o(e(t.parent)),[[t.scaleX,t.scaleY]]):[]},l=s(e.parent),f=i(l);try{for(f.s();!(n=f.n()).done;){var p=n.value;u.x+=u.x*(p[0]-1),u.y+=u.y*(p[1]-1),u.width=u.width*p[0],u.height=u.height*p[1]}}catch(e){f.e(e)}finally{f.f()}return new DOMRect((c.x+(a?u.x:0)-(r?u.width/2:0))/t.multiplier,(c.y+(a?u.y:0)-(r?u.height/2:0))/t.multiplier,u.width/t.multiplier,u.height/t.multiplier)},r=function(e,t){if(t.block){var r=t.block.types.includes(e.type);if(void 0!==e.value&&(r=r&&t.block.rValue.value==e.value),r)return n(t,!0)}};switch(e.tutorialElement){case"dom":for(var a=document.querySelectorAll(e.data.selector),c=0;c<a.length;c++){var f=a[c],p=f.getBoundingClientRect();if(p.width&&p.height)return e.data.fitContents?u(f):f.getBoundingClientRect()}break;case"object3d":try{var d=t.game.machineScreen.scene.machineView.getObjectByName(e.data.selector),h=new s(d,t);return new DOMRect(h.pos.x,h.pos.y,h.size.x,h.size.y)}catch(e){console.log(e)}break;case"memory-popup":return n(t.game.machineScreen.scene.memory);case"workspace-popup-description":return n(t.game.machineScreen.scene.workspace.descriptionPanel);case"memory":case"workspace":return n(t.game.currentScreen);case"workspace-popup":return n(t.game.machineScreen.scene.workspace);case"workspace.goal":return n(t.game.workspace.goalText);case"workspace.run":return n(t.game.workspace.workspace.indicator,!1,!1);case"stack.source":return n(t.game.workspace.workspace.files[e.data.selector].source,!0);case"block":var m=e.data.selector,v=function(e){var n,o=i(t.game.workspace.workspace.files[e.file].list);try{for(o.s();!(n=o.n()).done;){var a=r(e,n.value);if(a)return a}}catch(e){o.e(e)}finally{o.f()}},y=[];return Array.isArray(m)?y.push.apply(y,o(m.map(v))):y.push(v(m)),l(y.filter(Boolean));case"powerButton":return n(t.game.machineScreen.polypodLeft.powerButton);case"stack":return n(t.game.workspace.workspace.files[e.data.selector],!1,!0);case"chip.target":return n(t.game.workspace.goalView.children.find((function(e){return void 0!==e.allowDrag})),!0);case"footer.block":var _=e.data.selector;return"palette"===_.type?n(t.game.workspace.footer.children.find((function(e){return e.paletteName===_.name}))):n(t.game.workspace.footer.children.find((function(e){var t;return(null===(t=e.view)||void 0===t?void 0:t.block)&&r(_,e.view)})),!0)}}}},"4ZYG":function(e,t,n){"use strict";function r(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect();return{width:n.width/1,height:n.height/1,top:n.top/1,right:n.right/1,bottom:n.bottom/1,left:n.left/1,x:n.left/1,y:n.top/1}}function o(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function i(e){var t=o(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function a(e){return e instanceof o(e).Element||e instanceof Element}function c(e){return e instanceof o(e).HTMLElement||e instanceof HTMLElement}function u(e){return"undefined"!=typeof ShadowRoot&&(e instanceof o(e).ShadowRoot||e instanceof ShadowRoot)}function s(e){return e?(e.nodeName||"").toLowerCase():null}function l(e){return((a(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return r(l(e)).left+i(e).scrollLeft}function p(e){return o(e).getComputedStyle(e)}function d(e){var t=p(e);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function h(e,t,n){void 0===n&&(n=!1);var a,u,p=c(t),h=c(t)&&function(e){var t=e.getBoundingClientRect();return 1!==(t.width/e.offsetWidth||1)||1!==(t.height/e.offsetHeight||1)}(t),m=l(t),v=r(e,h),y={scrollLeft:0,scrollTop:0},_={x:0,y:0};return(p||!p&&!n)&&(("body"!==s(t)||d(m))&&(y=(a=t)!==o(a)&&c(a)?{scrollLeft:(u=a).scrollLeft,scrollTop:u.scrollTop}:i(a)),c(t)?((_=r(t,!0)).x+=t.clientLeft,_.y+=t.clientTop):m&&(_.x=f(m))),{x:v.left+y.scrollLeft-_.x,y:v.top+y.scrollTop-_.y,width:v.width,height:v.height}}function m(e){var t=r(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function v(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(u(e)?e.host:null)||l(e)}function y(e){return["html","body","#document"].indexOf(s(e))>=0?e.ownerDocument.body:c(e)&&d(e)?e:y(v(e))}function _(e,t){var n;void 0===t&&(t=[]);var r=y(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=o(r),c=i?[a].concat(a.visualViewport||[],d(r)?r:[]):r,u=t.concat(c);return i?u:u.concat(_(v(c)))}function g(e){return["table","td","th"].indexOf(s(e))>=0}function b(e){return c(e)&&"fixed"!==p(e).position?e.offsetParent:null}function w(e){for(var t=o(e),n=b(e);n&&g(n)&&"static"===p(n).position;)n=b(n);return n&&("html"===s(n)||"body"===s(n)&&"static"===p(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&c(e)&&"fixed"===p(e).position)return null;for(var n=v(e);c(n)&&["html","body"].indexOf(s(n))<0;){var r=p(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function x(e){function t(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var o=n.get(e);o&&t(o)}})),o.push(e)}var n=new Map,r=new Set,o=[];return e.forEach((function(e){n.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||t(e)})),o}function O(){return O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(this,arguments)}function j(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function S(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,r=e.defaultOptions,o=void 0===r?pe:r;return function(e,t,r){function i(){l.forEach((function(e){return e()})),l=[]}void 0===r&&(r=o);var c,u,s={placement:"bottom",orderedModifiers:[],options:k({},pe,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],f=!1,p={state:s,setOptions:function(r){var c="function"==typeof r?r(s.options):r;i(),s.options=k({},o,s.options,c),s.scrollParents={reference:a(e)?_(e):e.contextElement?_(e.contextElement):[],popper:_(t)};var u=function(e){var t=x(e);return fe.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?O({},n,t,{options:O({},n.options,t.options),data:O({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers)));return s.orderedModifiers=u.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.options,n=e.effect;if("function"==typeof n){var r=n({state:s,name:e.name,instance:p,options:void 0===t?{}:t});l.push(r||function(){})}})),p.update()},forceUpdate:function(){if(!f){var e=s.elements,t=e.reference,n=e.popper;if(j(t,n)){s.rects={reference:h(t,w(n),"fixed"===s.options.strategy),popper:m(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=k({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options;"function"==typeof i&&(s=i({state:s,options:void 0===a?{}:a,name:o.name,instance:p})||s)}else s.reset=!1,r=-1}}},update:(c=function(){return new Promise((function(e){p.forceUpdate(),e(s)}))},function(){return u||(u=new Promise((function(e){Promise.resolve().then((function(){u=void 0,e(c())}))}))),u}),destroy:function(){i(),f=!0}};return j(e,t)?(p.setOptions(r).then((function(e){!f&&r.onFirstUpdate&&r.onFirstUpdate(e)})),p):p}}function P(e){return e.split("-")[0]}function E(e){return e.split("-")[1]}function A(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function T(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?P(o):null,a=o?E(o):null,c=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(i){case J:t={x:c,y:n.y-r.height};break;case ee:t={x:c,y:n.y+n.height};break;case te:t={x:n.x+n.width,y:u};break;case ne:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var s=i?A(i):null;if(null!=s){var l="y"===s?"height":"width";switch(a){case ie:t[s]=t[s]-(n[l]/2-r[l]/2);break;case ae:t[s]=t[s]+(n[l]/2-r[l]/2)}}return t}function C(){return C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(this,arguments)}function M(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,c=e.offsets,u=e.position,s=e.gpuAcceleration,f=e.adaptive,d=e.roundOffsets,h=!0===d?function(e){var t=e.y,n=window.devicePixelRatio||1;return{x:ve(ve(e.x*n)/n)||0,y:ve(ve(t*n)/n)||0}}(c):"function"==typeof d?d(c):c,m=h.x,v=void 0===m?0:m,y=h.y,_=void 0===y?0:y,g=c.hasOwnProperty("x"),b=c.hasOwnProperty("y"),x=ne,O=J,k=window;if(f){var j=w(n),S="clientHeight",P="clientWidth";j===o(n)&&"static"!==p(j=l(n)).position&&"absolute"===u&&(S="scrollHeight",P="scrollWidth"),j=j,i!==J&&(i!==ne&&i!==te||a!==ae)||(O=ee,_-=j[S]-r.height,_*=s?1:-1),i!==ne&&(i!==J&&i!==ee||a!==ae)||(x=te,v-=j[P]-r.width,v*=s?1:-1)}var E,A=C({position:u},f&&ye);return C({},A,s?((E={})[O]=b?"0":"",E[x]=g?"0":"",E.transform=(k.devicePixelRatio||1)<=1?"translate("+v+"px, "+_+"px)":"translate3d("+v+"px, "+_+"px, 0)",E):((t={})[O]=b?_+"px":"",t[x]=g?v+"px":"",t.transform="",t))}function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(this,arguments)}function H(e){return e.replace(/left|right|bottom|top/g,(function(e){return _e[e]}))}function I(e){return e.replace(/start|end/g,(function(e){return ge[e]}))}function W(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&u(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function N(){return N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(this,arguments)}function B(e){return N({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function R(e,t){return t===ce?B(function(e){var t=o(e),n=l(e),r=t.visualViewport,i=n.clientWidth,a=n.clientHeight,c=0,u=0;return r&&(i=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(c=r.offsetLeft,u=r.offsetTop)),{width:i,height:a,x:c+f(e),y:u}}(e)):c(t)?function(e){var t=r(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):B(function(e){var t,n=l(e),r=i(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=he(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),c=he(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-r.scrollLeft+f(e),s=-r.scrollTop;return"rtl"===p(o||n).direction&&(u+=he(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:c,x:u,y:s}}(l(e)))}function U(e,t,n){var r="clippingParents"===t?function(e){var t=_(v(e)),n=["absolute","fixed"].indexOf(p(e).position)>=0&&c(e)?w(e):e;return a(n)?t.filter((function(e){return a(e)&&W(e,n)&&"body"!==s(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o.reduce((function(t,n){var r=R(e,n);return t.top=he(r.top,t.top),t.right=me(r.right,t.right),t.bottom=me(r.bottom,t.bottom),t.left=he(r.left,t.left),t}),R(e,o[0]));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function z(){return z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(this,arguments)}function F(e){return z({},{top:0,right:0,bottom:0,left:0},e)}function q(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function V(){return V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Y(e,t){void 0===t&&(t={});var n=t.placement,o=void 0===n?e.placement:n,i=t.boundary,c=void 0===i?"clippingParents":i,u=t.rootBoundary,s=void 0===u?ce:u,f=t.elementContext,p=void 0===f?ue:f,d=t.altBoundary,h=void 0!==d&&d,m=t.padding,v=void 0===m?0:m,y=F("number"!=typeof v?v:q(v,oe)),_=e.rects.popper,g=e.elements[h?p===ue?"reference":ue:p],b=U(a(g)?g:g.contextElement||l(e.elements.popper),c,s),w=r(e.elements.reference),x=B(V({},_,T({reference:w,element:_,strategy:"absolute",placement:o}))),O=p===ue?x:w,k={top:b.top-O.top+y.top,bottom:O.bottom-b.bottom+y.bottom,left:b.left-O.left+y.left,right:O.right-b.right+y.right},j=e.modifiersData.offset;if(p===ue&&j){var S=j[o];Object.keys(k).forEach((function(e){var t=[te,ee].indexOf(e)>=0?1:-1,n=[J,ee].indexOf(e)>=0?"y":"x";k[e]+=S[n]*t}))}return k}function G(e,t,n){return he(e,me(t,n))}function $(){return $=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(this,arguments)}function Q(){return Q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q.apply(this,arguments)}function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X.apply(this,arguments)}function K(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Z(e){return[J,te,ee,ne].some((function(t){return e[t]>=0}))}n.d(t,"a",(function(){return be}));var J="top",ee="bottom",te="right",ne="left",re="auto",oe=[J,ee,te,ne],ie="start",ae="end",ce="viewport",ue="popper",se=oe.reduce((function(e,t){return e.concat([t+"-"+ie,t+"-"+ae])}),[]),le=[].concat(oe,[re]).reduce((function(e,t){return e.concat([t,t+"-"+ie,t+"-"+ae])}),[]),fe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],pe={placement:"bottom",modifiers:[],strategy:"absolute"},de={passive:!0},he=Math.max,me=Math.min,ve=Math.round,ye={top:"auto",right:"auto",bottom:"auto",left:"auto"},_e={left:"right",right:"left",bottom:"top",top:"bottom"},ge={start:"end",end:"start"},be=S({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=void 0===i||i,c=r.resize,u=void 0===c||c,s=o(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach((function(e){e.addEventListener("scroll",n.update,de)})),u&&s.addEventListener("resize",n.update,de),function(){a&&l.forEach((function(e){e.removeEventListener("scroll",n.update,de)})),u&&s.removeEventListener("resize",n.update,de)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=T({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,c=n.roundOffsets,u=void 0===c||c,s={placement:P(t.placement),variation:E(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=C({},t.styles.popper,M(C({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=C({},t.styles.arrow,M(C({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=C({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];c(o)&&s(o)&&(L(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return L(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&L(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});c(r)&&s(r)&&(L(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,r=e.options.offset,o=void 0===r?[0,0]:r,i=le.reduce((function(e,n){return e[n]=function(e,t,n){var r=P(e),o=[ne,J].indexOf(r)>=0?-1:1,i="function"==typeof n?n(D({},t,{placement:e})):n,a=i[0],c=i[1];return a=a||0,c=(c||0)*o,[ne,te].indexOf(r)>=0?{x:c,y:a}:{x:a,y:c}}(n,t.rects,o),e}),{}),a=i[t.placement],c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a.x,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0===a||a,u=n.fallbackPlacements,s=n.padding,l=n.boundary,f=n.rootBoundary,p=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,y=P(v),_=u||(y===v||!h?[H(v)]:function(e){if(P(e)===re)return[];var t=H(e);return[I(e),t,I(t)]}(v)),g=[v].concat(_).reduce((function(e,n){return e.concat(P(n)===re?function(e,t){void 0===t&&(t={});var n=t.boundary,r=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,c=void 0===a?le:a,u=E(t.placement),s=u?i?se:se.filter((function(e){return E(e)===u})):oe,l=s.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=s);var f=l.reduce((function(t,i){return t[i]=Y(e,{placement:i,boundary:n,rootBoundary:r,padding:o})[P(i)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:l,rootBoundary:f,padding:s,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),b=t.rects.reference,w=t.rects.popper,x=new Map,O=!0,k=g[0],j=0;j<g.length;j++){var S=g[j],A=P(S),T=E(S)===ie,C=[J,ee].indexOf(A)>=0,M=C?"width":"height",L=Y(t,{placement:S,boundary:l,rootBoundary:f,altBoundary:p,padding:s}),D=C?T?te:ne:T?ee:J;b[M]>w[M]&&(D=H(D));var W=H(D),N=[];if(i&&N.push(L[A]<=0),c&&N.push(L[D]<=0,L[W]<=0),N.every((function(e){return e}))){k=S,O=!1;break}x.set(S,N)}if(O)for(var B=function(e){var t=g.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},R=h?3:1;R>0;R--){if("break"===B(R))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0!==a&&a,u=n.tether,s=void 0===u||u,l=n.tetherOffset,f=void 0===l?0:l,p=Y(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),d=P(t.placement),h=E(t.placement),v=!h,y=A(d),_="x"===y?"y":"x",g=t.modifiersData.popperOffsets,b=t.rects.reference,x=t.rects.popper,O="function"==typeof f?f($({},t.rects,{placement:t.placement})):f,k={x:0,y:0};if(g){if(i||c){var j="y"===y?J:ne,S="y"===y?ee:te,T="y"===y?"height":"width",C=g[y],M=g[y]+p[j],L=g[y]-p[S],D=s?-x[T]/2:0,H=h===ie?b[T]:x[T],I=h===ie?-x[T]:-b[T],W=t.elements.arrow,N=s&&W?m(W):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},R=B[j],U=B[S],z=G(0,b[T],N[T]),F=v?b[T]/2-D-z-R-O:H-z-R-O,q=v?-b[T]/2+D+z+U+O:I+z+U+O,V=t.elements.arrow&&w(t.elements.arrow),Q=t.modifiersData.offset?t.modifiersData.offset[t.placement][y]:0,X=g[y]+F-Q-(V?"y"===y?V.clientTop||0:V.clientLeft||0:0),K=g[y]+q-Q;if(i){var Z=G(s?me(M,X):M,C,s?he(L,K):L);g[y]=Z,k[y]=Z-C}if(c){var re=g[_],oe=re+p["x"===y?J:ne],ae=re-p["x"===y?ee:te],ce=G(s?me(oe,X):oe,re,s?he(ae,K):ae);g[_]=ce,k[_]=ce-re}}t.modifiersData[r]=k}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,c=P(n.placement),u=A(c),s=[ne,te].indexOf(c)>=0?"height":"width";if(i&&a){var l=function(e,t){return F("number"!=typeof(e="function"==typeof e?e(Q({},t.rects,{placement:t.placement})):e)?e:q(e,oe))}(o.padding,n),f=m(i),p="y"===u?J:ne,d="y"===u?ee:te,h=n.rects.reference[s]+n.rects.reference[u]-a[u]-n.rects.popper[s],v=a[u]-n.rects.reference[u],y=w(i),_=y?"y"===u?y.clientHeight||0:y.clientWidth||0:0,g=_/2-f[s]/2+(h/2-v/2),b=G(l[p],g,_-f[s]-l[d]);n.modifiersData[r]=((t={})[u]=b,t.centerOffset=b-g,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&W(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Y(t,{elementContext:"reference"}),c=Y(t,{altBoundary:!0}),u=K(a,r),s=K(c,o,i),l=Z(u),f=Z(s);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:s,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=X({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]})},"83Vu":function(e,t,n){"use strict";(function(e,r){function o(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)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(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.")}()}function i(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}var a=n("QRet"),c=n("niS0"),u=n("AoAR");t.a=function(t){var n=t.gameEngine,i=t.eventBus,s=t.accessToken,l=t.apiUrl,f=t.i18next,p=o(Object(a.e)({id:null,steps:[],progress:null}),2),d=p[0],h=p[1],m=d.steps,v=o(Object(a.e)(),2),y=v[0],_=v[1],g=Object(a.c)((function(){var e=m.findIndex((function(e){return e.id===y}));return{step:m[e],index:e,total:m.length,isLast:e===m.length-1,isFirst:!(e===m.length-1)&&0===e}}),[y]);Object(a.a)((function(){i.addEventListener("loaded",(function(e){var t;h(e.detail),_(e.detail.progress.tutorialStepId||(null===(t=e.detail.steps[0])||void 0===t?void 0:t.id))})),i.addEventListener("step.change",(function(e){_(e.detail)}))}),[]);return g.step?e(r,null,e("link",{rel:"stylesheet",href:"//fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"}),e(c.a,{onSkip:function(){_(null)},onCancel:function(){},onFinish:function(){var e;Object(u.c)(d.progress.id,{tutorialStepId:null===(e=m[g.index+1])||void 0===e?void 0:e.id,completed:!0},l,s),_(null)},onNext:function(){var e,t;_(null===(e=m[g.index+1])||void 0===e?void 0:e.id),Object(u.c)(d.progress.id,{tutorialStepId:null===(t=m[g.index+1])||void 0===t?void 0:t.id},l,s)},step:g,gameEngine:n,i18next:f})):null}}).call(this,n("hosL").h,n("hosL").Fragment)},AoAR:function(e,t,n){"use strict";function r(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?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){a(u,r,o,i,c,"next",e)}function c(e){a(u,r,o,i,c,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return f}));var u={},s=function(){var e=c((function*(e,t,n,r,i){var a="".concat(e).concat(t).concat(n);if(void 0===u[a]){u[a]=null;var c=yield(yield fetch("".concat(r,"/Tutorials/objectTypeId/").concat(e,"/objectId/").concat(t,"/has-tutorial?type=").concat(n),{method:"GET",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{Authorization:i}})).json();if(c&&c.hasTutorial&&!c.utp.completed){var s=o(o({},yield(yield fetch("".concat(r,"/Tutorials/objectTypeId/").concat(e,"/objectId/").concat(t,"/details?type=").concat(n),{method:"GET",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{Authorization:i}})).json()),{},{progress:c.utp});return u["".concat(e).concat(t)]=s,s}return null}}));return function(t,n,r,o,i){return e.apply(this,arguments)}}(),l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;fetch("".concat(n,"/TutorialProgresses/").concat(e),{method:"PATCH",mode:"cors",cache:"no-cache",credentials:"same-origin",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:r}})},f=function(){var e=c((function*(e,t,n,r,i){var a=yield(yield fetch("".concat(r,"/Tutorials/objectTypeId/").concat(e,"/objectId/").concat(t,"/has-tutorial?type=").concat(n),{method:"GET",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{Authorization:i}})).json();yield l(a.utp.id,{completed:!1,tutorialStepId:0},r,i);var c=o(o({},yield(yield fetch("".concat(r,"/Tutorials/objectTypeId/").concat(e,"/objectId/").concat(t,"/details?type=").concat(n),{method:"GET",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{Authorization:i}})).json()),{},{progress:o(o({},a.utp),{},{completed:!1,tutorialStepId:0})});return u["".concat(e).concat(t)]=c,c}));return function(t,n,r,o,i){return e.apply(this,arguments)}}()},I89O:function(){},KFxL: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)}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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,c=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){u=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(u)throw a}}}}function i(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}function a(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){a(u,r,o,i,c,"next",e)}function c(e){a(u,r,o,i,c,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function u(e){return c((function*(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=[],a=o(n);try{var c=function(){var n=t.value;switch(n.action){case"runScreen.close":if("run"===e.game.currentScreen.name)return e.game.currentScreen.onCLose(n.nextScreen),{v:void 0};break;case"goToMachineScreen":"webxr"!==e.game.currentScreen.name&&(e.game.startTransition(null,"webxr","goToMachineScreen"),i.push(new Promise((function(t){e.game.eventBus.addEventListener("screen.transition.end",(function n(r){"goToMachineScreen"===r.detail.id&&(t(r),e.game.eventBus.removeEventListener("screen.transition.end",n))}))}))));break;case"goToWorkspaceScreen":if("workspace"!==e.game.currentScreen.name){var r=e.game.machineScreen.scene.machineView.getObjectByName(n.objectName);e.DataManager.selectedMod=r.info,e.DataManager.selectedComponentChip=r.chip,e.game.startTransition(null,"workspace","goToWorkspaceScreen"),i.push(new Promise((function(t){e.game.eventBus.addEventListener("screen.transition.end",(function n(r){"goToWorkspaceScreen"===r.detail.id&&(t(r),e.game.eventBus.removeEventListener("screen.transition.end",n))}))})))}break;case"comments.open":e.game.eventBus.dispatch("comments.open");break;case"chip.run":e.game.workspace.workspace.setView(e.game.workspace.workspace.files[0]);break;case"machine.run":e.game.machineScreen.playMachine();break;case"machine.stop":e.game.machineScreen.stopMachine();break;case"workspaceContainer.open":Object(s.a)(n.objectName,e);break;case"footer.palette.open":e.game.workspace.footer.children.find((function(e){return e.paletteName===n.paletteName})).callback()}};for(a.s();!(t=a.n()).done;){var u=c();if("object"===r(u))return u.v}}catch(e){a.e(e)}finally{a.f()}yield Promise.all(i)}))}n.d(t,"a",(function(){return u}));var s=n("e2oM")},QRet:function(e,t,n){"use strict";function r(e,t){y.options.__h&&y.options.__h(m,e,_||t),_=0;var n=m.__H||(m.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function o(e){return _=1,function(e,t,n){var o=r(h++,2);return o.t=e,o.__c||(o.__=[n?n(t):d(void 0,t),function(e){var t=o.t(o.__[0],e);o.__[0]!==t&&(o.__=[t,o.__[1]],o.__c.setState({}))}],o.__c=m),o.__}(d,e)}function i(e,t){var n=r(h++,3);!y.options.__s&&p(n.__H,t)&&(n.__=e,n.__H=t,m.__H.__h.push(n))}function a(e,t){var n=r(h++,4);!y.options.__s&&p(n.__H,t)&&(n.__=e,n.__H=t,m.__h.push(n))}function c(e){return _=5,u((function(){return{current:e}}),[])}function u(e,t){var n=r(h++,7);return p(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function s(){g.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(l),e.__H.__h.forEach(f),e.__H.__h=[]}catch(t){e.__H.__h=[],y.options.__e(t,e.__v)}})),g=[]}function l(e){var t=m;"function"==typeof e.__c&&e.__c(),m=t}function f(e){var t=m;e.__c=e.__(),m=t}function p(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function d(e,t){return"function"==typeof t?t(e):t}n.d(t,"e",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return u}));var h,m,v,y=n("hosL"),_=0,g=[],b=y.options.__b,w=y.options.__r,x=y.options.diffed,O=y.options.__c,k=y.options.unmount;y.options.__b=function(e){m=null,b&&b(e)},y.options.__r=function(e){w&&w(e),h=0;var t=(m=e.__c).__H;t&&(t.__h.forEach(l),t.__h.forEach(f),t.__h=[])},y.options.diffed=function(e){x&&x(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==g.push(t)&&v===y.options.requestAnimationFrame||((v=y.options.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),j&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);j&&(t=requestAnimationFrame(n))})(s)),m=null},y.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(l),e.__h=e.__h.filter((function(e){return!e.__||f(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],y.options.__e(n,e.__v)}})),O&&O(e,t)},y.options.unmount=function(e){k&&k(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(l)}catch(e){y.options.__e(e,t.__v)}};var j="function"==typeof requestAnimationFrame},e2oM:function(e,t,n){"use strict";function r(e,t){t.game.machineScreen.scene.removeMemory(),t.game.machineScreen.scene.removeWorkspace();var n=t.game.machineScreen.scene.machineView.getObjectByName(e);n&&(t.game.machineScreen.scene.workspace=t.game.machineScreen.scene.createWorkspace(n))}n.d(t,"a",(function(){return r}))},hosL:function(e,t,n){"use strict";function r(e,t){for(var n in t)e[n]=t[n];return e}function o(e){var t=e.parentNode;t&&t.removeChild(e)}function i(e,t,n){var r,o,i,c={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:c[i]=t[i];if(arguments.length>2&&(c.children=arguments.length>3?M.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===c[i]&&(c[i]=e.defaultProps[i]);return a(e,c,r,o,null)}function a(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++D:o};return null==o&&null!=L.vnode&&L.vnode(i),i}function c(){return{current:null}}function u(e){return e.children}function s(e,t){this.props=e,this.context=t}function l(e,t){if(null==t)return e.__?l(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?l(e):null}function f(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return f(e)}}function p(e){(!e.__d&&(e.__d=!0)&&I.push(e)&&!d.__r++||N!==L.debounceRendering)&&((N=L.debounceRendering)||W)(d)}function d(){for(var e;d.__r=I.length;)e=I.sort((function(e,t){return e.__v.__b-t.__v.__b})),I=[],e.some((function(e){var t,n,o,i,a,c;e.__d&&(a=(i=(t=e).__v).__e,(c=t.__P)&&(n=[],(o=r({},i)).__v=i.__v+1,x(c,i,o,t.__n,void 0!==c.ownerSVGElement,null!=i.__h?[a]:null,n,null==a?l(i):a,i.__h),O(n,i),i.__e!=a&&f(i)))}))}function h(e,t,n,r,o,i,c,s,f,p){var d,h,v,_,g,b,w,O=r&&r.__k||U,k=O.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(_=n.__k[d]=null==(_=t[d])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?a(null,_,null,null,_):Array.isArray(_)?a(u,{children:_},null,null,null):_.__b>0?a(_.type,_.props,_.key,null,_.__v):_)){if(_.__=n,_.__b=n.__b+1,null===(v=O[d])||v&&_.key==v.key&&_.type===v.type)O[d]=void 0;else for(h=0;h<k;h++){if((v=O[h])&&_.key==v.key&&_.type===v.type){O[h]=void 0;break}v=null}x(e,_,v=v||R,o,i,c,s,f,p),g=_.__e,(h=_.ref)&&v.ref!=h&&(w||(w=[]),v.ref&&w.push(v.ref,null,_),w.push(h,_.__c||g,_)),null!=g?(null==b&&(b=g),"function"==typeof _.type&&_.__k===v.__k?_.__d=f=m(_,f,e):f=y(e,_,v,O,g,f),"function"==typeof n.type&&(n.__d=f)):f&&v.__e==f&&f.parentNode!=e&&(f=l(v))}for(n.__e=b,d=k;d--;)null!=O[d]&&("function"==typeof n.type&&null!=O[d].__e&&O[d].__e==n.__d&&(n.__d=l(r,d+1)),S(O[d],O[d]));if(w)for(d=0;d<w.length;d++)j(w[d],w[++d],w[++d])}function m(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?m(r,t,n):y(n,r,r,o,r.__e,t));return t}function v(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){v(e,t)})):t.push(e)),t}function y(e,t,n,r,o,i){var a,c,u;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),a=null;else{for(c=i,u=0;(c=c.nextSibling)&&u<r.length;u+=2)if(c==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function _(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||z.test(t)?n:n+"px"}function g(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||_(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||_(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?w:b,i):e.removeEventListener(t,i?w:b,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function b(e){this.l[e.type+!1](L.event?L.event(e):e)}function w(e){this.l[e.type+!0](L.event?L.event(e):e)}function x(e,t,n,o,i,a,c,l,f){var p,d,m,v,y,_,g,b,w,x,O,j=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(f=n.__h,l=t.__e=n.__e,t.__h=null,a=[l]),(p=L.__b)&&p(t);try{e:if("function"==typeof j){if(b=t.props,w=(p=j.contextType)&&o[p.__c],x=p?w?w.props.value:p.__:o,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in j&&j.prototype.render?t.__c=d=new j(b,x):(t.__c=d=new s(b,x),d.constructor=j,d.render=P),w&&w.sub(d),d.props=b,d.state||(d.state={}),d.context=x,d.__n=o,m=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=j.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=r({},d.__s)),r(d.__s,j.getDerivedStateFromProps(b,d.__s))),v=d.props,y=d.state,m)null==j.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==j.getDerivedStateFromProps&&b!==v&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(b,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(b,d.__s,x)||t.__v===n.__v){d.props=b,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),d.__h.length&&c.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(b,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(v,y,_)}))}d.context=x,d.props=b,d.state=d.__s,(p=L.__r)&&p(t),d.__d=!1,d.__v=t,d.__P=e,p=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(o=r(r({},o),d.getChildContext())),m||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(v,y)),O=null!=p&&p.type===u&&null==p.key?p.props.children:p,h(e,Array.isArray(O)?O:[O],t,n,o,i,a,c,l,f),d.base=t.__e,t.__h=null,d.__h.length&&c.push(d),g&&(d.__E=d.__=null),d.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=k(n.__e,t,n,o,i,a,c,f);(p=L.diffed)&&p(t)}catch(e){t.__v=null,(f||null!=a)&&(t.__e=l,t.__h=!!f,a[a.indexOf(l)]=null),L.__e(e,t,n)}}function O(e,t){L.__c&&L.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){L.__e(e,t.__v)}}))}function k(e,t,n,r,i,a,c,u){var s,f,p,d=n.props,m=t.props,v=t.type,y=0;if("svg"===v&&(i=!0),null!=a)for(;y<a.length;y++)if((s=a[y])&&(s===e||(v?s.localName==v:3==s.nodeType))){e=s,a[y]=null;break}if(null==e){if(null===v)return document.createTextNode(m);e=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,m.is&&m),a=null,u=!1}if(null===v)d===m||u&&e.data===m||(e.data=m);else{if(a=a&&M.call(e.childNodes),f=(d=n.props||R).dangerouslySetInnerHTML,p=m.dangerouslySetInnerHTML,!u){if(null!=a)for(d={},y=0;y<e.attributes.length;y++)d[e.attributes[y].name]=e.attributes[y].value;(p||f)&&(p&&(f&&p.__html==f.__html||p.__html===e.innerHTML)||(e.innerHTML=p&&p.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||g(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||g(e,i,t[i],n[i],r)}(e,m,d,i,u),p)t.__k=[];else if(y=t.props.children,h(e,Array.isArray(y)?y:[y],t,n,r,i&&"foreignObject"!==v,a,c,a?a[0]:n.__k&&l(n,0),u),null!=a)for(y=a.length;y--;)null!=a[y]&&o(a[y]);u||("value"in m&&void 0!==(y=m.value)&&(y!==e.value||"progress"===v&&!y)&&g(e,"value",y,d.value,!1),"checked"in m&&void 0!==(y=m.checked)&&y!==e.checked&&g(e,"checked",y,d.checked,!1))}return e}function j(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){L.__e(e,n)}}function S(e,t,n){var r,i;if(L.unmount&&L.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||j(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){L.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&S(r[i],t,"function"!=typeof e.type);n||null==e.__e||o(e.__e),e.__e=e.__d=void 0}function P(e,t,n){return this.constructor(e,n)}function E(e,t,n){var r,o,a;L.__&&L.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],x(t,e=(!r&&n||t).__k=i(u,null,[e]),o||R,R,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?M.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r),O(a,e)}function A(e,t){E(e,t,A)}function T(e,t,n){var o,i,c,u=r({},e.props);for(c in t)"key"==c?o=t[c]:"ref"==c?i=t[c]:u[c]=t[c];return arguments.length>2&&(u.children=arguments.length>3?M.call(arguments,2):n),a(e.type,u,o||e.key,i||e.ref,null)}function C(e,t){var n={__c:t="__cC"+B++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(p)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}n.r(t),n.d(t,"render",(function(){return E})),n.d(t,"hydrate",(function(){return A})),n.d(t,"createElement",(function(){return i})),n.d(t,"h",(function(){return i})),n.d(t,"Fragment",(function(){return u})),n.d(t,"createRef",(function(){return c})),n.d(t,"isValidElement",(function(){return H})),n.d(t,"Component",(function(){return s})),n.d(t,"cloneElement",(function(){return T})),n.d(t,"createContext",(function(){return C})),n.d(t,"toChildArray",(function(){return v})),n.d(t,"options",(function(){return L}));var M,L,D,H,I,W,N,B,R={},U=[],z=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;M=U.slice,L={__e:function(e,t){for(var n,r,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),o=n.__d),o)return n.__E=n}catch(t){e=t}throw e}},D=0,H=function(e){return null!=e&&void 0===e.constructor},s.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=r({},this.state),"function"==typeof e&&(e=e(r({},n),this.props)),e&&r(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),p(this))},s.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),p(this))},s.prototype.render=u,I=[],W="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d.__r=0,B=0},niS0:function(e,t,n){"use strict";(function(e){function r(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?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){a(u,r,o,i,c,"next",e)}function c(e){a(u,r,o,i,c,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function u(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)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(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.")}()}function s(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}var l=n("4ZYG"),f=n("QRet"),p=n("4Y0q"),d=(n("I89O"),n("KFxL")),h=n("wYuo");t.a=function(t){var n=t.onFinish,r=t.onNext,i=t.onSkip,a=t.step,s=t.gameEngine,m=t.i18next,v=u(Object(f.e)(a),2),y=v[0],_=y.step,g=y.isLast,b=y.index,w=y.total,x=v[1],O=u(Object(f.e)(!1),2),k=O[0],j=O[1],S=u(Object(f.e)(!1),2),P=S[0],E=S[1],A=Object(f.d)(),T=Object(f.d)(),C=Object(f.d)(),M=Object(f.d)({overlay:Object(f.d)(),point:Object(f.d)()}),L=u(Object(f.e)({center:{},point:{},top:{},left:{},bottom:{},right:{}}),2),D=L[0],H=L[1],I=Object(d.a)(s),W=Object(h.a)(s);Object(f.a)((function(){T.current=Object(l.a)(M.current.point.current,A.current,{placement:"auto",modifiers:[{name:"offset",options:{offset:[0,15]}},{name:"arrow",options:{element:C.current}},{name:"flip",options:{fallbackPlacements:["auto"]}}]})}),[]),Object(f.a)((function(){var e=a.step;j(!1);var t=[],n=Object(p.a)(e,s),r=function(e){e.stopPropagation(),s.game.threeContext.getOrbit().enabled=!1},o=function(){var e=n(),t=window.innerWidth,r=window.innerHeight,o=a.step.data.margin||25,i=e.width,c=e.height,u=a.step.data.x||0,s=a.step.data.y||0;"box"!==a.step.data.overlay&&(i=Math.max(c,i),c=Math.max(i,c));var l={width:i+o,height:c+o,x:e.x-o/2+i*u,y:e.y-o/2+c*s},f={center:{width:l.width,height:l.height,left:l.x,top:l.y},point:{width:0,height:0,top:0,left:0},top:{width:t,height:Math.max(0,l.y)},left:{top:l.y,width:Math.max(0,l.x),height:r},bottom:{top:l.y+l.height,left:l.x,width:l.width,height:r},right:{top:l.y,left:l.x+l.width,width:t,height:r}};f.point=l.height>=window.innerHeight-250&&l.width>=window.innerWidth-250?{width:15,height:15,left:l.x+l.width/2,top:l.y+(l.height>=window.innerHeight-80?l.height/2:l.height)}:{width:l.width,height:l.height,left:l.x,top:l.y},H(f)},i=function(){var n=c((function*(){t.push(window.setTimeout(c((function*(){yield I(e.data.preActions||[]),yield W(e),t.push(window.setTimeout(c((function*(){o(),x(a),j(!0)})),e.data.delay||1))})),e.data.preActionDelay||1)),window.addEventListener("resize",o),s&&(s.game.machineScreen.scene.mouseEnabled=!1,s.game.threeContext.getOrbit().enabled=!1,window.addEventListener("mousewheel",r),window.addEventListener("mousedown",r),window.addEventListener("touchstart",r))}));return function(){return n.apply(this,arguments)}}();return i(),function(){j(!1),E(!1),window.removeEventListener("resize",o),s&&(s.game.machineScreen.scene.mouseEnabled=!0,s.game.threeContext.getOrbit().enabled=!0,window.removeEventListener("mousewheel",r),window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)),t.forEach(window.clearTimeout)}}),[a.step.id]),Object(f.b)((function(){T.current&&setTimeout((function(){T.current.forceUpdate(),E(!0)}),150)}),[D]);var N="rgba(0,0,0,".concat(_.data.overlayOpacity||.7,")"),B=Object(f.c)((function(){switch(_.data.overlay){case"box":return{borderRadius:15};default:return{background:"radial-gradient(transparent 30%, ".concat(N," 70%)")};case"circle":return{borderRadius:99999}}}),[_.id]),R=Object(f.c)((function(){return new Array(w).fill(0)}),[w]),U=function(){var e=c((function*(){j(!1),yield I(_.data.clickActions||[]),g?n(_.id):r(_.id)}));return function(){return e.apply(this,arguments)}}();return e("div",{class:"transition-opacity pointer-events-none",style:{opacity:k?1:0}},e("div",{class:"fixed inset-0"},e("div",{onClick:U,class:"absolute overflow-hidden z-50 ".concat(!1===_.data.nextOnClick?"pointer-events-none":"pointer-events-auto"),style:D.center,"data-overlay":"center"},e("div",{style:o(o({},B),{},{boxShadow:"0 0 0 ".concat(2*Math.max(25,D.center.width,D.center.height),"px ").concat(N)}),class:"absolute inset-0 "})),e("div",{class:"absolute pointer-events-auto",ref:M.current.point,style:D.point,"data-overlay":"point"}),e("div",{class:"absolute pointer-events-auto",style:o({background:N},D.top),"data-overlay":"top"}),e("div",{style:o({background:N},D.left),class:"absolute pointer-events-auto","data-overlay":"left"}),e("div",{style:o({background:N},D.bottom),class:"absolute pointer-events-auto","data-overlay":"bottom"}),e("div",{style:o({background:N},D.right),class:"absolute pointer-events-auto","data-overlay":"right"})),e("div",{style:{opacity:P?1:0},ref:A,class:"bg-white rounded-xl max-w-sm w-full pointer-events-auto subpixel-antialiased shadow-[0_8px_16px_rgba(0,0,0,.2)] font-sans2 "},e("div",{class:"p-6 min-h-[130px]"},!!_.data.title&&e("div",{class:"mb-0.5 font-bold text-grape-800 text-[21px] antialiased"},m.t("tutorials:".concat(_.data.title))),!!_.data.image&&e("img",{class:"w-16 h-16 mb-2 mt-4 mx-auto",src:m.t("tutorials:".concat(_.data.image))}),!!_.data.content&&e("div",{style:{color:"#607683"},class:" text-lg ".concat(_.data.image?"pt-0":"")},m.t("tutorials:".concat(_.data.content)))),e("div",{class:"pr-3.5"},e("div",{class:"p-3.5 pr-0 py- flex justify-between items-center border-t-2 border-mulberry-500 bg-opacity-50"},e("div",{class:"-m-1 flex items-center flex-1 pl-2"},R.length>1&&R.map((function(t,n){return e("div",{key:n,class:"\n ".concat(n<b?"bg-pineapple-450":n===b?"bg-pineapple-500":"bg-mulberry-400","\n w-2.5 h-2.5 rounded-full m-1\n ")})}))),e("div",{class:"space-x-1"},_.data.canSkip&&e("button",{onClick:i,class:"text-mulberry-900 hover:bg-mulberry-400 rounded-lg px-3 py-1.5 "},m.t(_.data.skipText?"tutorials:".concat(_.data.skipText):"tutorials:tl.tutorials.general.skip")),!g&&!0!==_.data.hideNextFinish&&e("button",{onClick:U,class:"text-mulberry-900 bg-mulberry-400 rounded-lg px-3 py-1.5 hover:bg-pineapple-450 transition focus:outline-none focus:ring focus:ring-mulberry-200"},m.t(_.data.nextText?"tutorials:".concat(_.data.nextText):"tutorials:tl.tutorials.general.next")),g&&!0!==_.data.hideNextFinish&&e("button",{onClick:U,class:"text-mulberry-900 bg-pineapple-450 rounded-lg px-3 py-1.5 hover:bg-pineapple-400 transition focus:outline-none focus:ring focus:ring-mulberry-200"},m.t(_.data.finishText?"tutorials:".concat(_.data.finishText):"tutorials:tl.tutorials.general.finish")))))))}}).call(this,n("hosL").h)},wYuo:function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t,n=(t=function*(t){switch(t.tutorialElement){case"memory-popup":a(t.data.selector,e);break;case"memory":a(t.data.selector,e),e.game.machineScreen.scene.memory.gotoScreen();break;case"workspace-popup":Object(i.a)(t.data.selector,e);break;case"workspace":Object(i.a)(t.data.selector,e),e.game.machineScreen.scene.workspace.gotoScreen()}},function(){var e=this,n=arguments;return new Promise((function(o,i){function a(e){r(u,o,i,a,c,"next",e)}function c(e){r(u,o,i,a,c,"throw",e)}var u=t.apply(e,n);a(void 0)}))});return function(e){return n.apply(this,arguments)}}()}n.d(t,"a",(function(){return o}));var i=n("e2oM"),a=function(e,t){t.game.machineScreen.scene.removeMemory(),t.game.machineScreen.scene.removeWorkspace(),t.game.machineScreen.scene.memory=t.game.machineScreen.scene.createMemory(t.game.machineScreen.scene.machineView.getObjectByName(e))}}})})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Tutorials",[],t):"object"==typeof exports?exports.Tutorials=t():e.Tutorials=t()}(window,(function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s="/hs+")}({"/hs+":function(e,t,n){"use strict";function r(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)}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return i="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},i(e)}function a(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){a(u,r,o,i,c,"next",e)}function c(e){a(u,r,o,i,c,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}n.r(t),n.d(t,"ObjectTypeIds",(function(){return u})),n.d(t,"ViewType",(function(){return s}));var u,s,l=n("hosL"),f=n("83Vu"),p=function(){function e(e){o(this,"element",void 0),o(this,"queueList",{}),this.element=e}var t,n,i;return t=e,(n=[{key:"dispatch",value:function(e,t){var n=new CustomEvent(this.getEventName(e),{detail:t});this.element.dispatchEvent(n)}},{key:"addEventListener",value:function(e,t){this.element.addEventListener(this.getEventName(e),t,!1)}},{key:"removeEventListener",value:function(e,t){this.element.removeEventListener(this.getEventName(e),t)}},{key:"queue",value:function(e,t){return this.queueList[e]=t,this}},{key:"dispatchQueue",value:function(e){this.isQueued(e)&&(this.dispatch(e,this.queueList[e]),delete this.queueList[e])}},{key:"isQueued",value:function(e){return this.queueList.hasOwnProperty(e)}},{key:"getEventName",value:function(e){return"bus:".concat(e)}}])&&r(t.prototype,n),i&&r(t,i),e}(),d=n("AoAR");!function(e){e[e.MACHINE=1]="MACHINE",e[e.CHIP=9]="CHIP"}(u||(u={})),function(e){e.PLAYER="PLAYER",e.AUTHER="AUTHER",e.WRAPPER="WRAPPER"}(s||(s={}));var h,m;t.default={i18next:void 0,render:function(e,t,n){if(!this.ready){this.apiUrl=t,this.ready=!0;var r=document.createElement("div");r.style.position="relative",r.style.zIndex="99999999",this.eventBus=new p(window),document.body.appendChild(r),Object(l.render)(Object(l.h)(f.a,{gameEngine:e,eventBus:this.eventBus,accessToken:n,apiUrl:t,i18next:this.i18next}),r)}},load:(m=c((function*(e,t,n,r){try{var o=yield d.a(e,t,n,this.apiUrl,r);o&&"object"===i(o)&&this.eventBus.dispatch("loaded",o)}catch(e){}})),function(){return m.apply(this,arguments)}),resetAndLoad:(h=c((function*(e,t,n,r){try{var o=yield d.b(e,t,n,this.apiUrl,r);o&&"object"===i(o)&&this.eventBus.dispatch("loaded",o)}catch(e){}})),function(){return h.apply(this,arguments)})}},"4Y0q":function(e,t){"use strict";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)}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(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.")}()}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 i,c=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){u=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(u)throw i}}}}function a(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}function c(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}function u(e){for(var t=[],n=0;n<e.children.length;n++){var r=e.children[n].getBoundingClientRect();(r.width||r.height)&&t.push(r)}return l(t)}var s=function(){function e(e,t){r(this,"object",void 0),r(this,"camera",void 0),r(this,"box",void 0),r(this,"size",void 0),r(this,"pos",void 0),r(this,"engine",void 0),r(this,"screenWidth",void 0),r(this,"screenHeight",void 0),this.object=e,this.engine=t;var n=t.game.threeContext;this.camera=n.activeCamera;n.renderer.domElement.getBoundingClientRect();this.screenWidth=t.game.width/t.multiplier,this.screenHeight=t.game.height/t.multiplier;var o=this.engine.game.threeContext.three().Vector2;if(this.size=new o(0,0),this.pos=new o(0,0),this.camera.isOrthographicCamera)this.size.x=120,this.size.y=120;else{var i=n.three().Box3;this.box=(new i).setFromObject(this.object);var a=this.distance();this.setSizeInPixel(a)}this.getPositionInPixel()}var t,o,i;return t=e,(o=[{key:"distance",value:function(){var e=this.camera.getWorldPosition(this.camera.position.clone().set(0,0,0)),t=this.object.getWorldPosition(this.object.position.clone().set(0,0,0));return e.distanceTo(t)}},{key:"setSizeInPixel",value:function(e){var t=this.engine.game.threeContext.three().Vector3,n=this.box.getSize(new t),r=this.engine.game.threeContext.three().Math.degToRad(this.camera.fov),o=2*Math.tan(r/2)*Math.abs(e),i=this.screenHeight/o;o=n.y*i,this.size.x=n.x*i,this.size.y=o}},{key:"getPositionInPixel",value:function(){var e=this.engine.game.threeContext.three().Vector3,t=this.engine.game.threeContext.three().Matrix4,n=new e,r=new t,o=new t;o.copy(this.camera.matrixWorldInverse),r.multiplyMatrices(this.camera.projectionMatrix,o);var i=.5*this.screenWidth,a=.5*this.screenHeight;this.object.updateMatrixWorld(),n.setFromMatrixPosition(this.object.matrixWorld),n.applyMatrix4(r),n.x=n.x*i+i,n.y=-n.y*a+a,this.pos.x=n.x-this.size.x/2,this.pos.y=n.y-this.size.y/2}}])&&n(t.prototype,o),i&&n(t,i),e}(),l=function(e){var t,n={x:{max:null,min:null},y:{max:null,min:null}},r=i(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;(o.width||o.height)&&(null===n.x.max?(n.x.min=o.x,n.x.max=o.x+o.width,n.y.min=o.y,n.y.max=o.y+o.height):(n.x.min=Math.min(n.x.min,o.x),n.x.max=Math.max(n.x.max,o.x+o.width),n.y.min=Math.min(n.y.min,o.y),n.y.max=Math.max(n.y.max,o.y+o.height)))}}catch(e){r.e(e)}finally{r.f()}return n.x.min=isNaN(n.x.min)?0:n.x.min,n.x.max=isNaN(n.x.max)?0:n.x.max,n.y.min=isNaN(n.y.min)?0:n.y.min,n.x.max=isNaN(n.x.max)?0:n.x.max,new DOMRect(n.x.min||0,n.y.min||0,n.x.max-n.x.min,n.y.max-n.y.min)};t.a=function(e,t){return function(){var n=function(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=e.localToGlobal(0,0),u=e.getTransformedBounds(),s=function e(t){return t?[].concat(o(e(t.parent)),[[t.scaleX,t.scaleY]]):[]},l=s(e.parent),f=i(l);try{for(f.s();!(n=f.n()).done;){var p=n.value;u.x+=u.x*(p[0]-1),u.y+=u.y*(p[1]-1),u.width=u.width*p[0],u.height=u.height*p[1]}}catch(e){f.e(e)}finally{f.f()}return new DOMRect((c.x+(a?u.x:0)-(r?u.width/2:0))/t.multiplier,(c.y+(a?u.y:0)-(r?u.height/2:0))/t.multiplier,u.width/t.multiplier,u.height/t.multiplier)},r=function(e,t){if(t.block){var r=t.block.types.includes(e.type);if(void 0!==e.value&&(r=r&&t.block.rValue.value==e.value),r)return n(t,!0)}};switch(e.tutorialElement){case"dom":for(var a=document.querySelectorAll(e.data.selector),c=0;c<a.length;c++){var f=a[c],p=f.getBoundingClientRect();if(p.width&&p.height)return e.data.fitContents?u(f):f.getBoundingClientRect()}break;case"object3d":try{var d=t.game.machineScreen.scene.machineView.getObjectByName(e.data.selector),h=new s(d,t);return new DOMRect(h.pos.x,h.pos.y,h.size.x,h.size.y)}catch(e){console.log(e)}break;case"memory-popup":return n(t.game.machineScreen.scene.memory);case"workspace.close":return n(t.game.workspace.header.closeButton);case"workspace-popup-description":return n(t.game.machineScreen.scene.workspace.descriptionPanel);case"memory":case"workspace":return n(t.game.currentScreen);case"workspace-popup":return n(t.game.machineScreen.scene.workspace);case"workspace.goal":return n(t.game.workspace.goalText);case"workspace.run":return n(t.game.workspace.workspace.indicator,!1,!1);case"stack.source":return n(t.game.workspace.workspace.files[e.data.selector].source,!0);case"block":var m=e.data.selector,v=function(e){var n,o=i(t.game.workspace.workspace.files[e.file].list);try{for(o.s();!(n=o.n()).done;){var a=r(e,n.value);if(a)return a}}catch(e){o.e(e)}finally{o.f()}},y=[];return Array.isArray(m)?y.push.apply(y,o(m.map(v))):y.push(v(m)),l(y.filter(Boolean));case"powerButton":return n(t.game.machineScreen.polypodLeft.powerButton);case"stack":return n(t.game.workspace.workspace.files[e.data.selector],!1,!0);case"chip.target":return n(t.game.workspace.goalView.children.find((function(e){return void 0!==e.allowDrag})),!0);case"footer.block":var _=e.data.selector;return"palette"===_.type?n(t.game.workspace.footer.children.find((function(e){return e.paletteName===_.name}))):n(t.game.workspace.footer.children.find((function(e){var t;return(null===(t=e.view)||void 0===t?void 0:t.block)&&r(_,e.view)})),!0)}}}},"4ZYG":function(e,t,n){"use strict";function r(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect();return{width:n.width/1,height:n.height/1,top:n.top/1,right:n.right/1,bottom:n.bottom/1,left:n.left/1,x:n.left/1,y:n.top/1}}function o(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function i(e){var t=o(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function a(e){return e instanceof o(e).Element||e instanceof Element}function c(e){return e instanceof o(e).HTMLElement||e instanceof HTMLElement}function u(e){return"undefined"!=typeof ShadowRoot&&(e instanceof o(e).ShadowRoot||e instanceof ShadowRoot)}function s(e){return e?(e.nodeName||"").toLowerCase():null}function l(e){return((a(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return r(l(e)).left+i(e).scrollLeft}function p(e){return o(e).getComputedStyle(e)}function d(e){var t=p(e);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function h(e,t,n){void 0===n&&(n=!1);var a,u,p=c(t),h=c(t)&&function(e){var t=e.getBoundingClientRect();return 1!==(t.width/e.offsetWidth||1)||1!==(t.height/e.offsetHeight||1)}(t),m=l(t),v=r(e,h),y={scrollLeft:0,scrollTop:0},_={x:0,y:0};return(p||!p&&!n)&&(("body"!==s(t)||d(m))&&(y=(a=t)!==o(a)&&c(a)?{scrollLeft:(u=a).scrollLeft,scrollTop:u.scrollTop}:i(a)),c(t)?((_=r(t,!0)).x+=t.clientLeft,_.y+=t.clientTop):m&&(_.x=f(m))),{x:v.left+y.scrollLeft-_.x,y:v.top+y.scrollTop-_.y,width:v.width,height:v.height}}function m(e){var t=r(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function v(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(u(e)?e.host:null)||l(e)}function y(e){return["html","body","#document"].indexOf(s(e))>=0?e.ownerDocument.body:c(e)&&d(e)?e:y(v(e))}function _(e,t){var n;void 0===t&&(t=[]);var r=y(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=o(r),c=i?[a].concat(a.visualViewport||[],d(r)?r:[]):r,u=t.concat(c);return i?u:u.concat(_(v(c)))}function g(e){return["table","td","th"].indexOf(s(e))>=0}function b(e){return c(e)&&"fixed"!==p(e).position?e.offsetParent:null}function w(e){for(var t=o(e),n=b(e);n&&g(n)&&"static"===p(n).position;)n=b(n);return n&&("html"===s(n)||"body"===s(n)&&"static"===p(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&c(e)&&"fixed"===p(e).position)return null;for(var n=v(e);c(n)&&["html","body"].indexOf(s(n))<0;){var r=p(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function x(e){function t(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var o=n.get(e);o&&t(o)}})),o.push(e)}var n=new Map,r=new Set,o=[];return e.forEach((function(e){n.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||t(e)})),o}function O(){return O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(this,arguments)}function j(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function S(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,r=e.defaultOptions,o=void 0===r?pe:r;return function(e,t,r){function i(){l.forEach((function(e){return e()})),l=[]}void 0===r&&(r=o);var c,u,s={placement:"bottom",orderedModifiers:[],options:k({},pe,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],f=!1,p={state:s,setOptions:function(r){var c="function"==typeof r?r(s.options):r;i(),s.options=k({},o,s.options,c),s.scrollParents={reference:a(e)?_(e):e.contextElement?_(e.contextElement):[],popper:_(t)};var u=function(e){var t=x(e);return fe.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?O({},n,t,{options:O({},n.options,t.options),data:O({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers)));return s.orderedModifiers=u.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.options,n=e.effect;if("function"==typeof n){var r=n({state:s,name:e.name,instance:p,options:void 0===t?{}:t});l.push(r||function(){})}})),p.update()},forceUpdate:function(){if(!f){var e=s.elements,t=e.reference,n=e.popper;if(j(t,n)){s.rects={reference:h(t,w(n),"fixed"===s.options.strategy),popper:m(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=k({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options;"function"==typeof i&&(s=i({state:s,options:void 0===a?{}:a,name:o.name,instance:p})||s)}else s.reset=!1,r=-1}}},update:(c=function(){return new Promise((function(e){p.forceUpdate(),e(s)}))},function(){return u||(u=new Promise((function(e){Promise.resolve().then((function(){u=void 0,e(c())}))}))),u}),destroy:function(){i(),f=!0}};return j(e,t)?(p.setOptions(r).then((function(e){!f&&r.onFirstUpdate&&r.onFirstUpdate(e)})),p):p}}function P(e){return e.split("-")[0]}function E(e){return e.split("-")[1]}function A(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function T(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?P(o):null,a=o?E(o):null,c=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(i){case J:t={x:c,y:n.y-r.height};break;case ee:t={x:c,y:n.y+n.height};break;case te:t={x:n.x+n.width,y:u};break;case ne:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var s=i?A(i):null;if(null!=s){var l="y"===s?"height":"width";switch(a){case ie:t[s]=t[s]-(n[l]/2-r[l]/2);break;case ae:t[s]=t[s]+(n[l]/2-r[l]/2)}}return t}function C(){return C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(this,arguments)}function M(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,c=e.offsets,u=e.position,s=e.gpuAcceleration,f=e.adaptive,d=e.roundOffsets,h=!0===d?function(e){var t=e.y,n=window.devicePixelRatio||1;return{x:ve(ve(e.x*n)/n)||0,y:ve(ve(t*n)/n)||0}}(c):"function"==typeof d?d(c):c,m=h.x,v=void 0===m?0:m,y=h.y,_=void 0===y?0:y,g=c.hasOwnProperty("x"),b=c.hasOwnProperty("y"),x=ne,O=J,k=window;if(f){var j=w(n),S="clientHeight",P="clientWidth";j===o(n)&&"static"!==p(j=l(n)).position&&"absolute"===u&&(S="scrollHeight",P="scrollWidth"),j=j,i!==J&&(i!==ne&&i!==te||a!==ae)||(O=ee,_-=j[S]-r.height,_*=s?1:-1),i!==ne&&(i!==J&&i!==ee||a!==ae)||(x=te,v-=j[P]-r.width,v*=s?1:-1)}var E,A=C({position:u},f&&ye);return C({},A,s?((E={})[O]=b?"0":"",E[x]=g?"0":"",E.transform=(k.devicePixelRatio||1)<=1?"translate("+v+"px, "+_+"px)":"translate3d("+v+"px, "+_+"px, 0)",E):((t={})[O]=b?_+"px":"",t[x]=g?v+"px":"",t.transform="",t))}function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(this,arguments)}function H(e){return e.replace(/left|right|bottom|top/g,(function(e){return _e[e]}))}function I(e){return e.replace(/start|end/g,(function(e){return ge[e]}))}function W(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&u(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B.apply(this,arguments)}function N(e){return B({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function R(e,t){return t===ce?N(function(e){var t=o(e),n=l(e),r=t.visualViewport,i=n.clientWidth,a=n.clientHeight,c=0,u=0;return r&&(i=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(c=r.offsetLeft,u=r.offsetTop)),{width:i,height:a,x:c+f(e),y:u}}(e)):c(t)?function(e){var t=r(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):N(function(e){var t,n=l(e),r=i(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=he(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),c=he(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-r.scrollLeft+f(e),s=-r.scrollTop;return"rtl"===p(o||n).direction&&(u+=he(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:c,x:u,y:s}}(l(e)))}function U(e,t,n){var r="clippingParents"===t?function(e){var t=_(v(e)),n=["absolute","fixed"].indexOf(p(e).position)>=0&&c(e)?w(e):e;return a(n)?t.filter((function(e){return a(e)&&W(e,n)&&"body"!==s(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o.reduce((function(t,n){var r=R(e,n);return t.top=he(r.top,t.top),t.right=me(r.right,t.right),t.bottom=me(r.bottom,t.bottom),t.left=he(r.left,t.left),t}),R(e,o[0]));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function z(){return z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(this,arguments)}function F(e){return z({},{top:0,right:0,bottom:0,left:0},e)}function q(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function V(){return V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Y(e,t){void 0===t&&(t={});var n=t.placement,o=void 0===n?e.placement:n,i=t.boundary,c=void 0===i?"clippingParents":i,u=t.rootBoundary,s=void 0===u?ce:u,f=t.elementContext,p=void 0===f?ue:f,d=t.altBoundary,h=void 0!==d&&d,m=t.padding,v=void 0===m?0:m,y=F("number"!=typeof v?v:q(v,oe)),_=e.rects.popper,g=e.elements[h?p===ue?"reference":ue:p],b=U(a(g)?g:g.contextElement||l(e.elements.popper),c,s),w=r(e.elements.reference),x=N(V({},_,T({reference:w,element:_,strategy:"absolute",placement:o}))),O=p===ue?x:w,k={top:b.top-O.top+y.top,bottom:O.bottom-b.bottom+y.bottom,left:b.left-O.left+y.left,right:O.right-b.right+y.right},j=e.modifiersData.offset;if(p===ue&&j){var S=j[o];Object.keys(k).forEach((function(e){var t=[te,ee].indexOf(e)>=0?1:-1,n=[J,ee].indexOf(e)>=0?"y":"x";k[e]+=S[n]*t}))}return k}function G(e,t,n){return he(e,me(t,n))}function $(){return $=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(this,arguments)}function Q(){return Q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q.apply(this,arguments)}function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X.apply(this,arguments)}function K(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Z(e){return[J,te,ee,ne].some((function(t){return e[t]>=0}))}n.d(t,"a",(function(){return be}));var J="top",ee="bottom",te="right",ne="left",re="auto",oe=[J,ee,te,ne],ie="start",ae="end",ce="viewport",ue="popper",se=oe.reduce((function(e,t){return e.concat([t+"-"+ie,t+"-"+ae])}),[]),le=[].concat(oe,[re]).reduce((function(e,t){return e.concat([t,t+"-"+ie,t+"-"+ae])}),[]),fe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],pe={placement:"bottom",modifiers:[],strategy:"absolute"},de={passive:!0},he=Math.max,me=Math.min,ve=Math.round,ye={top:"auto",right:"auto",bottom:"auto",left:"auto"},_e={left:"right",right:"left",bottom:"top",top:"bottom"},ge={start:"end",end:"start"},be=S({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=void 0===i||i,c=r.resize,u=void 0===c||c,s=o(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach((function(e){e.addEventListener("scroll",n.update,de)})),u&&s.addEventListener("resize",n.update,de),function(){a&&l.forEach((function(e){e.removeEventListener("scroll",n.update,de)})),u&&s.removeEventListener("resize",n.update,de)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=T({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,c=n.roundOffsets,u=void 0===c||c,s={placement:P(t.placement),variation:E(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=C({},t.styles.popper,M(C({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=C({},t.styles.arrow,M(C({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=C({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];c(o)&&s(o)&&(L(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return L(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&L(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});c(r)&&s(r)&&(L(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,r=e.options.offset,o=void 0===r?[0,0]:r,i=le.reduce((function(e,n){return e[n]=function(e,t,n){var r=P(e),o=[ne,J].indexOf(r)>=0?-1:1,i="function"==typeof n?n(D({},t,{placement:e})):n,a=i[0],c=i[1];return a=a||0,c=(c||0)*o,[ne,te].indexOf(r)>=0?{x:c,y:a}:{x:a,y:c}}(n,t.rects,o),e}),{}),a=i[t.placement],c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a.x,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0===a||a,u=n.fallbackPlacements,s=n.padding,l=n.boundary,f=n.rootBoundary,p=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,y=P(v),_=u||(y===v||!h?[H(v)]:function(e){if(P(e)===re)return[];var t=H(e);return[I(e),t,I(t)]}(v)),g=[v].concat(_).reduce((function(e,n){return e.concat(P(n)===re?function(e,t){void 0===t&&(t={});var n=t.boundary,r=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,c=void 0===a?le:a,u=E(t.placement),s=u?i?se:se.filter((function(e){return E(e)===u})):oe,l=s.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=s);var f=l.reduce((function(t,i){return t[i]=Y(e,{placement:i,boundary:n,rootBoundary:r,padding:o})[P(i)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:l,rootBoundary:f,padding:s,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),b=t.rects.reference,w=t.rects.popper,x=new Map,O=!0,k=g[0],j=0;j<g.length;j++){var S=g[j],A=P(S),T=E(S)===ie,C=[J,ee].indexOf(A)>=0,M=C?"width":"height",L=Y(t,{placement:S,boundary:l,rootBoundary:f,altBoundary:p,padding:s}),D=C?T?te:ne:T?ee:J;b[M]>w[M]&&(D=H(D));var W=H(D),B=[];if(i&&B.push(L[A]<=0),c&&B.push(L[D]<=0,L[W]<=0),B.every((function(e){return e}))){k=S,O=!1;break}x.set(S,B)}if(O)for(var N=function(e){var t=g.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},R=h?3:1;R>0;R--){if("break"===N(R))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0!==a&&a,u=n.tether,s=void 0===u||u,l=n.tetherOffset,f=void 0===l?0:l,p=Y(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),d=P(t.placement),h=E(t.placement),v=!h,y=A(d),_="x"===y?"y":"x",g=t.modifiersData.popperOffsets,b=t.rects.reference,x=t.rects.popper,O="function"==typeof f?f($({},t.rects,{placement:t.placement})):f,k={x:0,y:0};if(g){if(i||c){var j="y"===y?J:ne,S="y"===y?ee:te,T="y"===y?"height":"width",C=g[y],M=g[y]+p[j],L=g[y]-p[S],D=s?-x[T]/2:0,H=h===ie?b[T]:x[T],I=h===ie?-x[T]:-b[T],W=t.elements.arrow,B=s&&W?m(W):{width:0,height:0},N=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},R=N[j],U=N[S],z=G(0,b[T],B[T]),F=v?b[T]/2-D-z-R-O:H-z-R-O,q=v?-b[T]/2+D+z+U+O:I+z+U+O,V=t.elements.arrow&&w(t.elements.arrow),Q=t.modifiersData.offset?t.modifiersData.offset[t.placement][y]:0,X=g[y]+F-Q-(V?"y"===y?V.clientTop||0:V.clientLeft||0:0),K=g[y]+q-Q;if(i){var Z=G(s?me(M,X):M,C,s?he(L,K):L);g[y]=Z,k[y]=Z-C}if(c){var re=g[_],oe=re+p["x"===y?J:ne],ae=re-p["x"===y?ee:te],ce=G(s?me(oe,X):oe,re,s?he(ae,K):ae);g[_]=ce,k[_]=ce-re}}t.modifiersData[r]=k}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,c=P(n.placement),u=A(c),s=[ne,te].indexOf(c)>=0?"height":"width";if(i&&a){var l=function(e,t){return F("number"!=typeof(e="function"==typeof e?e(Q({},t.rects,{placement:t.placement})):e)?e:q(e,oe))}(o.padding,n),f=m(i),p="y"===u?J:ne,d="y"===u?ee:te,h=n.rects.reference[s]+n.rects.reference[u]-a[u]-n.rects.popper[s],v=a[u]-n.rects.reference[u],y=w(i),_=y?"y"===u?y.clientHeight||0:y.clientWidth||0:0,g=_/2-f[s]/2+(h/2-v/2),b=G(l[p],g,_-f[s]-l[d]);n.modifiersData[r]=((t={})[u]=b,t.centerOffset=b-g,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&W(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Y(t,{elementContext:"reference"}),c=Y(t,{altBoundary:!0}),u=K(a,r),s=K(c,o,i),l=Z(u),f=Z(s);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:s,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=X({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]})},"83Vu":function(e,t,n){"use strict";(function(e,r){function o(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)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(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.")}()}function i(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}var a=n("QRet"),c=n("niS0"),u=n("AoAR");t.a=function(t){var n=t.gameEngine,i=t.eventBus,s=t.accessToken,l=t.apiUrl,f=t.i18next,p=o(Object(a.e)({id:null,steps:[],progress:null}),2),d=p[0],h=p[1],m=d.steps,v=o(Object(a.e)(),2),y=v[0],_=v[1],g=Object(a.c)((function(){var e=m.findIndex((function(e){return e.id===y}));return{step:m[e],index:e,total:m.length,isLast:e===m.length-1,isFirst:!(e===m.length-1)&&0===e}}),[y]);Object(a.a)((function(){i.addEventListener("loaded",(function(e){var t;h(e.detail),_(e.detail.progress.tutorialStepId||(null===(t=e.detail.steps[0])||void 0===t?void 0:t.id))})),i.addEventListener("step.change",(function(e){_(e.detail)}))}),[]);return g.step?e(r,null,e("link",{rel:"stylesheet",href:"//fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"}),e(c.a,{onSkip:function(){_(null)},onCancel:function(){},onFinish:function(){var e;Object(u.c)(d.progress.id,{tutorialStepId:null===(e=m[g.index+1])||void 0===e?void 0:e.id,completed:!0},l,s),_(null)},onNext:function(){var e,t;_(null===(e=m[g.index+1])||void 0===e?void 0:e.id),Object(u.c)(d.progress.id,{tutorialStepId:null===(t=m[g.index+1])||void 0===t?void 0:t.id},l,s)},step:g,gameEngine:n,i18next:f})):null}}).call(this,n("hosL").h,n("hosL").Fragment)},AoAR:function(e,t,n){"use strict";function r(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?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){a(u,r,o,i,c,"next",e)}function c(e){a(u,r,o,i,c,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return f}));var u={},s=function(){var e=c((function*(e,t,n,r,i){var a="".concat(e).concat(t).concat(n);if(void 0===u[a]){u[a]=null;var c=yield(yield fetch("".concat(r,"/Tutorials/objectTypeId/").concat(e,"/objectId/").concat(t,"/has-tutorial?type=").concat(n),{method:"GET",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{Authorization:i}})).json();if(c&&c.hasTutorial&&!c.utp.completed){var s=o(o({},yield(yield fetch("".concat(r,"/Tutorials/objectTypeId/").concat(e,"/objectId/").concat(t,"/details?type=").concat(n),{method:"GET",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{Authorization:i}})).json()),{},{progress:c.utp});return u["".concat(e).concat(t)]=s,s}return null}}));return function(t,n,r,o,i){return e.apply(this,arguments)}}(),l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;fetch("".concat(n,"/TutorialProgresses/").concat(e),{method:"PATCH",mode:"cors",cache:"no-cache",credentials:"same-origin",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:r}})},f=function(){var e=c((function*(e,t,n,r,i){var a=yield(yield fetch("".concat(r,"/Tutorials/objectTypeId/").concat(e,"/objectId/").concat(t,"/has-tutorial?type=").concat(n),{method:"GET",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{Authorization:i}})).json();yield l(a.utp.id,{completed:!1,tutorialStepId:0},r,i);var c=o(o({},yield(yield fetch("".concat(r,"/Tutorials/objectTypeId/").concat(e,"/objectId/").concat(t,"/details?type=").concat(n),{method:"GET",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{Authorization:i}})).json()),{},{progress:o(o({},a.utp),{},{completed:!1,tutorialStepId:0})});return u["".concat(e).concat(t)]=c,c}));return function(t,n,r,o,i){return e.apply(this,arguments)}}()},I89O:function(){},KFxL: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)}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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,c=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){u=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(u)throw a}}}}function i(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}function a(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){a(u,r,o,i,c,"next",e)}function c(e){a(u,r,o,i,c,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function u(e){return c((function*(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=[],a=o(n);try{var c=function(){var n=t.value;switch(n.action){case"runScreen.close":if("run"===e.game.currentScreen.name)return e.game.currentScreen.onCLose(n.nextScreen),{v:void 0};break;case"goToMachineScreen":"webxr"!==e.game.currentScreen.name&&(e.game.startTransition(null,"webxr","goToMachineScreen"),i.push(new Promise((function(t){e.game.eventBus.addEventListener("screen.transition.end",(function n(r){"goToMachineScreen"===r.detail.id&&(t(r),e.game.eventBus.removeEventListener("screen.transition.end",n))}))}))));break;case"goToWorkspaceScreen":if("workspace"!==e.game.currentScreen.name){var r=e.game.machineScreen.scene.machineView.getObjectByName(n.objectName);e.DataManager.selectedMod=r.info,e.DataManager.selectedComponentChip=r.chip,e.game.startTransition(null,"workspace","goToWorkspaceScreen"),i.push(new Promise((function(t){e.game.eventBus.addEventListener("screen.transition.end",(function n(r){"goToWorkspaceScreen"===r.detail.id&&(t(r),e.game.eventBus.removeEventListener("screen.transition.end",n))}))})))}break;case"comments.open":e.game.eventBus.dispatch("comments.open");break;case"chip.run":e.game.workspace.workspace.setView(e.game.workspace.workspace.files[0]);break;case"machine.run":e.game.machineScreen.playMachine();break;case"machine.stop":e.game.machineScreen.stopMachine();break;case"workspaceContainer.open":Object(s.a)(n.objectName,e);break;case"footer.palette.open":e.game.workspace.footer.children.find((function(e){return e.paletteName===n.paletteName})).callback()}};for(a.s();!(t=a.n()).done;){var u=c();if("object"===r(u))return u.v}}catch(e){a.e(e)}finally{a.f()}yield Promise.all(i)}))}n.d(t,"a",(function(){return u}));var s=n("e2oM")},QRet:function(e,t,n){"use strict";function r(e,t){y.options.__h&&y.options.__h(m,e,_||t),_=0;var n=m.__H||(m.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function o(e){return _=1,function(e,t,n){var o=r(h++,2);return o.t=e,o.__c||(o.__=[n?n(t):d(void 0,t),function(e){var t=o.t(o.__[0],e);o.__[0]!==t&&(o.__=[t,o.__[1]],o.__c.setState({}))}],o.__c=m),o.__}(d,e)}function i(e,t){var n=r(h++,3);!y.options.__s&&p(n.__H,t)&&(n.__=e,n.__H=t,m.__H.__h.push(n))}function a(e,t){var n=r(h++,4);!y.options.__s&&p(n.__H,t)&&(n.__=e,n.__H=t,m.__h.push(n))}function c(e){return _=5,u((function(){return{current:e}}),[])}function u(e,t){var n=r(h++,7);return p(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function s(){g.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(l),e.__H.__h.forEach(f),e.__H.__h=[]}catch(t){e.__H.__h=[],y.options.__e(t,e.__v)}})),g=[]}function l(e){var t=m;"function"==typeof e.__c&&e.__c(),m=t}function f(e){var t=m;e.__c=e.__(),m=t}function p(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function d(e,t){return"function"==typeof t?t(e):t}n.d(t,"e",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return u}));var h,m,v,y=n("hosL"),_=0,g=[],b=y.options.__b,w=y.options.__r,x=y.options.diffed,O=y.options.__c,k=y.options.unmount;y.options.__b=function(e){m=null,b&&b(e)},y.options.__r=function(e){w&&w(e),h=0;var t=(m=e.__c).__H;t&&(t.__h.forEach(l),t.__h.forEach(f),t.__h=[])},y.options.diffed=function(e){x&&x(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==g.push(t)&&v===y.options.requestAnimationFrame||((v=y.options.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),j&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);j&&(t=requestAnimationFrame(n))})(s)),m=null},y.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(l),e.__h=e.__h.filter((function(e){return!e.__||f(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],y.options.__e(n,e.__v)}})),O&&O(e,t)},y.options.unmount=function(e){k&&k(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(l)}catch(e){y.options.__e(e,t.__v)}};var j="function"==typeof requestAnimationFrame},e2oM:function(e,t,n){"use strict";function r(e,t){t.game.machineScreen.scene.removeMemory(),t.game.machineScreen.scene.removeWorkspace();var n=t.game.machineScreen.scene.machineView.getObjectByName(e);n&&(t.game.machineScreen.scene.workspace=t.game.machineScreen.scene.createWorkspace(n))}n.d(t,"a",(function(){return r}))},hosL:function(e,t,n){"use strict";function r(e,t){for(var n in t)e[n]=t[n];return e}function o(e){var t=e.parentNode;t&&t.removeChild(e)}function i(e,t,n){var r,o,i,c={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:c[i]=t[i];if(arguments.length>2&&(c.children=arguments.length>3?M.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===c[i]&&(c[i]=e.defaultProps[i]);return a(e,c,r,o,null)}function a(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++D:o};return null==o&&null!=L.vnode&&L.vnode(i),i}function c(){return{current:null}}function u(e){return e.children}function s(e,t){this.props=e,this.context=t}function l(e,t){if(null==t)return e.__?l(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?l(e):null}function f(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return f(e)}}function p(e){(!e.__d&&(e.__d=!0)&&I.push(e)&&!d.__r++||B!==L.debounceRendering)&&((B=L.debounceRendering)||W)(d)}function d(){for(var e;d.__r=I.length;)e=I.sort((function(e,t){return e.__v.__b-t.__v.__b})),I=[],e.some((function(e){var t,n,o,i,a,c;e.__d&&(a=(i=(t=e).__v).__e,(c=t.__P)&&(n=[],(o=r({},i)).__v=i.__v+1,x(c,i,o,t.__n,void 0!==c.ownerSVGElement,null!=i.__h?[a]:null,n,null==a?l(i):a,i.__h),O(n,i),i.__e!=a&&f(i)))}))}function h(e,t,n,r,o,i,c,s,f,p){var d,h,v,_,g,b,w,O=r&&r.__k||U,k=O.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(_=n.__k[d]=null==(_=t[d])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?a(null,_,null,null,_):Array.isArray(_)?a(u,{children:_},null,null,null):_.__b>0?a(_.type,_.props,_.key,null,_.__v):_)){if(_.__=n,_.__b=n.__b+1,null===(v=O[d])||v&&_.key==v.key&&_.type===v.type)O[d]=void 0;else for(h=0;h<k;h++){if((v=O[h])&&_.key==v.key&&_.type===v.type){O[h]=void 0;break}v=null}x(e,_,v=v||R,o,i,c,s,f,p),g=_.__e,(h=_.ref)&&v.ref!=h&&(w||(w=[]),v.ref&&w.push(v.ref,null,_),w.push(h,_.__c||g,_)),null!=g?(null==b&&(b=g),"function"==typeof _.type&&_.__k===v.__k?_.__d=f=m(_,f,e):f=y(e,_,v,O,g,f),"function"==typeof n.type&&(n.__d=f)):f&&v.__e==f&&f.parentNode!=e&&(f=l(v))}for(n.__e=b,d=k;d--;)null!=O[d]&&("function"==typeof n.type&&null!=O[d].__e&&O[d].__e==n.__d&&(n.__d=l(r,d+1)),S(O[d],O[d]));if(w)for(d=0;d<w.length;d++)j(w[d],w[++d],w[++d])}function m(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?m(r,t,n):y(n,r,r,o,r.__e,t));return t}function v(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){v(e,t)})):t.push(e)),t}function y(e,t,n,r,o,i){var a,c,u;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),a=null;else{for(c=i,u=0;(c=c.nextSibling)&&u<r.length;u+=2)if(c==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function _(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||z.test(t)?n:n+"px"}function g(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||_(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||_(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?w:b,i):e.removeEventListener(t,i?w:b,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function b(e){this.l[e.type+!1](L.event?L.event(e):e)}function w(e){this.l[e.type+!0](L.event?L.event(e):e)}function x(e,t,n,o,i,a,c,l,f){var p,d,m,v,y,_,g,b,w,x,O,j=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(f=n.__h,l=t.__e=n.__e,t.__h=null,a=[l]),(p=L.__b)&&p(t);try{e:if("function"==typeof j){if(b=t.props,w=(p=j.contextType)&&o[p.__c],x=p?w?w.props.value:p.__:o,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in j&&j.prototype.render?t.__c=d=new j(b,x):(t.__c=d=new s(b,x),d.constructor=j,d.render=P),w&&w.sub(d),d.props=b,d.state||(d.state={}),d.context=x,d.__n=o,m=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=j.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=r({},d.__s)),r(d.__s,j.getDerivedStateFromProps(b,d.__s))),v=d.props,y=d.state,m)null==j.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==j.getDerivedStateFromProps&&b!==v&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(b,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(b,d.__s,x)||t.__v===n.__v){d.props=b,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),d.__h.length&&c.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(b,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(v,y,_)}))}d.context=x,d.props=b,d.state=d.__s,(p=L.__r)&&p(t),d.__d=!1,d.__v=t,d.__P=e,p=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(o=r(r({},o),d.getChildContext())),m||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(v,y)),O=null!=p&&p.type===u&&null==p.key?p.props.children:p,h(e,Array.isArray(O)?O:[O],t,n,o,i,a,c,l,f),d.base=t.__e,t.__h=null,d.__h.length&&c.push(d),g&&(d.__E=d.__=null),d.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=k(n.__e,t,n,o,i,a,c,f);(p=L.diffed)&&p(t)}catch(e){t.__v=null,(f||null!=a)&&(t.__e=l,t.__h=!!f,a[a.indexOf(l)]=null),L.__e(e,t,n)}}function O(e,t){L.__c&&L.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){L.__e(e,t.__v)}}))}function k(e,t,n,r,i,a,c,u){var s,f,p,d=n.props,m=t.props,v=t.type,y=0;if("svg"===v&&(i=!0),null!=a)for(;y<a.length;y++)if((s=a[y])&&(s===e||(v?s.localName==v:3==s.nodeType))){e=s,a[y]=null;break}if(null==e){if(null===v)return document.createTextNode(m);e=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,m.is&&m),a=null,u=!1}if(null===v)d===m||u&&e.data===m||(e.data=m);else{if(a=a&&M.call(e.childNodes),f=(d=n.props||R).dangerouslySetInnerHTML,p=m.dangerouslySetInnerHTML,!u){if(null!=a)for(d={},y=0;y<e.attributes.length;y++)d[e.attributes[y].name]=e.attributes[y].value;(p||f)&&(p&&(f&&p.__html==f.__html||p.__html===e.innerHTML)||(e.innerHTML=p&&p.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||g(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||g(e,i,t[i],n[i],r)}(e,m,d,i,u),p)t.__k=[];else if(y=t.props.children,h(e,Array.isArray(y)?y:[y],t,n,r,i&&"foreignObject"!==v,a,c,a?a[0]:n.__k&&l(n,0),u),null!=a)for(y=a.length;y--;)null!=a[y]&&o(a[y]);u||("value"in m&&void 0!==(y=m.value)&&(y!==e.value||"progress"===v&&!y)&&g(e,"value",y,d.value,!1),"checked"in m&&void 0!==(y=m.checked)&&y!==e.checked&&g(e,"checked",y,d.checked,!1))}return e}function j(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){L.__e(e,n)}}function S(e,t,n){var r,i;if(L.unmount&&L.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||j(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){L.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&S(r[i],t,"function"!=typeof e.type);n||null==e.__e||o(e.__e),e.__e=e.__d=void 0}function P(e,t,n){return this.constructor(e,n)}function E(e,t,n){var r,o,a;L.__&&L.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],x(t,e=(!r&&n||t).__k=i(u,null,[e]),o||R,R,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?M.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r),O(a,e)}function A(e,t){E(e,t,A)}function T(e,t,n){var o,i,c,u=r({},e.props);for(c in t)"key"==c?o=t[c]:"ref"==c?i=t[c]:u[c]=t[c];return arguments.length>2&&(u.children=arguments.length>3?M.call(arguments,2):n),a(e.type,u,o||e.key,i||e.ref,null)}function C(e,t){var n={__c:t="__cC"+N++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(p)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}n.r(t),n.d(t,"render",(function(){return E})),n.d(t,"hydrate",(function(){return A})),n.d(t,"createElement",(function(){return i})),n.d(t,"h",(function(){return i})),n.d(t,"Fragment",(function(){return u})),n.d(t,"createRef",(function(){return c})),n.d(t,"isValidElement",(function(){return H})),n.d(t,"Component",(function(){return s})),n.d(t,"cloneElement",(function(){return T})),n.d(t,"createContext",(function(){return C})),n.d(t,"toChildArray",(function(){return v})),n.d(t,"options",(function(){return L}));var M,L,D,H,I,W,B,N,R={},U=[],z=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;M=U.slice,L={__e:function(e,t){for(var n,r,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),o=n.__d),o)return n.__E=n}catch(t){e=t}throw e}},D=0,H=function(e){return null!=e&&void 0===e.constructor},s.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=r({},this.state),"function"==typeof e&&(e=e(r({},n),this.props)),e&&r(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),p(this))},s.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),p(this))},s.prototype.render=u,I=[],W="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d.__r=0,N=0},niS0:function(e,t,n){"use strict";(function(e){function r(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?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){a(u,r,o,i,c,"next",e)}function c(e){a(u,r,o,i,c,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function u(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)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(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.")}()}function s(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}var l=n("4ZYG"),f=n("QRet"),p=n("4Y0q"),d=(n("I89O"),n("KFxL")),h=n("wYuo");t.a=function(t){var n=t.onFinish,r=t.onNext,i=t.onSkip,a=t.step,s=t.gameEngine,m=t.i18next,v=u(Object(f.e)(a),2),y=v[0],_=y.step,g=y.isLast,b=y.index,w=y.total,x=v[1],O=u(Object(f.e)(!1),2),k=O[0],j=O[1],S=u(Object(f.e)(!1),2),P=S[0],E=S[1],A=Object(f.d)(),T=Object(f.d)(),C=Object(f.d)(),M=Object(f.d)({overlay:Object(f.d)(),point:Object(f.d)()}),L=u(Object(f.e)({center:{},point:{},top:{},left:{},bottom:{},right:{}}),2),D=L[0],H=L[1],I=Object(d.a)(s),W=Object(h.a)(s);Object(f.a)((function(){T.current=Object(l.a)(M.current.point.current,A.current,{placement:"auto",modifiers:[{name:"offset",options:{offset:[0,15]}},{name:"arrow",options:{element:C.current}},{name:"flip",options:{fallbackPlacements:["auto"]}}]})}),[]),Object(f.a)((function(){var e=a.step;j(!1);var t=[],n=Object(p.a)(e,s),r=function(e){e.stopPropagation(),s.game.threeContext.getOrbit().enabled=!1},o=function(){var e=n(),t=window.innerWidth,r=window.innerHeight,o=a.step.data.margin||25,i=e.width,c=e.height,u=a.step.data.x||0,s=a.step.data.y||0;"box"!==a.step.data.overlay&&(i=Math.max(c,i),c=Math.max(i,c));var l={width:i+o,height:c+o,x:e.x-o/2+i*u,y:e.y-o/2+c*s},f={center:{width:l.width,height:l.height,left:l.x,top:l.y},point:{width:0,height:0,top:0,left:0},top:{width:t,height:Math.max(0,l.y)},left:{top:l.y,width:Math.max(0,l.x),height:r},bottom:{top:l.y+l.height,left:l.x,width:l.width,height:r},right:{top:l.y,left:l.x+l.width,width:t,height:r}};f.point=l.height>=window.innerHeight-250&&l.width>=window.innerWidth-250?{width:15,height:15,left:l.x+l.width/2,top:l.y+(l.height>=window.innerHeight-80?l.height/2:l.height)}:{width:l.width,height:l.height,left:l.x,top:l.y},H(f)},i=function(){var n=c((function*(){t.push(window.setTimeout(c((function*(){yield I(e.data.preActions||[]),yield W(e),t.push(window.setTimeout(c((function*(){o(),x(a),j(!0)})),e.data.delay||1))})),e.data.preActionDelay||1)),window.addEventListener("resize",o),s&&(s.game.machineScreen.scene.mouseEnabled=!1,s.game.threeContext.getOrbit().enabled=!1,window.addEventListener("mousewheel",r),window.addEventListener("mousedown",r),window.addEventListener("touchstart",r))}));return function(){return n.apply(this,arguments)}}();return i(),function(){j(!1),E(!1),window.removeEventListener("resize",o),s&&(s.game.machineScreen.scene.mouseEnabled=!0,s.game.threeContext.getOrbit().enabled=!0,window.removeEventListener("mousewheel",r),window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)),t.forEach(window.clearTimeout)}}),[a.step.id]),Object(f.b)((function(){T.current&&setTimeout((function(){T.current.forceUpdate(),E(!0)}),150)}),[D]);var B="rgba(0,0,0,".concat(_.data.overlayOpacity||.7,")"),N=Object(f.c)((function(){switch(_.data.overlay){case"box":return{borderRadius:15};default:return{background:"radial-gradient(transparent 30%, ".concat(B," 70%)")};case"circle":return{borderRadius:99999}}}),[_.id]),R=Object(f.c)((function(){return new Array(w).fill(0)}),[w]),U=function(){var e=c((function*(){j(!1),yield I(_.data.clickActions||[]),g?n(_.id):r(_.id)}));return function(){return e.apply(this,arguments)}}();return e("div",{class:"transition-opacity pointer-events-none",style:{opacity:k?1:0}},e("div",{class:"fixed inset-0"},e("div",{onClick:U,class:"absolute overflow-hidden z-50 ".concat(!1===_.data.nextOnClick?"pointer-events-none":"pointer-events-auto"),style:D.center,"data-overlay":"center"},e("div",{style:o(o({},N),{},{boxShadow:"0 0 0 ".concat(2*Math.max(25,D.center.width,D.center.height),"px ").concat(B)}),class:"absolute inset-0 "})),e("div",{class:"absolute pointer-events-auto",ref:M.current.point,style:D.point,"data-overlay":"point"}),e("div",{class:"absolute pointer-events-auto",style:o({background:B},D.top),"data-overlay":"top"}),e("div",{style:o({background:B},D.left),class:"absolute pointer-events-auto","data-overlay":"left"}),e("div",{style:o({background:B},D.bottom),class:"absolute pointer-events-auto","data-overlay":"bottom"}),e("div",{style:o({background:B},D.right),class:"absolute pointer-events-auto","data-overlay":"right"})),e("div",{style:{opacity:P?1:0},ref:A,class:"bg-white rounded-xl max-w-sm w-full pointer-events-auto subpixel-antialiased shadow-[0_8px_16px_rgba(0,0,0,.2)] font-sans2 "},e("div",{class:"p-6 min-h-[130px]"},!!_.data.title&&e("div",{class:"mb-0.5 font-bold text-grape-800 text-[21px] antialiased"},m.t("tutorials:".concat(_.data.title))),!!_.data.image&&e("img",{class:"w-16 h-16 mb-2 mt-4 mx-auto",src:m.t("tutorials:".concat(_.data.image))}),!!_.data.content&&e("div",{style:{color:"#607683"},class:" text-lg ".concat(_.data.image?"pt-0":"")},m.t("tutorials:".concat(_.data.content)))),e("div",{class:"pr-3.5"},e("div",{class:"p-3.5 pr-0 py- flex justify-between items-center border-t-2 border-mulberry-500 bg-opacity-50"},e("div",{class:"-m-1 flex items-center flex-1 pl-2"},R.length>1&&R.map((function(t,n){return e("div",{key:n,class:"\n ".concat(n===b?"bg-pineapple-450":"bg-mulberry-400","\n w-2.5 h-2.5 rounded-full m-1\n ")})}))),e("div",{class:"space-x-1"},_.data.canSkip&&e("button",{onClick:i,class:"text-mulberry-900 hover:bg-mulberry-400 rounded-lg px-3 py-1.5 "},m.t(_.data.skipText?"tutorials:".concat(_.data.skipText):"tutorials:tl.tutorials.general.skip")),!g&&!0!==_.data.hideNextFinish&&e("button",{onClick:U,class:"text-mulberry-900 bg-mulberry-400 rounded-lg px-3 py-1.5 hover:bg-pineapple-450 transition focus:outline-none focus:ring focus:ring-mulberry-200"},m.t(_.data.nextText?"tutorials:".concat(_.data.nextText):"tutorials:tl.tutorials.general.next")),g&&!0!==_.data.hideNextFinish&&e("button",{onClick:U,class:"text-mulberry-900 bg-pineapple-450 rounded-lg px-3 py-1.5 hover:bg-pineapple-400 transition focus:outline-none focus:ring focus:ring-mulberry-200"},m.t(_.data.finishText?"tutorials:".concat(_.data.finishText):"tutorials:tl.tutorials.general.finish")))))))}}).call(this,n("hosL").h)},wYuo:function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t,n=(t=function*(t){switch(t.tutorialElement){case"memory-popup":a(t.data.selector,e);break;case"memory":a(t.data.selector,e),e.game.machineScreen.scene.memory.gotoScreen();break;case"workspace-popup":Object(i.a)(t.data.selector,e);break;case"workspace":Object(i.a)(t.data.selector,e),e.game.machineScreen.scene.workspace.gotoScreen()}},function(){var e=this,n=arguments;return new Promise((function(o,i){function a(e){r(u,o,i,a,c,"next",e)}function c(e){r(u,o,i,a,c,"throw",e)}var u=t.apply(e,n);a(void 0)}))});return function(e){return n.apply(this,arguments)}}()}n.d(t,"a",(function(){return o}));var i=n("e2oM"),a=function(e,t){t.game.machineScreen.scene.removeMemory(),t.game.machineScreen.scene.removeWorkspace(),t.game.machineScreen.scene.memory=t.game.machineScreen.scene.createMemory(t.game.machineScreen.scene.machineView.getObjectByName(e))}}})})); | ||
//# sourceMappingURL=bundle.js.map |
export declare type ID = string | number; | ||
export declare type StepType = "dom" | "object3d" | "memory-popup" | "memory" | "workspace-popup" | "workspace" | "block" | "workspace.run" | "stack.source" | "powerButton" | "powerButton.stop" | "footer.block" | "stack" | "chip.target" | "workspace-popup-description" | "workspace.goal"; | ||
export declare type StepType = "dom" | "object3d" | "memory-popup" | "memory" | "workspace-popup" | "workspace" | "block" | "workspace.run" | "stack.source" | "powerButton" | "powerButton.stop" | "footer.block" | "stack" | "chip.target" | "workspace-popup-description" | "workspace.goal" | "workspace.close"; | ||
export declare type StepAction = { | ||
@@ -4,0 +4,0 @@ action: "runScreen.close"; |
{ | ||
"private": false, | ||
"name": "@polyup/tutorials", | ||
"version": "0.0.31", | ||
"version": "0.0.32", | ||
"main": "./build/bundle.js", | ||
@@ -6,0 +6,0 @@ "types": "./build/types/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
491386
487