1"use strict";(self.webpackChunkdessert_roz_gulab_jamun=self.webpackChunkdessert_roz_gulab_jamun||[]).push([[756],{90162:function(e,t,n){t.__esModule=!0,t.FITB=void 0;var s=c(n(67294)),i=n(66132),r=n(75708),a=n(27188),l=n(65003),u=c(n(13540)),f=n(52547),o=n(23431);function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function c(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var s={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,n&&n.set(e,s),s}var x=["S","W","T","W","H","R","F","N","T","H","M"],p=s.default.forwardRef((function(e,t){var n=e.index,i=e.value,a=e.onChange,u=(e.hasErrorImmediate,e.hasError),f=e.hasSuccess,b=(e.nextElRef,e.onIsValid,u?"red":f?"green":"white");return(0,s.useEffect)((function(){if(f&&n<x.length-1){var e=document.querySelector("input[name=fitb"+(n+2)+"]");e&&e.focus()}}),[f]),(0,o.jsx)(r.Field,{innerRef:t,as:"input",autocomplete:"off",css:function(e){return Object.assign({all:"unset",background:"transparent",border:"none",boxShadow:"none",borderBottom:(0,l.pxToRem)(8)+" solid "+b,width:"calc("+e.typography.fitb.fontSize+" * 0.6)"},e.typography.fitb)}
1,className:"fitb-input fitb-input-"+n,type:"text",name:"fitb"+(n+1),value:i,onChange:function(e){var t=e;t.target.value=t.target.value.charAt(0),a(t)}})})),d=u.object().shape({fitb1:u.string().matches(new RegExp("["+x[0]+x[0].toLowerCase()+"]"),"").required("Required"),fitb2:u.string().matches(new RegExp("["+x[1]+x[1].toLowerCase()+"]"),"").required("Required"),fitb3:u.string().matches(new RegExp("["+x[2]+x[2].toLowerCase()+"]"),"").required("Required"),fitb4:u.string().matches(new RegExp("["+x[3]+x[3].toLowerCase()+"]"),"").required("Required"),fitb5:u.string().matches(new RegExp("["+x[4]+x[4].toLowerCase()+"]"),"").required("Required"),fitb6:u.string().matches(new RegExp("["+x[5]+x[5].toLowerCase()+"]"),"").required("Required"),fitb7:u.string().matches(new RegExp("["+x[6]+x[6].toLowerCase()+"]"),"").required("Required"),fitb8:u.string().matches(new RegExp("["+x[7]+x[7].toLowerCase()+"]"),"").required("Required"),fitb9:u.string().matches(new RegExp("["+x[8]+x[8].toLowerCase()+"]"),"").required("Required"),fitb10:u.string().matches(new RegExp("["+x[9]+x[9].toLowerCase()+"]"),"").required("Required"),fitb11:u.string().matches(new RegExp("["+x[10]+x[10].toLowerCase()+"]"),"").required("Required")}),h={name:"1n5qb5j",styles:"position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center"},m={name:"bsol0a",styles:"cursor:pointer;opacity:0;position:fixed;bottom:5vh;left:2vw;z-index:202"},g={name:"1azakc",styles:"text-align:center"},j={name:"7t5isj",styles:"margin-bottom:10vh"},v={name:"akdqam",styles:"margin-top:1rem"},E={name:"1kj12g0",styles:"span{visibility:hidden;}"};t.FITB=function(e){var t=e.onComplete,n=(0,s.useRef)(null),l=(0,s.useRef)(null),u=(0,s.useRef)(null),b=(0,s.useRef)(null),c=(0,s.useRef)(null),R=(0,s.useRef)(null),w=(0,s.useRef)(null),y=(0,s.useRef)(null),C=(0,s.useRef)(null),S=(0,s.useRef)(null),q=(0,s.useRef)(null),k=(0,s.useRef)(null),I=(0,s.useRef)(null),L=(0,s.useState)(!1),F=L[0],T=L[1];(0,s.useEffect)((function(){F&&t()}),[F]),(0,s.useLayoutEffect)((function(){var e=function(e){var t=e.key;if(("Backspace"===t||"Delete"===t)&&document.activeElement.matches("input")){var n=document.activeElement,s=n.value,i=n.name;if(!s.length&&"fitb1"!==i){e.preventDefault();var r=parseInt(i.split("fitb")[1],10),a=document.querySelector("input[name=fitb"+(r-1)+"]");l.current.setFieldValue(a.name,""),a.focus()}}},t=i.gsap.context((function(){i.gsap.utils.toArray("input")[0].focus(),i.gsap.timeline({}).add((0,f.enterTextViaScrambling)(document.querySelector("#fitb-container")).play().to("#fitb-blanks span",{visibility:"visible",stagger:.05,ease:"none"})),document.addEventListener("keydown",e),setTimeout((function(){i.gsap.to(".solve-button",{autoAlpha:1})}),7e3)}),n);return function(){document.removeEventListener("keydown",e),t.revert()}}),[]);return(0,o.jsx)("div",{ref:n,css:h},(0,o.jsx)("div",{role:"button",onClick:function(){i.gsap.context((function(){var e=i.gsap.utils.toArray("input");l.current.resetForm(),e.forEach((function(e,t){l.current.setFieldValue(e.name,x[t])})),l.current.validateForm()}),n)},className:"solve-button",css:m},(0,o.jsx)(a.Text,{className:"gj-menu-item",color:"white",variant:"mainNav"},"Solve this for me")),(0,o.jsx)("div",{css:g},(0,o.jsx)(a.Text,{id:"fitb-container",css:j,variant:"caption",color:"white"},"Fill in the blanks to open the map",(0,o.jsx)("br",null),(0,o.jsx)("div",{css:v},"*HINT: ACCIO GULAB JAMUN")),(0,o.jsx)("div",{id:"fitb-blanks",css:E},(0,o.jsx)(r.Formik,{innerRef:l,initialValues:{fitb1:"",fitb2:"",fitb3:"",fitb4:"",fitb5:"",fitb6:"",fitb7:"",fitb8:"",fitb9:"",fitb10:"",fitb11:""},isInitialValid:!1,validationSchema:d,onSubmit:function(){}},(function(e){var t=e.values,n=e.errors,s=(e.touched,e.handleChange),i=(e.handleBlur,e.handleSubmit);e.isSubmitting,e.isValid;return T(JSON.stringify(t).toLowerCase()===JSON.stringify({fitb1:"S",fitb2:"W",fitb3:"T",fitb4:"W",fitb5:"H",fitb6:"R",fitb7:"F",fitb8:"N",fitb9:"T",fitb10:"H",fitb11:"M"}).toLowerCase()),(0,o.jsx)("form",{onSubmit:i},(0,o.jsx)(a.Text,{variant:"fitb",color:"#FFF"},(0,o.jsx)("span",null,"F"),(0,o.jsx)("span",null,"a"),(0,o.jsx)("span",null,"n"),(0,o.jsx)("span",null,"t"),(0,o.jsx)("span",null,"a"),(0,o.jsx)("span",null,"s"),(0,o.jsx)("span",null,"t"),(0,o.jsx)("span",null,"i"),(0,o.jsx)("span",null,"c"),(0,o.jsx)("span",null," "),(0,o.jsx)("span",null,(0,o.jsx)(p,{ref:u,nextElRef
1:b,index:0,onChange:s,hasError:t.fitb1&&n.fitb1,hasErrorImmediate:n.fitb1,hasSuccess:t.fitb1.length&&!n.fitb1,value:t.fitb1})),(0,o.jsx)("span",null,(0,o.jsx)(p,{ref:b,nextElRef:c,index:1,onChange:s,hasError:t.fitb2&&n.fitb2,hasErrorImmediate:n.fitb2,hasSuccess:t.fitb2.length&&!n.fitb2,value:t.fitb2})),(0,o.jsx)("span",null,"E"),(0,o.jsx)("span",null,"E"),(0,o.jsx)("span",null,(0,o.jsx)(p,{ref:c,nextElRef:R,index:2,onChange:s,hasError:t.fitb3&&n.fitb3,hasErrorImmediate:n.fitb3,hasSuccess:t.fitb3.length&&!n.fitb3,value:t.fitb3})),(0,o.jsx)("span",null,"S")," ",(0,o.jsx)("br",null),(0,o.jsx)("span",null," "),(0,o.jsx)("span",null,"A"),(0,o.jsx)("span",null,"N"),(0,o.jsx)("span",null,"D"),(0,o.jsx)("span",null," "),(0,o.jsx)("span",null,(0,o.jsx)(p,{ref:R,nextElRef:w,index:3,onChange:s,hasError:t.fitb4&&n.fitb4,hasErrorImmediate:n.fitb4,hasSuccess:t.fitb4.length&&!n.fitb4,value:t.fitb4})),(0,o.jsx)("span",null,(0,o.jsx)(p,{ref:w,nextElRef:y,index:4,onChange:s,hasError:t.fitb5&&n.fitb5,hasErrorImmediate:n.fitb5,hasSuccess:t.fitb5.length&&!n.fitb5,value:t.fitb5})),(0,o.jsx)("span",null,"E"),(0,o.jsx)("span",null,(0,o.jsx)(p,{ref:y,nextElRef:C,index:5,onChange:s,hasError:t.fitb6&&n.fitb6,hasErrorImmediate:n.fitb6,hasSuccess:t.fitb6.length&&!n.fitb6,value:t.fitb6})),(0,o.jsx)("span",null,"E"),(0,o.jsx)("span",null," "),(0,o.jsx)("span",null,"T"),(0,o.jsx)("span",null,"O"),(0,o.jsx)("br",null),(0,o.jsx)("span",null,(0,o.jsx)(p,{ref:C,nextElRef:S,index:6,onChange:s,hasError:t.fitb7&&n.fitb7,hasErrorImmediate:n.fitb7,hasSuccess:t.fitb7.length&&!n.fitb7,value:t.fitb7})),(0,o.jsx)("span",null,"I"),(0,o.jsx)("span",null,(0,o.jsx)(p,{ref:S,nextElRef:q,index:7,onChange:s,hasError:t.fitb8&&n.fitb8,hasErrorImmediate:n.fitb8,hasSuccess:t.fitb8.length&&!n.fitb8,value:t.fitb8})),(0,o.jsx)("span",null,"D "),(0,o.jsx)("span",null,(0,o.jsx)(p,{ref:q,nextElRef:k,index:8,onChange:s,hasError:t.fitb9&&n.fitb9,hasErrorImmediate:n.fitb9,hasSuccess:t.fitb9.length&&!n.fitb9,value:t.fitb9})),(0,o.jsx)("span",null,(0,o.jsx)(p,{ref:k,nextElRef:I,index:9,onChange:s,hasError:t.fitb10&&n.fitb10,hasErrorImmediate:n.fitb10,hasSuccess:t.fitb10.length&&!n.fitb10,value:t.fitb10})),(0,o.jsx)("span",null,"E"),(0,o.jsx)("span",null,(0,o.jsx)(p,{ref:k,index:10,onChange:s,hasError:t.fitb11&&n.fitb11,hasErrorImmediate:n.fitb11,hasSuccess:t.fitb11.length&&!n.fitb11,value:t.fitb11}))))})))))}}}]); 2//# sourceMappingURL=cc5cf0f1-8d98efa2ccc079445cd6.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.