{"ast":null,"code":"var _jsxFileName = \"D:\\\\Project\\\\UC_Trains_Voice\\\\react-demo\\\\src\\\\gavt\\\\GavtCali.tsx\",\n  _s = $RefreshSig$();\nimport React, { useState } from 'react';\nimport { Divider, Steps, Breadcrumb, Button, message } from 'antd';\nimport { Link } from 'react-router-dom';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst stepsTitles = ['Instruction', 'Before You Start', 'Record Your Voice', 'Complete'];\nconst stepsDescriptions = [`This module will record your production of different vowel sounds so we can provide resonance targets customized to your voice. \n    If you do not want to complete this procedure right now, or if you experience any technical difficulty, you can use resonance targets derived from a published reference sample of cis women or men (under the “Reference Targets” tab). \n    It should take around five minutes to complete the customization process.`, `To measure your resonance for a vowel, we want you to sustain JUST the vowel sound for about two seconds. (We will give you a key word to identify the vowel, but you should produce only the vowel sound, not the whole word.) Try to produce the vowel in a way that feels natural and comfortable to you – we will use our measurements from this production as a baseline for any changes in resonance. \n    Everyone's vowels will be a bit different depending on their dialect or language background. That’s OK!\n    When you are ready to produce the vowel, click “start” and sustain the vowel for about two seconds, then click “stop.”\n    `, 'Follow the steps to record your voice.', 'Review and complete the calibration.'];\nconst recordingSteps = [{\n  title: '“ee” like in “seed” ',\n  description: 'Click “start” and pronounce the vowel for 2 seconds, then click “stop”.'\n}, {\n  title: '“ih” like in “hid” ',\n  description: 'Click “start” and pronounce the vowel for 2 seconds, then click “stop”.'\n}, {\n  title: '“eh” like in “head” ',\n  description: 'Click “start” and pronounce the vowel for 2 seconds, then click “stop”.'\n}];\nconst GavtCali = () => {\n  _s();\n  const [currentStep, setCurrentStep] = useState(0);\n  const [isRecording, setIsRecording] = useState(false);\n  const nextStep = () => {\n    if (currentStep < stepsTitles.length - 1) {\n      setCurrentStep(currentStep + 1);\n      setIsRecording(false);\n    }\n  };\n  const prevStep = () => {\n    if (currentStep > 0) {\n      setCurrentStep(currentStep - 1);\n      setIsRecording(false);\n    }\n  };\n  const startRecording = () => {\n    setIsRecording(true);\n    message.info('Recording started!');\n  };\n  const stopRecording = () => {\n    setIsRecording(false);\n    message.info('Recording saved!');\n  };\n  const renderStepContent = step => {\n    switch (step) {\n      case 2:\n        return /*#__PURE__*/_jsxDEV(\"div\", {\n          children: [/*#__PURE__*/_jsxDEV(\"p\", {\n            children: \"Click to start, pronounce just the vowel for around 2 seconds, then click to stop\"\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 64,\n            columnNumber: 13\n          }, this), /*#__PURE__*/_jsxDEV(Steps, {\n            progressDot: true,\n            current: 1,\n            direction: \"vertical\",\n            items: [{\n              title: '“ee” like in “seed” ',\n              description: 'Description with recording options.'\n            }, {\n              title: '“ih” like in “hid”  ',\n              description: 'Recording in progress...'\n            }, {\n              title: ' “eh” like in “head”  ',\n              description: 'Waiting for start...'\n            }]\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 65,\n            columnNumber: 13\n          }, this), /*#__PURE__*/_jsxDEV(Button, {\n            type: \"primary\",\n            onClick: () => message.info('Recording saved!'),\n            children: \"Save Recording\"\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 70,\n            columnNumber: 13\n          }, this)]\n        }, void 0, true, {\n          fileName: _jsxFileName,\n          lineNumber: 63,\n          columnNumber: 11\n        }, this);\n      default:\n        return /*#__PURE__*/_jsxDEV(\"p\", {\n          children: stepsDescriptions[step]\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 74,\n          columnNumber: 16\n        }, this);\n    }\n  };\n  return /*#__PURE__*/_jsxDEV(\"div\", {\n    style: {\n      display: 'flex',\n      flexDirection: 'column',\n      alignItems: 'center',\n      marginTop: '20px',\n      width: '80%'\n    },\n    children: [/*#__PURE__*/_jsxDEV(Breadcrumb, {\n      style: {\n        marginBottom: '20px',\n        alignSelf: 'start'\n      },\n      children: [/*#__PURE__*/_jsxDEV(Breadcrumb.Item, {\n        children: /*#__PURE__*/_jsxDEV(Link, {\n          to: \"/gavt\",\n          children: \"Gavt Home\"\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 81,\n          columnNumber: 26\n        }, this)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 81,\n        columnNumber: 9\n      }, this), /*#__PURE__*/_jsxDEV(Breadcrumb.Item, {\n        children: \"Calibration\"\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 82,\n        columnNumber: 9\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 80,\n      columnNumber: 7\n    }, this), /*#__PURE__*/_jsxDEV(Steps, {\n      progressDot: true,\n      current: currentStep,\n      items: stepsTitles.map(title => ({\n        title\n      }))\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 84,\n      columnNumber: 7\n    }, this), /*#__PURE__*/_jsxDEV(Divider, {}, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 85,\n      columnNumber: 7\n    }, this), renderStepContent(currentStep), /*#__PURE__*/_jsxDEV(\"div\", {\n      style: {\n        marginTop: '20px'\n      },\n      children: [/*#__PURE__*/_jsxDEV(Button, {\n        disabled: currentStep === 0,\n        onClick: prevStep,\n        children: \"Previous\"\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 88,\n        columnNumber: 9\n      }, this), /*#__PURE__*/_jsxDEV(Button, {\n        type: \"primary\",\n        onClick: nextStep,\n        disabled: currentStep === stepsTitles.length - 1,\n        children: currentStep === stepsTitles.length - 1 ? 'Finish' : 'Next'\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 89,\n        columnNumber: 9\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 87,\n      columnNumber: 7\n    }, this)]\n  }, void 0, true, {\n    fileName: _jsxFileName,\n    lineNumber: 79,\n    columnNumber: 5\n  }, this);\n};\n_s(GavtCali, \"Ll2Ns2AgeT6tJQ/cYUq1o8ZC/js=\");\n_c = GavtCali;\nexport default GavtCali;\nvar _c;\n$RefreshReg$(_c, \"GavtCali\");","map":{"version":3,"names":["React","useState","Divider","Steps","Breadcrumb","Button","message","Link","jsxDEV","_jsxDEV","stepsTitles","stepsDescriptions","recordingSteps","title","description","GavtCali","_s","currentStep","setCurrentStep","isRecording","setIsRecording","nextStep","length","prevStep","startRecording","info","stopRecording","renderStepContent","step","children","fileName","_jsxFileName","lineNumber","columnNumber","progressDot","current","direction","items","type","onClick","style","display","flexDirection","alignItems","marginTop","width","marginBottom","alignSelf","Item","to","map","disabled","_c","$RefreshReg$"],"sources":["D:/Project/UC_Trains_Voice/react-demo/src/gavt/GavtCali.tsx"],"sourcesContent":["import React, { useState } from 'react';\r\nimport { Divider, Steps, Breadcrumb, Button, message } from 'antd';\r\nimport { Link } from 'react-router-dom';\r\n\r\nconst stepsTitles = [\r\n  'Instruction',\r\n  'Before You Start',\r\n  'Record Your Voice',\r\n  'Complete'\r\n];\r\n\r\nconst stepsDescriptions = [\r\n    `This module will record your production of different vowel sounds so we can provide resonance targets customized to your voice. \r\n    If you do not want to complete this procedure right now, or if you experience any technical difficulty, you can use resonance targets derived from a published reference sample of cis women or men (under the “Reference Targets” tab). \r\n    It should take around five minutes to complete the customization process.`,\r\n    `To measure your resonance for a vowel, we want you to sustain JUST the vowel sound for about two seconds. (We will give you a key word to identify the vowel, but you should produce only the vowel sound, not the whole word.) Try to produce the vowel in a way that feels natural and comfortable to you – we will use our measurements from this production as a baseline for any changes in resonance. \r\n    Everyone's vowels will be a bit different depending on their dialect or language background. That’s OK!\r\n    When you are ready to produce the vowel, click “start” and sustain the vowel for about two seconds, then click “stop.”\r\n    `,\r\n    'Follow the steps to record your voice.',\r\n    'Review and complete the calibration.'\r\n];\r\n\r\nconst recordingSteps = [\r\n    { title: '“ee” like in “seed” ', description: 'Click “start” and pronounce the vowel for 2 seconds, then click “stop”.' },\r\n    { title: '“ih” like in “hid” ', description: 'Click “start” and pronounce the vowel for 2 seconds, then click “stop”.' },\r\n    { title: '“eh” like in “head” ', description: 'Click “start” and pronounce the vowel for 2 seconds, then click “stop”.' }\r\n];\r\n\r\nconst GavtCali: React.FC = () => {\r\n  const [currentStep, setCurrentStep] = useState(0);\r\n  const [isRecording, setIsRecording] = useState(false);\r\n\r\n\r\n  const nextStep = () => {\r\n    if (currentStep < stepsTitles.length - 1) {\r\n      setCurrentStep(currentStep + 1);\r\n      setIsRecording(false);\r\n    }\r\n  };\r\n\r\n  const prevStep = () => {\r\n    if (currentStep > 0) {\r\n      setCurrentStep(currentStep - 1);\r\n      setIsRecording(false);\r\n    }\r\n  };\r\n\r\n  const startRecording = () => {\r\n    setIsRecording(true);\r\n    message.info('Recording started!');\r\n  };\r\n\r\n  const stopRecording = () => {\r\n    setIsRecording(false);\r\n    message.info('Recording saved!');\r\n  };\r\n\r\n  const renderStepContent = (step: number) => {\r\n    switch(step) {\r\n      case 2:\r\n        return (\r\n          <div>\r\n            <p>Click to start, pronounce just the vowel for around 2 seconds, then click to stop</p>\r\n            <Steps progressDot current={1} direction=\"vertical\" items={[\r\n              { title: '“ee” like in “seed” ', description: 'Description with recording options.' },\r\n              { title: '“ih” like in “hid”  ', description: 'Recording in progress...' },\r\n              { title: ' “eh” like in “head”  ', description: 'Waiting for start...' }\r\n            ]} />\r\n            <Button type=\"primary\" onClick={() => message.info('Recording saved!')}>Save Recording</Button>\r\n          </div>\r\n        );\r\n      default:\r\n        return <p>{stepsDescriptions[step]}</p>;\r\n    }\r\n  };\r\n\r\n  return (\r\n    <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', marginTop: '20px', width: '80%' }}>\r\n      <Breadcrumb style={{ marginBottom: '20px', alignSelf: 'start' }}>\r\n        <Breadcrumb.Item><Link to=\"/gavt\">Gavt Home</Link></Breadcrumb.Item>\r\n        <Breadcrumb.Item>Calibration</Breadcrumb.Item>\r\n      </Breadcrumb>\r\n      <Steps progressDot current={currentStep} items={stepsTitles.map(title => ({ title }))} />\r\n      <Divider />\r\n      {renderStepContent(currentStep)}\r\n      <div style={{ marginTop: '20px' }}>\r\n        <Button disabled={currentStep === 0} onClick={prevStep}>Previous</Button>\r\n        <Button type=\"primary\" onClick={nextStep} disabled={currentStep === stepsTitles.length - 1}>\r\n          {currentStep === stepsTitles.length - 1 ? 'Finish' : 'Next'}\r\n        </Button>\r\n      </div>\r\n    </div>\r\n  );\r\n}\r\n\r\nexport default GavtCali;\r\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,OAAO,EAAEC,KAAK,EAAEC,UAAU,EAAEC,MAAM,EAAEC,OAAO,QAAQ,MAAM;AAClE,SAASC,IAAI,QAAQ,kBAAkB;AAAC,SAAAC,MAAA,IAAAC,OAAA;AAExC,MAAMC,WAAW,GAAG,CAClB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,CACX;AAED,MAAMC,iBAAiB,GAAG,CACrB;AACL;AACA,8EAA8E,EACzE;AACL;AACA;AACA,KAAK,EACD,wCAAwC,EACxC,sCAAsC,CACzC;AAED,MAAMC,cAAc,GAAG,CACnB;EAAEC,KAAK,EAAE,sBAAsB;EAAEC,WAAW,EAAE;AAA0E,CAAC,EACzH;EAAED,KAAK,EAAE,qBAAqB;EAAEC,WAAW,EAAE;AAA0E,CAAC,EACxH;EAAED,KAAK,EAAE,sBAAsB;EAAEC,WAAW,EAAE;AAA0E,CAAC,CAC5H;AAED,MAAMC,QAAkB,GAAGA,CAAA,KAAM;EAAAC,EAAA;EAC/B,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGjB,QAAQ,CAAC,CAAC,CAAC;EACjD,MAAM,CAACkB,WAAW,EAAEC,cAAc,CAAC,GAAGnB,QAAQ,CAAC,KAAK,CAAC;EAGrD,MAAMoB,QAAQ,GAAGA,CAAA,KAAM;IACrB,IAAIJ,WAAW,GAAGP,WAAW,CAACY,MAAM,GAAG,CAAC,EAAE;MACxCJ,cAAc,CAACD,WAAW,GAAG,CAAC,CAAC;MAC/BG,cAAc,CAAC,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