"use strict";(self["webpackChunktutor_pro"]=self["webpackChunktutor_pro"]||[]).push([["626"],{1814:function(e,r,t){t.d(r,{A:()=>m});/* import */var n=t(31);/* import */var i=t(4206);/* import */var a=t(2025);/* import */var o=t(8346);/* import */var c=t(3021);/* import */var l=t(5757);/* import */var s=t(2470);/* import */var d=/*#__PURE__*/t.n(s);/* import */var u=t(9878);/* import */var v=t(4485);/* import */var p=t(7461);/* import */var h=t(7764);/* import */var f=t(6025);/* import */var g=t(1231);/* import */var b=t(2868);/* import */var A=t(2353);var x=e=>{var{styleModifier:r}=e;var{steps:t,setSteps:d}=(0,A/* .useBundleNavigator */.h)();var x=(0,c/* .useNavigate */.Zp)();var m=(0,g/* .useCurrentPath */.G)(b/* ["default"] */.A);var w=(0,o/* .useFormContext */.xW)();var Y=t.findIndex(e=>e.path===m);var I=Math.max(-1,Y-1);var k=Math.min(t.length,Y+1);var _=t[I];var M=t[k];var D=w.watch("post_title");var C=()=>{d(e=>{return e.map((e,r)=>{if(r===Y){return(0,i._)((0,n._)({},e),{isActive:false})}if(r===I){return(0,i._)((0,n._)({},e),{isActive:true})}return e})});x(_.path)};var H=()=>{d(e=>{return e.map((e,r)=>{if(r===Y){return(0,i._)((0,n._)({},e),{isActive:false})}if(r===k){return(0,i._)((0,n._)({},e),{isActive:true})}return e})});x(M.path)};return/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:[y.wrapper,r],children:[/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{when:Y>0,children:/*#__PURE__*/(0,a/* .jsx */.Y)(u/* ["default"] */.A,{variant:"tertiary",icon:/*#__PURE__*/(0,a/* .jsx */.Y)(v/* ["default"] */.A,{name:!p/* .isRTL */.V8?"chevronLeft":"chevronRight",height:24,width:24}),iconPosition:"left",size:"small",onClick:C,buttonCss:/*#__PURE__*/(0,l/* .css */.AH)("padding:",h/* .spacing["4"] */.YK["4"]," ",h/* .spacing["12"] */.YK["12"]," ",h/* .spacing["4"] */.YK["4"]," ",h/* .spacing["4"] */.YK["4"],";svg{color:",h/* .colorTokens.icon["default"] */.I6.icon["default"],";}"),disabled:I<0,children:(0,s.__)("Back","tutor-pro")})}),/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{when:Y<t.length-1&&D,children:/*#__PURE__*/(0,a/* .jsx */.Y)(u/* ["default"] */.A,{variant:"tertiary",icon:/*#__PURE__*/(0,a/* .jsx */.Y)(v/* ["default"] */.A,{name:!p/* .isRTL */.V8?"chevronRight":"chevronLeft",height:24,width:24}),iconPosition:"right",size:"small",onClick:H,buttonCss:/*#__PURE__*/(0,l/* .css */.AH)("padding:",h/* .spacing["4"] */.YK["4"]," ",h/* .spacing["4"] */.YK["4"]," ",h/* .spacing["4"] */.YK["4"]," ",h/* .spacing["12"] */.YK["12"],";svg{color:",h/* .colorTokens.icon["default"] */.I6.icon["default"],";}"),disabled:!D||k>=t.length,children:(0,s.__)("Next","tutor-pro")})})]})};/* export default */const m=x;var y={wrapper:/*#__PURE__*/(0,l/* .css */.AH)("width:100%;display:flex;justify-content:end;height:32px;align-items:center;gap:",h/* .spacing["16"] */.YK["16"],";")}},3121:function(e,r,t){// ESM COMPAT FLAG
t.r(r);// EXPORTS
t.d(r,{"default":()=>/* binding */ec});// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread.js + 1 modules
var n=t(31);// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread_props.js
var i=t(4206);// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js
var a=t(2025);// EXTERNAL MODULE: ./node_modules/.pnpm/react-hook-form@7.67.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs
var o=t(8346);// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/dist/emotion-react.esm.js
var c=t(5757);// EXTERNAL MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js
var l=t(7933);// EXTERNAL MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/legacy/useIsFetching.js
var s=t(6988);// EXTERNAL MODULE: external "wp.i18n"
var d=t(2470);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/atoms/Box.tsx
var u=t(7615);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/atoms/LoadingSpinner.tsx
var v=t(3757);// EXTERNAL MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_tagged_template_literal.js
var p=t(690);// EXTERNAL MODULE: external "React"
var h=t(1594);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/atoms/SVGIcon.tsx
var f=t(4485);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/atoms/Tooltip.tsx + 56 modules
var g=t(3909);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/atoms/Button.tsx
var b=t(9878);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/constants.ts
var A=t(7461);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/styles.ts
var x=t(7764);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/controls/Show.tsx
var m=t(6025);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/utils/style-utils.ts
var y=t(4958);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/modals/CertificatePreviewModal.tsx
var w=e=>{var{certificates:r,selectedCertificate:t,currentCertificate:n,onSelectCertificate:i,closeModal:o}=e;var[c,l]=(0,h.useState)(t);var[s,u]=(0,h.useState)(n);var v=(0,h.useRef)(null);var p=r.findIndex(e=>e.key===s.key);var x=Math.max(-1,p-1);var y=Math.min(r.length,p+1);(0,h.useEffect)(()=>{var e=e=>{if(e.key==="ArrowLeft"){Y("previous")}else if(e.key==="ArrowRight"){Y("next")}else if(e.key==="Enter"){w(s)}else if(e.key==="Escape"){o({action:"CLOSE"})}};window.addEventListener("keydown",e);return()=>{window.removeEventListener("keydown",e)};// eslint-disable-next-line react-hooks/exhaustive-deps
},[p,r]);(0,h.useEffect)(()=>{if(v.current){v.current.focus()}},[]);var w=e=>{if(e.key===c){return}i(e);l(e.key)};var Y=e=>{if(e==="previous"&&p>0){u(r[x])}else if(e==="next"&&p<r.length-1){u(r[y])}};return/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:I.container,children:[s&&/*#__PURE__*/(0,a/* .jsx */.Y)("div",{css:I.content,children:/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:I.certificateAndActions,children:[/*#__PURE__*/(0,a/* .jsx */.Y)("img",{css:I.certificate,src:s.preview_src,alt:s.name}),/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:I.actionsWrapper,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(g/* ["default"] */.A,{placement:"right",content:(0,d.__)("Close","tutor-pro"),children:/*#__PURE__*/(0,a/* .jsx */.Y)("button",{ref:v,type:"button",css:[I.actionButton,I.closeButton],onClick:()=>{o({action:"CLOSE"})},children:/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:"cross",width:40,height:40})})}),/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:s.edit_url,children:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(g/* ["default"] */.A,{placement:"right",content:(0,d.__)("Edit in Certificate Builder","tutor-pro"),children:/*#__PURE__*/(0,a/* .jsx */.Y)("button",{type:"button",css:[I.actionButton,I.editButton],onClick:()=>{window.open(e,"_blank","noopener")},children:/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:"edit",width:40,height:40})})})})]})]})}),/*#__PURE__*/(0,a/* .jsx */.Y)("div",{css:I.navigatorWrapper,children:/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:I.navigator,children:[/*#__PURE__*/(0,a/* .jsx */.Y)("button",{type:"button",css:[I.actionButton,I.navigatorButton],onClick:()=>Y("previous"),disabled:x<0,children:/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:!A/* .isRTL */.V8?"chevronLeft":"chevronRight",width:40,height:40})}),/*#__PURE__*/(0,a/* .jsx */.Y)(b/* ["default"] */.A,{variant:"primary",onClick:()=>{w(s);o({action:"CONFIRM"})},disabled:c===s.key,children:c===s.key?(0,d.__)("Selected","tutor-pro"):(0,d.__)("Select","tutor-pro")}),/*#__PURE__*/(0,a/* .jsx */.Y)("button",{type:"button",css:[I.actionButton,I.navigatorButton],onClick:()=>Y("next"),disabled:y>r.length-1,children:/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:!A/* .isRTL */.V8?"chevronRight":"chevronLeft",width:40,height:40})})]})})]})};/* export default */const Y=w;var I={container:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;height:100%;",y/* .styleUtils.display.flex */.x.display.flex("column"),";justify-content:center;align-items:center;gap:",x/* .spacing["16"] */.YK["16"],";position:relative;"),content:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.display.flex */.x.display.flex("column"),";justify-content:center;align-items:center;object-fit:contain;max-width:80vw;max-height:calc(100vh - 200px);width:100%;height:100%;"),certificateAndActions:/*#__PURE__*/(0,c/* .css */.AH)("position:relative;",y/* .styleUtils.display.flex */.x.display.flex(),";justify-content:center;align-items:center;gap:",x/* .spacing["20"] */.YK["20"],";height:100%;"),certificate:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;height:100%;object-fit:contain;"),actionsWrapper:/*#__PURE__*/(0,c/* .css */.AH)("position:absolute;top:0;right:-",x/* .spacing["56"] */.YK["56"],";bottom:0;",y/* .styleUtils.display.flex */.x.display.flex("column"),";justify-content:space-between;",x/* .Breakpoint.smallMobile */.EA.smallMobile,"{right:-",x/* .spacing["32"] */.YK["32"],";}"),actionButton:/*#__PURE__*/(0,c/* .css */.AH)("place-self:center start;",y/* .styleUtils.resetButton */.x.resetButton,";display:inline-flex;align-items:center;justify-content:center;&:focus,&:active,&:hover{background:none;}svg{color:",x/* .colorTokens.action.secondary["default"] */.I6.action.secondary["default"],";transition:color 0.3s ease-in-out;}"),closeButton:/*#__PURE__*/(0,c/* .css */.AH)("place-self:center start;"),editButton:/*#__PURE__*/(0,c/* .css */.AH)("place-self:center end;"),navigatorWrapper:/*#__PURE__*/(0,c/* .css */.AH)(),navigator:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.display.flex */.x.display.flex(),";gap:",x/* .spacing["16"] */.YK["16"],";justify-content:center;background:",x/* .colorTokens.background.white */.I6.background.white,";padding:",x/* .spacing["12"] */.YK["12"],";border-radius:",x/* .borderRadius["8"] */.Vq["8"],";"),navigatorButton:/*#__PURE__*/(0,c/* .css */.AH)("svg{color:",x/* .colorTokens.icon["default"] */.I6.icon["default"],";}:disabled{cursor:not-allowed;svg{color:",x/* .colorTokens.icon.hints */.I6.icon.hints,";}}")};// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/components/modals/Modal.tsx
var k=t(2580);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/config.ts
var _=t(4336);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/typography.ts
var M=t(983);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/controls/For.tsx
var D=t(7073);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/molecules/Tabs.tsx
var C=t(9153);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/utils/util.ts + 4 modules
var H=t(2927);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/public/images/not-found.webp
const N=t.p+"images/not-found-4fa6c9c0.webp";// CONCATENATED MODULE: ../tutor/assets/src/js/v3/public/images/not-found-2x.webp
const j=t.p+"images/not-found-2x-5f9812df.webp";// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/certificate/CertificateCard.tsx
function T(){var e=(0,p._)(["\n      [data-overlay] {\n        background: ",";\n        opacity: 0.1;\n      }\n    "]);T=function r(){return e};return e}var z=e=>{var{selectedCertificate:r="",data:t,orientation:n,onSelectCertificate:i,onPreviewCertificate:o}=e;return/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:K.wrapper({isSelected:r===t.key,isLandScape:n==="landscape"}),children:[/*#__PURE__*/(0,a/* .jsx */.Y)("div",{"data-overlay":true,onClick:()=>i(t.key),onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){i(t.key)}}}),/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:t.preview_src,fallback:/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:K.emptyCard,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:"outlineNone",width:49,height:49}),/*#__PURE__*/(0,a/* .jsx */.Y)("span",{children:(0,d.__)("None","tutor-pro")})]}),children:e=>{return/*#__PURE__*/(0,a/* .jsx */.Y)("img",{css:K.certificateImage,src:e,alt:t.name})}}),/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:t.preview_src||t.key!==r,children:/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{"data-footer-actions":true,css:K.footerWrapper,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:t.preview_src,children:/*#__PURE__*/(0,a/* .jsx */.Y)(b/* ["default"] */.A,{variant:"secondary",isOutlined:true,size:"small",onClick:()=>o(t),children:(0,d.__)("Preview","tutor-pro")})}),/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:t.key!==r,children:/*#__PURE__*/(0,a/* .jsx */.Y)(b/* ["default"] */.A,{variant:"primary",size:"small",onClick:()=>i(t.key),children:(0,d.__)("Select","tutor-pro")})})]})}),/*#__PURE__*/(0,a/* .jsx */.Y)("div",{css:K.checkIcon({isSelected:r===t.key}),children:/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:"checkFilledWhite",width:32,height:32})})]})};/* export default */const E=z;var K={wrapper:e=>{var{isSelected:r=false,isLandScape:t=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.centeredFlex */.x.centeredFlex,";background-color:",x/* .colorTokens.surface.courseBuilder */.I6.surface.courseBuilder,";max-height:",t?"154px":"217px",";min-height:",t?"154px":"217px",";height:100%;position:relative;outline:",r?"2px":"1px"," solid ",r?x/* .colorTokens.stroke.brand */.I6.stroke.brand:x/* .colorTokens.stroke["default"] */.I6.stroke["default"],";border-radius:",x/* .borderRadius.card */.Vq.card,";transition:all 0.15s ease-in-out;[data-overlay]{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:",x/* .borderRadius.card */.Vq.card,";}",r&&(0,c/* .css */.AH)(T(),x/* .colorTokens.brand.blue */.I6.brand.blue),"    &:hover,&:focus-within{border-color:",x/* .colorTokens.stroke.brand */.I6.stroke.brand,";[data-footer-actions]{opacity:1;}[data-overlay]{background:",x/* .colorTokens.brand.blue */.I6.brand.blue,";opacity:0.1;}}")},emptyCard:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.flexCenter */.x.flexCenter(),";flex-direction:column;height:100%;width:100%;gap:",x/* .spacing["8"] */.YK["8"],";",M/* .typography.caption */.I.caption("medium"),";svg{color:",x/* .colorTokens.color.black["20"] */.I6.color.black["20"],";}"),certificateImage:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;height:100%;object-fit:contain;border-radius:",x/* .borderRadius.card */.Vq.card,";"),footerWrapper:/*#__PURE__*/(0,c/* .css */.AH)("opacity:0;position:absolute;left:0px;right:0px;bottom:0px;",y/* .styleUtils.flexCenter */.x.flexCenter(),";align-items:center;gap:",x/* .spacing["4"] */.YK["4"],";padding-block:",x/* .spacing["8"] */.YK["8"],";background:",x/* .colorTokens.bg.white */.I6.bg.white,";border-bottom-left-radius:",x/* .borderRadius.card */.Vq.card,";border-bottom-right-radius:",x/* .borderRadius.card */.Vq.card,";"),checkIcon:e=>{var{isSelected:r=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)("opacity:",r?1:0,";position:absolute;top:-14px;right:-14px;border-bottom-left-radius:",x/* .borderRadius.card */.Vq.card,";svg{color:",x/* .colorTokens.icon.brand */.I6.icon.brand,";}")}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/public/images/pro-placeholders/certificates.webp
const O=t.p+"images/certificates-4d7368cf.webp";// CONCATENATED MODULE: ../tutor/assets/src/js/v3/public/images/pro-placeholders/certificates-2x.webp
const L=t.p+"images/certificates-2x-22b8cc4e.webp";// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/certificate/CertificateEmptyState.tsx
var F=!!_/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url;var S=()=>{if(F){return null}return/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:B.emptyState,children:[/*#__PURE__*/(0,a/* .jsx */.Y)("img",{css:B.placeholderImage,src:O,srcSet:"".concat(O," 1x, ").concat(L," 2x"),alt:(0,d.__)("Pro Placeholder","tutor-pro")}),/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:B.featureAndActionWrapper,children:[/*#__PURE__*/(0,a/* .jsx */.Y)("h5",{css:B.title,children:(0,d.__)("Award Students with Custom Certificates","tutor-pro")}),/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:B.featuresWithTitle,children:[/*#__PURE__*/(0,a/* .jsx */.Y)("div",{children:(0,d.__)("Celebrate success with personalized certificates. Recognize student achievements with unique designs that inspire and motivate students.","tutor-pro")}),/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:B.features,children:[/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:B.feature,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:"materialCheck",width:20,height:20,style:B.checkIcon}),/*#__PURE__*/(0,a/* .jsx */.Y)("span",{children:(0,d.__)("Design personalized certificates that highlight their accomplishments and boost their confidence.","tutor-pro")})]}),/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:B.feature,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:"materialCheck",width:20,height:20,style:B.checkIcon}),/*#__PURE__*/(0,a/* .jsx */.Y)("span",{children:(0,d.__)("Inspire them with a touch of credibility and recognition tailored just for them.","tutor-pro")})]})]})]})]}),/*#__PURE__*/(0,a/* .jsx */.Y)("div",{css:B.actionsButton,children:/*#__PURE__*/(0,a/* .jsx */.Y)(b/* ["default"] */.A,{as:"a",variant:"primary",icon:/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:"crown",width:24,height:24}),href:_/* ["default"].TUTOR_PRICING_PAGE */.A.TUTOR_PRICING_PAGE,target:"_blank",rel:"noreferrer",children:(0,d.__)("Get Tutor LMS Pro","tutor-pro")})})]})};/* export default */const Q=S;var B={emptyState:/*#__PURE__*/(0,c/* .css */.AH)("padding-bottom:",x/* .spacing["12"] */.YK["12"],";",y/* .styleUtils.display.flex */.x.display.flex("column"),"    gap:",x/* .spacing["20"] */.YK["20"],";"),placeholderImage:e=>{var{notFound:r}=e;return/*#__PURE__*/(0,c/* .css */.AH)("max-width:100%;width:100%;height:",r?"189px":"312px;",";object-fit:cover;object-position:center;border-radius:",x/* .borderRadius["6"] */.Vq["6"],";")},featureAndActionWrapper:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.display.flex */.x.display.flex("column"),"    align-items:center;gap:",x/* .spacing["12"] */.YK["12"],";"),title:/*#__PURE__*/(0,c/* .css */.AH)(M/* .typography.heading5 */.I.heading5("medium"),"    color:",x/* .colorTokens.text.primary */.I6.text.primary,";"),featuresWithTitle:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.display.flex */.x.display.flex("column"),"    max-width:500px;width:100%;gap:",x/* .spacing["8"] */.YK["8"],";",M/* .typography.body */.I.body("regular"),";"),features:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.display.flex */.x.display.flex("column"),"    gap:",x/* .spacing["8"] */.YK["8"],";"),feature:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.display.flex */.x.display.flex(),"    gap:",x/* .spacing["12"] */.YK["12"],";color:",x/* .colorTokens.text.title */.I6.text.title,";text-wrap:pretty;"),checkIcon:/*#__PURE__*/(0,c/* .css */.AH)("flex-shrink:0;color:",x/* .colorTokens.text.success */.I6.text.success,";"),actionsButton:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.flexCenter */.x.flexCenter(),"    margin-top:",x/* .spacing["4"] */.YK["4"],";")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/certificate/Certificate.tsx
function U(){var e=(0,p._)(["\n      grid-template-columns: 1fr;\n      place-items: center;\n    "]);U=function r(){return e};return e}var R=!!_/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url;var V=(0,H/* .isAddonEnabled */.GR)(A/* .Addons.TUTOR_CERTIFICATE */.oW.TUTOR_CERTIFICATE);var W=e=>{var{isSidebarVisible:r=true,currentCertificateKey:t,onSelect:n,certificateTemplates:i}=e;var o=i!==null&&i!==void 0?i:[];var l=o.filter(e=>e.is_default);var[s,u]=(0,h.useState)("templates");var[v,p]=(0,h.useState)("landscape");var[b,w]=(0,h.useState)(t);var{showModal:I}=(0,k/* .useModal */.h)();var _=o.some(e=>e.orientation==="landscape"&&(s==="templates"?e.is_default:!e.is_default));var H=o.some(e=>e.orientation==="portrait"&&(s==="templates"?e.is_default:!e.is_default));(0,h.useEffect)(()=>{if(o.length){if(l.length===0){u("custom_certificates")}var e=o.some(e=>e.orientation==="landscape");if(!e&&v==="landscape"){p("portrait")}}if(t==="none"){w(t);return}var r=o.find(e=>e.key===t);if(r){if(v!==r.orientation){p(r.orientation)}u(r.is_default?"templates":"custom_certificates");w(r.key)}// eslint-disable-next-line react-hooks/exhaustive-deps
},[t,o]);var T=o.filter(e=>e.orientation===v&&(s==="templates"?e===null||e===void 0?void 0:e.is_default:!(e===null||e===void 0?void 0:e.is_default)));var z=e=>{u(e);var r=o.some(r=>r.orientation==="landscape"&&(e==="templates"?r.is_default:!r.is_default));var t=o.some(r=>r.orientation==="portrait"&&(e==="templates"?r.is_default:!r.is_default));p(e=>{if(r&&t||!r&&!t){return e}return r?"landscape":"portrait"})};var K=e=>{p(e)};var O=e=>{n(e);w(e)};var L=e=>{I({component:Y,props:{certificates:o,selectedCertificate:t,currentCertificate:e,onSelectCertificate:e=>{O(e.key)}}})};var F=[...l.length?[{label:(0,d.__)("Templates","tutor-pro"),value:"templates"}]:[],{label:A/* .CURRENT_VIEWPORT.isAboveSmallMobile */.vN.isAboveSmallMobile?(0,d.__)("Custom Certificates","tutor-pro"):(0,d.__)("Certificates","tutor-pro"),value:"custom_certificates"}];return/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:R&&V,fallback:/*#__PURE__*/(0,a/* .jsx */.Y)(Q,{}),children:/*#__PURE__*/(0,a/* .jsxs */.FD)(m/* ["default"] */.A,{when:V,children:[/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:P.tabs,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(C/* ["default"] */.A,{wrapperCss:P.tabsWrapper,tabList:F,activeTab:s,onChange:z}),/*#__PURE__*/(0,a/* .jsx */.Y)("div",{css:P.orientation,children:/*#__PURE__*/(0,a/* .jsxs */.FD)(m/* ["default"] */.A,{when:_&&H,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(g/* ["default"] */.A,{delay:200,content:(0,d.__)("Landscape","tutor-pro"),children:/*#__PURE__*/(0,a/* .jsx */.Y)("button",{type:"button",css:[y/* .styleUtils.resetButton */.x.resetButton,P.orientationButton({isActive:v==="landscape"})],onClick:()=>K("landscape"),children:/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:v==="landscape"?"landscapeFilled":"landscape",width:32,height:32})})}),/*#__PURE__*/(0,a/* .jsx */.Y)(g/* ["default"] */.A,{delay:200,content:(0,d.__)("Portrait","tutor-pro"),children:/*#__PURE__*/(0,a/* .jsx */.Y)("button",{type:"button",css:[y/* .styleUtils.resetButton */.x.resetButton,P.orientationButton({isActive:v==="portrait"})],onClick:()=>K("portrait"),children:/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:v==="portrait"?"portraitFilled":"portrait",width:32,height:32})})})]})})]}),/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:P.certificateWrapper({hasCertificates:T.length>0,isSidebarVisible:r}),children:[/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:o.length&&(l.length===0||s==="templates"),children:/*#__PURE__*/(0,a/* .jsx */.Y)(E,{selectedCertificate:b,onSelectCertificate:O,onPreviewCertificate:e=>L(e),data:{key:"none",name:(0,d.__)("None","tutor-pro"),preview_src:"",background_src:"",orientation:"landscape",url:""},orientation:v})}),/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:T.length>0,fallback:/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:P.emptyState,children:[/*#__PURE__*/(0,a/* .jsx */.Y)("img",{css:P.placeholderImage({notFound:true}),src:N,srcSet:"".concat(N," 1x, ").concat(j," 2x"),alt:(0,d.__)("Not Found","tutor-pro")}),/*#__PURE__*/(0,a/* .jsx */.Y)("div",{css:P.featureAndActionWrapper,children:/*#__PURE__*/(0,a/* .jsx */.Y)("p",{css:/*#__PURE__*/(0,c/* .css */.AH)(M/* .typography.body */.I.body("medium"),"                      color:",x/* .colorTokens.text.subdued */.I6.text.subdued,";"),children:(0,d.__)("You didn’t create any certificate yet!","tutor-pro")})})]}),children:/*#__PURE__*/(0,a/* .jsx */.Y)(D/* ["default"] */.A,{each:T,children:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(E,{selectedCertificate:b,onSelectCertificate:O,data:e,orientation:v,onPreviewCertificate:L},e.key)})})]})]})})};/* export default */const q=W;var P={tabs:/*#__PURE__*/(0,c/* .css */.AH)("position:relative;"),tabsWrapper:/*#__PURE__*/(0,c/* .css */.AH)("button{min-width:auto;}"),certificateWrapper:e=>{var{hasCertificates:r,isSidebarVisible:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)("display:grid;grid-template-columns:repeat(",t?3:4,",1fr);gap:",x/* .spacing["16"] */.YK["16"],";padding-top:",x/* .spacing["12"] */.YK["12"],";",!r&&(0,c/* .css */.AH)(U())," ",x/* .Breakpoint.smallMobile */.EA.smallMobile,"{grid-template-columns:1fr 1fr;}")},orientation:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.display.flex */.x.display.flex(),"    gap:",x/* .spacing["8"] */.YK["8"],";position:absolute;height:32px;right:0;bottom:",x/* .spacing["4"] */.YK["4"],";"),orientationButton:e=>{var{isActive:r}=e;return/*#__PURE__*/(0,c/* .css */.AH)("display:inline-flex;color:",r?x/* .colorTokens.icon.brand */.I6.icon.brand:x/* .colorTokens.icon["default"] */.I6.icon["default"],";border-radius:",x/* .borderRadius["4"] */.Vq["4"],";&:focus,&:active,&:hover{background:none;color:",r?x/* .colorTokens.icon.brand */.I6.icon.brand:x/* .colorTokens.icon["default"] */.I6.icon["default"],";}&:focus-visible{outline:2px solid ",x/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}")},emptyState:/*#__PURE__*/(0,c/* .css */.AH)("padding-block:",x/* .spacing["16"] */.YK["16"]," ",x/* .spacing["12"] */.YK["12"],";",y/* .styleUtils.display.flex */.x.display.flex("column"),"    gap:",x/* .spacing["20"] */.YK["20"],";"),placeholderImage:e=>{var{notFound:r}=e;return/*#__PURE__*/(0,c/* .css */.AH)("max-width:100%;width:100%;height:",r?"189px":"312px;",";object-fit:cover;object-position:center;border-radius:",x/* .borderRadius["6"] */.Vq["6"],";")},featureAndActionWrapper:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.display.flex */.x.display.flex("column"),"    align-items:center;gap:",x/* .spacing["12"] */.YK["12"],";"),actionsButton:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.flexCenter */.x.flexCenter(),"    margin-top:",x/* .spacing["4"] */.YK["4"],";")};// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormCheckbox.tsx
var G=t(7581);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormTextareaInput.tsx
var Z=t(2162);// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_tagged_template_literal.js
var J=t(599);// EXTERNAL MODULE: ./node_modules/.pnpm/react-router@6.30.1_react@18.3.1/node_modules/react-router/dist/index.js
var X=t(3021);// CONCATENATED MODULE: ./addons/course-bundle/assets/src/js/bundle-builder/components/layouts/CanvasHead.tsx
function $(){var e=(0,J._)(["\n      transform: rotate(180deg);\n    "]);$=function r(){return e};return e}var ee=e=>{var{title:r,backUrl:t,rightButton:n,isExternalUrl:i}=e;var o=(0,X/* .useNavigate */.Zp)();var c=()=>{if(t){if(i){window.location.href=t;return}o(t)}else{o(-1)}};return/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:et.wrapper,children:[/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:et.left,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:t,children:/*#__PURE__*/(0,a/* .jsx */.Y)(b/* ["default"] */.A,{isIconOnly:true,size:"small",variant:"text","aria-label":(0,d.__)("Back","tutor-pro"),buttonCss:et.button({isRTL:A/* .isRTL */.V8}),onClick:c,icon:/*#__PURE__*/(0,a/* .jsx */.Y)(f/* ["default"] */.A,{name:"back",width:32,height:32})})}),/*#__PURE__*/(0,a/* .jsx */.Y)("h6",{css:et.title,children:r})]}),n]})};/* export default */const er=ee;var et={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;"),left:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:",x/* .spacing["16"] */.YK["16"],";"),button:e=>{var{isRTL:r}=e;return/*#__PURE__*/(0,c/* .css */.AH)("padding:0;border-radius:",x/* .borderRadius["2"] */.Vq["2"],";",r&&(0,c/* .css */.AH)($()))},title:/*#__PURE__*/(0,c/* .css */.AH)(M/* .typography.heading6 */.I.heading6("medium"),";")};// EXTERNAL MODULE: ./addons/course-bundle/assets/src/js/bundle-builder/components/layouts/Navigator.tsx
var en=t(1814);// EXTERNAL MODULE: ./addons/course-bundle/assets/src/js/bundle-builder/utils/utils.ts
var ei=t(81);// CONCATENATED MODULE: ./addons/course-bundle/assets/src/js/bundle-builder/pages/Additional.tsx
var ea=(0,ei/* .getBundleId */.w)();var eo=()=>{var e=(0,o/* .useFormContext */.xW)();var r=(0,l/* .useQueryClient */.jE)();var t=r.getQueryData(["CourseBundle",ea]);var c=(0,s/* .useIsFetching */.C)({queryKey:["CourseBundle",ea]});var p=!!_/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url;var h=(0,H/* .isAddonEnabled */.GR)(A/* .Addons.TUTOR_CERTIFICATE */.oW.TUTOR_CERTIFICATE);var f=e.watch("tutor_course_certificate_template");var g;var b=(g=t===null||t===void 0?void 0:t.course_certificates_templates)!==null&&g!==void 0?g:[];var x=r=>{e.setValue("tutor_course_certificate_template",r)};return/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:el.wrapper,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(er,{title:(0,d.__)("Additional","tutor-pro"),backUrl:"/"}),/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:y/* .styleUtils.fieldGroups */.x.fieldGroups(24),children:[/*#__PURE__*/(0,a/* .jsx */.Y)("div",{css:el.additionalFields,children:/*#__PURE__*/(0,a/* .jsx */.Y)(o/* .Controller */.xI,{name:"course_benefits",control:e.control,render:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(Z/* ["default"] */.A,(0,i._)((0,n._)({},e),{label:(0,d.__)("What Will I Learn?","tutor-pro"),placeholder:(0,d.__)("Define the key takeaways from this course (list one benefit per line)","tutor-pro"),rows:3,enableResize:true}))})}),/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:h,children:/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:y/* .styleUtils.fieldGroups */.x.fieldGroups(12),children:[/*#__PURE__*/(0,a/* .jsxs */.FD)(u/* .Box */.az,{bordered:true,children:[/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:el.titleAndSub,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(u/* .BoxTitle */.IF,{children:(0,d.__)("Certificate","tutor-pro")}),/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:p&&(0,H/* .isAddonEnabled */.GR)(A/* .Addons.TUTOR_CERTIFICATE */.oW.TUTOR_CERTIFICATE),children:/*#__PURE__*/(0,a/* .jsx */.Y)(u/* .BoxSubtitle */.M6,{children:(0,d.__)("Select a certificate to award your learners.","tutor-pro")})})]}),/*#__PURE__*/(0,a/* .jsx */.Y)(m/* ["default"] */.A,{when:!c,fallback:/*#__PURE__*/(0,a/* .jsx */.Y)(v/* .LoadingSection */.YE,{}),children:/*#__PURE__*/(0,a/* .jsx */.Y)(q,{currentCertificateKey:f,onSelect:x,certificateTemplates:b})})]}),/*#__PURE__*/(0,a/* .jsx */.Y)(o/* .Controller */.xI,{name:"certificate_for_individual_courses",control:e.control,render:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(G/* ["default"] */.A,(0,i._)((0,n._)({},e),{label:(0,d.__)("Provide certificates for individual courses.","tutor-pro")}))})]})}),/*#__PURE__*/(0,a/* .jsx */.Y)(en/* ["default"] */.A,{})]})]})};/* export default */const ec=eo;var el={wrapper:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.fieldGroups */.x.fieldGroups(32),";width:100%;max-width:750px;margin:",x/* .spacing["32"] */.YK["32"]," auto;"),additionalFields:/*#__PURE__*/(0,c/* .css */.AH)("padding:",x/* .spacing["12"] */.YK["12"]," ",x/* .spacing["20"] */.YK["20"]," ",x/* .spacing["20"] */.YK["20"],";background-color:",x/* .colorTokens.background.white */.I6.background.white,";border:1px solid ",x/* .colorTokens.stroke.divider */.I6.stroke.divider,";border-radius:",x/* .borderRadius.card */.Vq.card,";"),titleAndSub:/*#__PURE__*/(0,c/* .css */.AH)(y/* .styleUtils.display.flex */.x.display.flex("column"),"    gap:",x/* .spacing["4"] */.YK["4"],";margin-bottom:",x/* .spacing["20"] */.YK["20"],";")}},7615:function(e,r,t){t.d(r,{IF:()=>g,M6:()=>b,az:()=>f});/* import */var n=t(690);/* import */var i=t(2025);/* import */var a=t(1594);/* import */var o=/*#__PURE__*/t.n(a);/* import */var c=t(5757);/* import */var l=t(7764);/* import */var s=t(983);/* import */var d=t(6025);/* import */var u=t(4485);/* import */var v=t(3909);function p(){var e=(0,n._)(["\n      border: 1px solid ",";\n    "]);p=function r(){return e};return e}function h(){var e=(0,n._)(["\n      border-bottom: 1px solid ",";\n      padding: "," ",";\n    "]);h=function r(){return e};return e}var f=/*#__PURE__*/o().forwardRef((e,r)=>{var{children:t,className:n,bordered:a=false,wrapperCss:o}=e;return/*#__PURE__*/(0,i/* .jsx */.Y)("div",{ref:r,className:n,css:[A.wrapper(a),o],children:t})});f.displayName="Box";var g=/*#__PURE__*/o().forwardRef((e,r)=>{var{children:t,className:n,separator:a=false,tooltip:o}=e;return/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{ref:r,className:n,css:A.title(a),children:[/*#__PURE__*/(0,i/* .jsx */.Y)("span",{children:t}),/*#__PURE__*/(0,i/* .jsx */.Y)(d/* ["default"] */.A,{when:o,children:/*#__PURE__*/(0,i/* .jsx */.Y)(v/* ["default"] */.A,{content:o,children:/*#__PURE__*/(0,i/* .jsx */.Y)(u/* ["default"] */.A,{name:"info",width:20,height:20})})})]})});g.displayName="BoxTitle";var b=/*#__PURE__*/o().forwardRef((e,r)=>{var{children:t,className:n}=e;return/*#__PURE__*/(0,i/* .jsx */.Y)("div",{ref:r,className:n,css:A.subtitle,children:/*#__PURE__*/(0,i/* .jsx */.Y)("span",{children:t})})});b.displayName="BoxSubtitle";var A={wrapper:e=>/*#__PURE__*/(0,c/* .css */.AH)("background-color:",l/* .colorTokens.background.white */.I6.background.white,";border-radius:",l/* .borderRadius["8"] */.Vq["8"],";padding:",l/* .spacing["12"] */.YK["12"]," ",l/* .spacing["20"] */.YK["20"]," ",l/* .spacing["20"] */.YK["20"],";",e&&(0,c/* .css */.AH)(p(),l/* .colorTokens.stroke.divider */.I6.stroke.divider)),title:e=>/*#__PURE__*/(0,c/* .css */.AH)(s/* .typography.body */.I.body("medium"),";color:",l/* .colorTokens.text.title */.I6.text.title,";display:flex;gap:",l/* .spacing["4"] */.YK["4"],";align-items:center;",e&&(0,c/* .css */.AH)(h(),l/* .colorTokens.stroke.divider */.I6.stroke.divider,l/* .spacing["12"] */.YK["12"],l/* .spacing["20"] */.YK["20"]),"    & > div{height:20px;svg{color:",l/* .colorTokens.icon.hints */.I6.icon.hints,";}}& > span{display:inline-block;}"),subtitle:/*#__PURE__*/(0,c/* .css */.AH)(s/* .typography.caption */.I.caption(),";color:",l/* .colorTokens.text.hints */.I6.text.hints,";")}},6721:function(e,r,t){t.d(r,{A:()=>y});/* import */var n=t(33);/* import */var i=t(1303);/* import */var a=t(690);/* import */var o=t(2025);/* import */var c=t(1594);/* import */var l=/*#__PURE__*/t.n(c);/* import */var s=t(5757);/* import */var d=t(7764);/* import */var u=t(983);/* import */var v=t(2927);function p(){var e=(0,a._)(["\n      cursor: not-allowed;\n    "]);p=function r(){return e};return e}function h(){var e=(0,a._)(["\n      color: ",";\n    "]);h=function r(){return e};return e}function f(){var e=(0,a._)(["\n        margin-right: ",";\n      "]);f=function r(){return e};return e}function g(){var e=(0,a._)(["\n        background-color: ",";\n      "]);g=function r(){return e};return e}function b(){var e=(0,a._)(["\n      & + span::before {\n        background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='2' fill='none'%3E%3Crect width='10' height='1.5' y='.25' fill='%23fff' rx='.75'/%3E%3C/svg%3E\");\n        background-repeat: no-repeat;\n        background-size: 10px;\n        background-position: center center;\n        background-color: ",";\n        border: 0.5px solid ",";\n      }\n    "]);b=function r(){return e};return e}function A(){var e=(0,a._)(["\n      & + span {\n        cursor: not-allowed;\n\n        &::before {\n          border-color: ",";\n        }\n      }\n    "]);A=function r(){return e};return e}var x=/*#__PURE__*/l().forwardRef((e,r)=>{var{id:t=(0,v/* .nanoid */.Ak)(),name:a,labelCss:c,inputCss:s,label:d="",checked:u,value:p,disabled:h=false,onChange:f,onBlur:g,isIndeterminate:b=false}=e;var A=e=>{f===null||f===void 0?void 0:f(!b?e.target.checked:true,e)};var x=e=>{if(typeof e==="string"){return e}if(typeof e==="number"||typeof e==="boolean"||e===null){return String(e)}if(e===undefined){return""}if(/*#__PURE__*/l().isValidElement(e)){var r;var t=(r=e.props)===null||r===void 0?void 0:r.children;if(typeof t==="string"){return t}if(Array.isArray(t)){return t.map(e=>typeof e==="string"?e:"").filter(Boolean).join(" ")}}return""};return/*#__PURE__*/(0,o/* .jsxs */.FD)("label",{htmlFor:t,css:[m.container({disabled:h}),c],children:[/*#__PURE__*/(0,o/* .jsx */.Y)("input",(0,i._)((0,n._)({},e),{ref:r,id:t,name:a,type:"checkbox",value:p,checked:!!u,disabled:h,"aria-invalid":e["aria-invalid"],onChange:A,onBlur:g,css:[s,m.checkbox({label:!!d,isIndeterminate:b,disabled:h})]})),/*#__PURE__*/(0,o/* .jsx */.Y)("span",{}),/*#__PURE__*/(0,o/* .jsx */.Y)("span",{css:[m.label({isDisabled:h}),c],title:x(d),children:d})]})});var m={container:e=>{var{disabled:r=false}=e;return/*#__PURE__*/(0,s/* .css */.AH)("position:relative;display:flex;align-items:center;cursor:pointer;user-select:none;color:",d/* .colorTokens.text.title */.I6.text.title,";",r&&(0,s/* .css */.AH)(p()))},label:e=>{var{isDisabled:r=false}=e;return/*#__PURE__*/(0,s/* .css */.AH)(u/* .typography.caption */.I.caption(),";color:",d/* .colorTokens.text.title */.I6.text.title,";",r&&(0,s/* .css */.AH)(h(),d/* .colorTokens.text.disable */.I6.text.disable))},checkbox:e=>{var{label:r,isIndeterminate:t,disabled:n}=e;return/*#__PURE__*/(0,s/* .css */.AH)("position:absolute;display:none !important;opacity:0 !important;height:0;width:0;& + span{position:relative;cursor:pointer;display:inline-flex;align-items:center;",r&&(0,s/* .css */.AH)(f(),d/* .spacing["10"] */.YK["10"]),"}& + span::before{content:'';background-color:",d/* .colorTokens.background.white */.I6.background.white,";border:1px solid ",d/* .colorTokens.stroke["default"] */.I6.stroke["default"],";border-radius:3px;width:20px;height:20px;}&:checked + span::before{background-image:url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0wLjE2NTM0NCA0Ljg5OTQ2QzAuMTEzMjM1IDQuODQ0OTcgMC4wNzE3MzQ2IDQuNzgxMTUgMC4wNDI5ODg3IDQuNzExM0MtMC4wMTQzMjk2IDQuNTU1NjQgLTAuMDE0MzI5NiA0LjM4NDQ5IDAuMDQyOTg4NyA0LjIyODg0QzAuMDcxMTU0OSA0LjE1ODY4IDAuMTEyNzIzIDQuMDk0NzUgMC4xNjUzNDQgNC4wNDA2OEwxLjAzMzgyIDMuMjAzNkMxLjA4NDkzIDMuMTQzNCAxLjE0ODkgMy4wOTU1NyAxLjIyMDk2IDMuMDYzNjlDMS4yOTAzMiAzLjAzMjEzIDEuMzY1NTQgMy4wMTU2OSAxLjQ0MTY3IDMuMDE1NDRDMS41MjQxOCAzLjAxMzgzIDEuNjA2MDUgMy4wMzAyOSAxLjY4MTU5IDMuMDYzNjlDMS43NTYyNiAzLjA5NzA3IDEuODIzODYgMy4xNDQ1NyAxLjg4MDcxIDMuMjAzNkw0LjUwMDU1IDUuODQyNjhMMTAuMTI0MSAwLjE4ODIwNUMxMC4xNzk0IDAuMTI5NTQ0IDEwLjI0NTQgMC4wODIwNTQyIDEwLjMxODQgMC4wNDgyOTA4QzEwLjM5NDEgMC4wMTU0NjYxIDEwLjQ3NTkgLTAuMDAwOTcyMDU3IDEwLjU1ODMgNC40NDIyOGUtMDVDMTAuNjM1NyAwLjAwMDQ3NTMxOCAxMC43MTIxIDAuMDE3NDc5NSAxMC43ODI0IDAuMDQ5OTI0MkMxMC44NTI3IDAuMDgyMzY4OSAxMC45MTU0IDAuMTI5NTA5IDEwLjk2NjIgMC4xODgyMDVMMTEuODM0NyAxLjAzNzM0QzExLjg4NzMgMS4wOTE0MiAxMS45Mjg4IDEuMTU1MzQgMTEuOTU3IDEuMjI1NUMxMi4wMTQzIDEuMzgxMTYgMTIuMDE0MyAxLjU1MjMxIDExLjk1NyAxLjcwNzk2QzExLjkyODMgMS43Nzc4MSAxMS44ODY4IDEuODQxNjMgMTEuODM0NyAxLjg5NjEzTDQuOTIyOCA4LjgwOTgyQzQuODcxMjkgOC44NzAyMSA0LjgwNzQ3IDguOTE4NzUgNC43MzU2NiA4Ljk1MjE1QzQuNTgyMDIgOS4wMTU5NSA0LjQwOTQ5IDkuMDE1OTUgNC4yNTU4NCA4Ljk1MjE1QzQuMTg0MDQgOC45MTg3NSA0LjEyMDIyIDguODcwMjEgNC4wNjg3MSA4LjgwOTgyTDAuMTY1MzQ0IDQuODk5NDZaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K');background-repeat:no-repeat;background-size:10px 10px;background-position:center center;border-color:transparent;background-color:",d/* .colorTokens.icon.brand */.I6.icon.brand,";border-radius:",d/* .borderRadius["4"] */.Vq["4"],";",n&&(0,s/* .css */.AH)(g(),d/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"]),"}",t&&(0,s/* .css */.AH)(b(),d/* .colorTokens.brand.blue */.I6.brand.blue,d/* .colorTokens.stroke.white */.I6.stroke.white)," ",n&&(0,s/* .css */.AH)(A(),d/* .colorTokens.stroke.disable */.I6.stroke.disable),"    &:focus-visible{& + span{border-radius:",d/* .borderRadius["2"] */.Vq["2"],";outline:2px solid ",d/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}}")}};/* export default */const y=x},7581:function(e,r,t){t.d(r,{A:()=>f});/* import */var n=t(33);/* import */var i=t(1303);/* import */var a=t(2473);/* import */var o=t(2025);/* import */var c=t(5757);/* import */var l=t(6721);/* import */var s=t(4485);/* import */var d=t(3909);/* import */var u=t(7764);/* import */var v=t(983);/* import */var p=t(2147);var h=e=>{var{field:r,fieldState:t,disabled:c,value:u,onChange:v,label:h,description:f,helpText:b,isHidden:A,labelCss:x}=e;return/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{field:r,fieldState:t,isHidden:A,children:e=>{var{css:t}=e,p=(0,a._)(e,["css"]);return/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:g.wrapper,children:[/*#__PURE__*/(0,o/* .jsx */.Y)(l/* ["default"] */.A,(0,i._)((0,n._)({},r,p),{inputCss:t,labelCss:x,value:u,disabled:c,checked:r.value,label:h,onChange:()=>{r.onChange(!r.value);if(v){v(!r.value)}}})),b&&/*#__PURE__*/(0,o/* .jsx */.Y)(d/* ["default"] */.A,{content:b,placement:"top",allowHTML:true,children:/*#__PURE__*/(0,o/* .jsx */.Y)(s/* ["default"] */.A,{name:"info",width:20,height:20})})]}),f&&/*#__PURE__*/(0,o/* .jsx */.Y)("p",{css:g.description,children:f})]})}})};/* export default */const f=h;var g={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:",u/* .spacing["6"] */.YK["6"],";& > div{display:flex;color:",u/* .colorTokens.icon["default"] */.I6.icon["default"],";}"),description:/*#__PURE__*/(0,c/* .css */.AH)(v/* .typography.small */.I.small(),"    color:",u/* .colorTokens.text.hints */.I6.text.hints,";padding-left:30px;margin-top:",u/* .spacing["6"] */.YK["6"],";")}},2147:function(e,r,t){t.d(r,{A:()=>j});/* import */var n=t(690);/* import */var i=t(2025);/* import */var a=t(5757);/* import */var o=t(2470);/* import */var c=/*#__PURE__*/t.n(o);/* import */var l=t(3757);/* import */var s=t(4485);/* import */var d=t(3909);/* import */var u=t(7764);/* import */var v=t(983);/* import */var p=t(6025);/* import */var h=t(4958);/* import */var f=t(8638);/* import */var g=t(2927);function b(){var e=(0,n._)(["\n      opacity: 0.5;\n    "]);b=function r(){return e};return e}function A(){var e=(0,n._)(["\n      display: none;\n    "]);A=function r(){return e};return e}function x(){var e=(0,n._)(["\n      flex-direction: row;\n      align-items: center;\n      justify-content: space-between;\n      gap: ",";\n    "]);x=function r(){return e};return e}function m(){var e=(0,n._)(["\n        padding: 0 "," 0 ",";\n      "]);m=function r(){return e};return e}function y(){var e=(0,n._)(["\n        border-radius: 0;\n        border: none;\n        box-shadow: none;\n      "]);y=function r(){return e};return e}function w(){var e=(0,n._)(["\n        border-color: transparent;\n      "]);w=function r(){return e};return e}function Y(){var e=(0,n._)(["\n          outline-color: ",";\n          background-color: ",";\n        "]);Y=function r(){return e};return e}function I(){var e=(0,n._)(["\n          border-color: ",";\n        "]);I=function r(){return e};return e}function k(){var e=(0,n._)(["\n          color: ",";\n        "]);k=function r(){return e};return e}function _(){var e=(0,n._)(["\n        border-color: ",";\n        background-color: ",";\n      "]);_=function r(){return e};return e}function M(){var e=(0,n._)(["\n        border-color: ",";\n        background-color: ",";\n      "]);M=function r(){return e};return e}function D(){var e=(0,n._)(["\n      justify-content: end;\n    "]);D=function r(){return e};return e}function C(){var e=(0,n._)(["\n      color: ",";\n    "]);C=function r(){return e};return e}function H(){var e=(0,n._)(["\n      ",";\n    "]);H=function r(){return e};return e}var N=e=>{var{field:r,fieldState:t,children:n,disabled:a=false,readOnly:c=false,label:v,isInlineLabel:h=false,variant:b,loading:A,placeholder:x,helpText:m,isHidden:y=false,removeBorder:w=false,characterCount:Y,isSecondary:I=false,inputStyle:k,wrapperCss:_,inputContainerCss:M,onClickAiButton:D,isMagicAi:C=false,generateWithAi:H=false,replaceEntireLabel:N=false}=e;var j;var z=(0,g/* .nanoid */.Ak)();var E=[T.input({variant:b,hasFieldError:!!t.error,removeBorder:w,readOnly:c,hasHelpText:!!m,isSecondary:I,isMagicAi:C})];if((0,f/* .isDefined */.O9)(k)){E.push(k)}var K=/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:T.inputWrapper,children:[n({id:z,name:r.name,css:E,"aria-invalid":t.error?"true":"false",disabled:a,readOnly:c,placeholder:x,className:"tutor-input-field"}),A&&/*#__PURE__*/(0,i/* .jsx */.Y)("div",{css:T.loader,children:/*#__PURE__*/(0,i/* .jsx */.Y)(l/* ["default"] */.Ay,{size:20,color:u/* .colorTokens.icon["default"] */.I6.icon["default"]})})]});return/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:[T.container({disabled:a,isHidden:y}),_],"data-cy":"form-field-wrapper",children:[/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:[T.inputContainer(h),M],children:[(v||m)&&/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:T.labelContainer,children:[v&&/*#__PURE__*/(0,i/* .jsxs */.FD)("label",{htmlFor:z,css:T.label(h,N),children:[v,/*#__PURE__*/(0,i/* .jsx */.Y)(p/* ["default"] */.A,{when:H,children:/*#__PURE__*/(0,i/* .jsx */.Y)("button",{type:"button",onClick:()=>{D===null||D===void 0?void 0:D()},css:T.aiButton,children:/*#__PURE__*/(0,i/* .jsx */.Y)(s/* ["default"] */.A,{name:"magicAiColorize",width:32,height:32})})})]}),m&&!N&&/*#__PURE__*/(0,i/* .jsx */.Y)(d/* ["default"] */.A,{content:m,placement:"top",allowHTML:true,children:/*#__PURE__*/(0,i/* .jsx */.Y)(s/* ["default"] */.A,{name:"info",width:20,height:20})})]}),Y?/*#__PURE__*/(0,i/* .jsx */.Y)(d/* ["default"] */.A,{placement:"right",hideOnClick:false,content:Y.maxLimit-Y.inputCharacter>=0?Y.maxLimit-Y.inputCharacter:(0,o.__)("Limit exceeded","tutor-pro"),children:K}):K]}),((j=t.error)===null||j===void 0?void 0:j.message)&&/*#__PURE__*/(0,i/* .jsxs */.FD)("p",{css:T.errorLabel(!!t.error,h),children:[/*#__PURE__*/(0,i/* .jsx */.Y)(s/* ["default"] */.A,{style:T.alertIcon,name:"info",width:20,height:20})," ",t.error.message]})]})};/* export default */const j=N;var T={container:e=>{var{disabled:r,isHidden:t}=e;return/*#__PURE__*/(0,a/* .css */.AH)("display:flex;flex-direction:column;position:relative;background:inherit;width:100%;",r&&(0,a/* .css */.AH)(b())," ",t&&(0,a/* .css */.AH)(A()))},inputContainer:e=>/*#__PURE__*/(0,a/* .css */.AH)("display:flex;flex-direction:column;gap:",u/* .spacing["4"] */.YK["4"],";width:100%;",e&&(0,a/* .css */.AH)(x(),u/* .spacing["12"] */.YK["12"])),input:e=>/*#__PURE__*/(0,a/* .css */.AH)("&.tutor-input-field{",v/* .typography.body */.I.body("regular"),";width:100%;border-radius:",u/* .borderRadius["6"] */.Vq["6"],";border:1px solid ",u/* .colorTokens.stroke["default"] */.I6.stroke["default"],";padding:",u/* .spacing["8"] */.YK["8"]," ",u/* .spacing["16"] */.YK["16"],";color:",u/* .colorTokens.text.title */.I6.text.title,";appearance:textfield;&:not(textarea){height:40px;}",e.hasHelpText&&(0,a/* .css */.AH)(m(),u/* .spacing["32"] */.YK["32"],u/* .spacing["12"] */.YK["12"])," ",e.removeBorder&&(0,a/* .css */.AH)(y())," ",e.isSecondary&&(0,a/* .css */.AH)(w()),":focus{",h/* .styleUtils.inputFocus */.x.inputFocus,";",e.isMagicAi&&(0,a/* .css */.AH)(Y(),u/* .colorTokens.stroke.magicAi */.I6.stroke.magicAi,u/* .colorTokens.background.magicAi["8"] */.I6.background.magicAi["8"])," ",e.hasFieldError&&(0,a/* .css */.AH)(I(),u/* .colorTokens.stroke.danger */.I6.stroke.danger),"}::-webkit-outer-spin-button,::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}::placeholder{",v/* .typography.caption */.I.caption("regular"),";color:",u/* .colorTokens.text.hints */.I6.text.hints,";",e.isSecondary&&(0,a/* .css */.AH)(k(),u/* .colorTokens.text.hints */.I6.text.hints),"}",e.hasFieldError&&(0,a/* .css */.AH)(_(),u/* .colorTokens.stroke.danger */.I6.stroke.danger,u/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail)," ",e.readOnly&&(0,a/* .css */.AH)(M(),u/* .colorTokens.background.disable */.I6.background.disable,u/* .colorTokens.background.disable */.I6.background.disable),"}"),errorLabel:(e,r)=>/*#__PURE__*/(0,a/* .css */.AH)(v/* .typography.small */.I.small(),";line-height:",u/* .lineHeight["20"] */.K_["20"],";display:flex;align-items:start;margin-top:",u/* .spacing["4"] */.YK["4"],";",r&&(0,a/* .css */.AH)(D())," ",e&&(0,a/* .css */.AH)(C(),u/* .colorTokens.text.status.onHold */.I6.text.status.onHold),"    & svg{margin-right:",u/* .spacing["2"] */.YK["2"],";transform:rotate(180deg);}"),labelContainer:/*#__PURE__*/(0,a/* .css */.AH)("display:flex;align-items:center;gap:",u/* .spacing["4"] */.YK["4"],";> div{display:flex;color:",u/* .colorTokens.color.black["30"] */.I6.color.black["30"],";}"),label:(e,r)=>/*#__PURE__*/(0,a/* .css */.AH)(v/* .typography.caption */.I.caption(),";margin:0px;width:",r?"100%":"auto",";color:",u/* .colorTokens.text.title */.I6.text.title,";display:flex;align-items:center;gap:",u/* .spacing["4"] */.YK["4"],";",e&&(0,a/* .css */.AH)(H(),v/* .typography.caption */.I.caption())),aiButton:/*#__PURE__*/(0,a/* .css */.AH)(h/* .styleUtils.resetButton */.x.resetButton,";width:32px;height:32px;border-radius:",u/* .borderRadius["4"] */.Vq["4"],";display:flex;align-items:center;justify-content:center;:disabled{cursor:not-allowed;}&:focus,&:active,&:hover{background:none;}&:focus-visible{outline:2px solid ",u/* .colorTokens.stroke.brand */.I6.stroke.brand,";}"),inputWrapper:/*#__PURE__*/(0,a/* .css */.AH)("position:relative;"),loader:/*#__PURE__*/(0,a/* .css */.AH)("position:absolute;top:50%;right:",u/* .spacing["12"] */.YK["12"],";transform:translateY(-50%);display:flex;"),alertIcon:/*#__PURE__*/(0,a/* .css */.AH)("flex-shrink:0;")}},2162:function(e,r,t){t.d(r,{A:()=>A});/* import */var n=t(33);/* import */var i=t(1303);/* import */var a=t(690);/* import */var o=t(2025);/* import */var c=t(1594);/* import */var l=/*#__PURE__*/t.n(c);/* import */var s=t(5757);/* import */var d=t(7764);/* import */var u=t(983);/* import */var v=t(9586);/* import */var p=t(4958);/* import */var h=t(2147);function f(){var e=(0,a._)(["\n        resize: vertical;\n      "]);f=function r(){return e};return e}var g=6;var b=e=>{var{label:r,rows:t=g,columns:a,maxLimit:l,field:s,fieldState:d,disabled:u,readOnly:v,loading:p,placeholder:f,helpText:b,onChange:A,onKeyDown:m,isHidden:y,enableResize:w=true,isSecondary:Y=false,isMagicAi:I=false,inputCss:k,maxHeight:_,autoResize:M=false}=e;var D;var C=(D=s.value)!==null&&D!==void 0?D:"";var H=(0,c.useRef)(null);var N=undefined;if(l){N={maxLimit:l,inputCharacter:C.toString().length}}var j=()=>{if(H.current){if(_){H.current.style.maxHeight="".concat(_,"px")}H.current.style.height="auto";H.current.style.height="".concat(H.current.scrollHeight,"px")}};(0,c.useLayoutEffect)(()=>{if(M){j()}// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{label:r,field:s,fieldState:d,disabled:u,readOnly:v,loading:p,placeholder:f,helpText:b,isHidden:y,characterCount:N,isSecondary:Y,isMagicAi:I,children:e=>{return/*#__PURE__*/(0,o/* .jsx */.Y)(o/* .Fragment */.FK,{children:/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:x.container(w,k),children:/*#__PURE__*/(0,o/* .jsx */.Y)("textarea",(0,i._)((0,n._)({},s,e),{ref:e=>{s.ref(e);// @ts-ignore
H.current=e;// this is not ideal but it is the only way to set ref to the input element
},style:{maxHeight:_?"".concat(_,"px"):"none"},className:"tutor-input-field",value:C,onChange:e=>{var{value:r}=e.target;if(l&&r.trim().length>l){return}s.onChange(r);if(A){A(r)}if(M){j()}},onKeyDown:e=>{m===null||m===void 0?void 0:m(e.key)},autoComplete:"off",rows:t,cols:a}))})})}})};/* export default */const A=(0,v/* .withVisibilityControl */.M)(b);var x={container:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false,r=arguments.length>1?arguments[1]:void 0;return/*#__PURE__*/(0,s/* .css */.AH)("position:relative;display:flex;textarea{",u/* .typography.body */.I.body(),";height:auto;padding:",d/* .spacing["8"] */.YK["8"]," ",d/* .spacing["12"] */.YK["12"],";resize:none;",p/* .styleUtils.overflowYAuto */.x.overflowYAuto,";&.tutor-input-field{",r,";}",e&&(0,s/* .css */.AH)(f()),"}")}}},9586:function(e,r,t){// EXPORTS
t.d(r,{M:()=>/* binding */u});// EXTERNAL MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread.js + 1 modules
var n=t(33);// EXTERNAL MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_without_properties.js + 1 modules
var i=t(2473);// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js
var a=t(2025);// EXTERNAL MODULE: external "React"
var o=t(1594);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/config.ts
var c=t(4336);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/utils/types.ts
var l=t(8638);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hooks/useVisibilityControl.tsx
/**
 * Custom hook to control the visibility of fields based on the provided visibility key and context.
 *
 * @param {string} visibilityKey - The key used to determine the visibility of the field.
 * @returns {boolean} - Returns true if the field should be visible, false otherwise.
 */var s=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return(0,o.useMemo)(()=>{var r;// If no visibility key provided, always show the field
if(!(0,l/* .isDefined */.O9)(e)){return true}var[t,n]=(e===null||e===void 0?void 0:e.split("."))||[];if(!(0,l/* .isDefined */.O9)(t)||!(0,l/* .isDefined */.O9)(n)){return true}var i=c/* .tutorConfig */.P===null||c/* .tutorConfig */.P===void 0?void 0:(r=c/* .tutorConfig.visibility_control */.P.visibility_control)===null||r===void 0?void 0:r[t];if(!i){return true}var a=c/* .tutorConfig.current_user.roles */.P.current_user.roles;var o=a.includes("administrator")?"admin":"instructor";var s="".concat(n,"_").concat(o);if(!Object.keys(i).includes(s)){return true}return i[s]==="on"},[e])};/* export default */const d=s;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hoc/withVisibilityControl.tsx
var u=e=>{return r=>{var{visibilityKey:t}=r,o=(0,i._)(r,["visibilityKey"]);var c=d(t);if(!c){return null}// @ts-ignore
return/*#__PURE__*/(0,a/* .jsx */.Y)(e,(0,n._)({},o))}}},9153:function(e,r,t){t.d(r,{A:()=>f});/* import */var n=t(690);/* import */var i=t(2025);/* import */var a=t(1594);/* import */var o=/*#__PURE__*/t.n(a);/* import */var c=t(5757);/* import */var l=t(7764);/* import */var s=t(4958);function d(){var e=(0,n._)(["\n      flex-direction: column;\n      align-items: start;\n      box-shadow: none;\n    "]);d=function r(){return e};return e}function u(){var e=(0,n._)(["\n      width: 3px;\n      height: ","px;\n      top: ","px;\n      bottom: auto;\n      border-radius: 0 "," "," 0;\n    "]);u=function r(){return e};return e}function v(){var e=(0,n._)(["\n      width: 100%;\n      border-bottom: 1px solid ",";\n      justify-content: flex-start;\n\n      &:hover,\n      &:focus,\n      &:active {\n        border-bottom: 1px solid ",";\n      }\n    "]);v=function r(){return e};return e}function p(){var e=(0,n._)(["\n      &,\n      &:hover,\n      &:focus,\n      &:active {\n        background-color: ",";\n        color: ",";\n      }\n\n      & > span {\n        color: ",";\n      }\n\n      & > svg {\n        color: ",";\n      }\n    "]);p=function r(){return e};return e}var h=e=>{var{activeTab:r,onChange:t,tabList:n,orientation:o="horizontal",disabled:c=false,wrapperCss:l}=e;var s=(0,a.useRef)(n.map(()=>/*#__PURE__*/(0,a.createRef)()));var[d,u]=(0,a.useState)();(0,a.useEffect)(()=>{var e=n.reduce((e,r,t)=>{var n,i,a,o;var c=s.current[t];var l={width:((n=c.current)===null||n===void 0?void 0:n.offsetWidth)||0,height:((i=c.current)===null||i===void 0?void 0:i.offsetHeight)||0,left:((a=c.current)===null||a===void 0?void 0:a.offsetLeft)||0,top:((o=c.current)===null||o===void 0?void 0:o.offsetTop)||0};e[r.value]=l;return e},{});u(e)},[n]);return/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:g.container,children:[/*#__PURE__*/(0,i/* .jsx */.Y)("div",{css:[g.wrapper(o),l],role:"tablist",children:n.map((e,n)=>{return/*#__PURE__*/(0,i/* .jsxs */.FD)("button",{onClick:()=>{t(e.value)},css:g.tabButton({isActive:r===e.value,orientation:o}),disabled:c||e.disabled,type:"button",role:"tab","aria-selected":r===e.value?"true":"false",ref:s.current[n],children:[e.icon,e.label,e.count!==undefined&&/*#__PURE__*/(0,i/* .jsxs */.FD)("span",{children:[" (",e.count<10&&e.count>0?"0".concat(e.count):e.count,")"]}),e.activeBadge&&/*#__PURE__*/(0,i/* .jsx */.Y)("span",{css:g.activeBadge})]},n)})}),/*#__PURE__*/(0,i/* .jsx */.Y)("span",{css:g.indicator((d===null||d===void 0?void 0:d[r])||{width:0,height:0,left:0,top:0},o)})]})};/* export default */const f=h;var g={container:/*#__PURE__*/(0,c/* .css */.AH)("position:relative;width:100%;"),wrapper:e=>/*#__PURE__*/(0,c/* .css */.AH)("width:100%;display:flex;justify-items:left;align-items:center;flex-wrap:wrap;box-shadow:",l/* .shadow.tabs */.r7.tabs,";",e==="vertical"&&(0,c/* .css */.AH)(d())),indicator:(e,r)=>/*#__PURE__*/(0,c/* .css */.AH)("width:",e.width,"px;height:3px;position:absolute;left:",e.left,"px;bottom:0;background:",l/* .colorTokens.brand.blue */.I6.brand.blue,";border-radius:",l/* .borderRadius["4"] */.Vq["4"]," ",l/* .borderRadius["4"] */.Vq["4"]," 0 0;transition:all 0.3s cubic-bezier(0.4,0,0.2,1) 0ms;:dir(rtl){left:auto;right:",e.left,"px;}",r==="vertical"&&(0,c/* .css */.AH)(u(),e.height,e.top,l/* .borderRadius["4"] */.Vq["4"],l/* .borderRadius["4"] */.Vq["4"])),tabButton:e=>{var{isActive:r,orientation:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)(s/* .styleUtils.resetButton */.x.resetButton,";font-size:",l/* .fontSize["15"] */.J["15"],";line-height:",l/* .lineHeight["20"] */.K_["20"],";display:flex;justify-content:center;align-items:center;gap:",l/* .spacing["6"] */.YK["6"],";padding:",l/* .spacing["12"] */.YK["12"]," ",l/* .spacing["20"] */.YK["20"],";color:",l/* .colorTokens.text.subdued */.I6.text.subdued,";min-width:130px;position:relative;transition:color 0.3s ease-in-out;border-radius:0px;&:hover,&:focus,&:active{background-color:transparent;color:",l/* .colorTokens.text.subdued */.I6.text.subdued,";box-shadow:none;}& > svg{color:",l/* .colorTokens.icon["default"] */.I6.icon["default"],";}",t==="vertical"&&(0,c/* .css */.AH)(v(),l/* .colorTokens.stroke.border */.I6.stroke.border,l/* .colorTokens.stroke.border */.I6.stroke.border)," ",r&&(0,c/* .css */.AH)(p(),l/* .colorTokens.background.white */.I6.background.white,l/* .colorTokens.text.primary */.I6.text.primary,l/* .colorTokens.text.subdued */.I6.text.subdued,l/* .colorTokens.icon.brand */.I6.icon.brand),"    &:disabled{color:",l/* .colorTokens.text.disable */.I6.text.disable,";&::before{background:",l/* .colorTokens.text.disable */.I6.text.disable,";}}&:focus-visible{outline:2px solid ",l/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:-2px;border-radius:",l/* .borderRadius["4"] */.Vq["4"],";}")},activeBadge:/*#__PURE__*/(0,c/* .css */.AH)("display:inline-block;height:8px;width:8px;border-radius:",l/* .borderRadius.circle */.Vq.circle,";background-color:",l/* .colorTokens.color.success["80"] */.I6.color.success["80"],";")}},6988:function(e,r,t){t.d(r,{C:()=>o});/* import */var n=t(1594);/* import */var i=t(3276);/* import */var a=t(7933);"use client";// src/useIsFetching.ts
function o(e,r){const t=(0,a/* .useQueryClient */.jE)(r);const o=t.getQueryCache();return n.useSyncExternalStore(n.useCallback(e=>o.subscribe(i/* .notifyManager.batchCalls */.j.batchCalls(e)),[o]),()=>t.isFetching(e),()=>t.isFetching(e))}//# sourceMappingURL=useIsFetching.js.map
}}]);