@clickview/lite 0.41.1-rc.0 → 0.41.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +2 -2
- package/dist/css/{lite-app-11f61d7670.css → lite-app-03feae8437.css} +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{1895-863b69f0d5-lite.chunk.js → 1895-c1c2bfa87c-lite.chunk.js} +2 -2
- package/dist/scripts/{3095-263663f4ca-lite.chunk.js → 3095-719e391940-lite.chunk.js} +2 -2
- package/dist/scripts/{537-0c5b3ae67e-lite.chunk.js → 537-9c745fb245-lite.chunk.js} +2 -2
- package/dist/scripts/{6489-c313e9c8f2-lite.chunk.js → 6489-c7502eb99e-lite.chunk.js} +2 -2
- package/dist/scripts/{6741-714df05335-lite.chunk.js → 6741-4561f4439d-lite.chunk.js} +1 -1
- package/dist/scripts/{7402-74f2a70ef1-lite.chunk.js → 7402-226034510f-lite.chunk.js} +2 -2
- package/dist/scripts/{7670-ac16764513-lite.chunk.js → 7670-648e6e8945-lite.chunk.js} +2 -2
- package/dist/scripts/{8199-bb53edb5f1-lite.chunk.js → 8199-ccbefb8009-lite.chunk.js} +2 -2
- package/dist/scripts/{841-ae809f851d-lite.chunk.js → 841-47328371aa-lite.chunk.js} +2 -2
- package/dist/scripts/{9173-dc7f87cdf5-lite.chunk.js → 9173-05803bdaca-lite.chunk.js} +2 -2
- package/dist/scripts/9367-d555730bbb-lite.chunk.js +1 -0
- package/dist/scripts/{9918-cc79995e75-lite.chunk.js → 9918-6eae7cefdf-lite.chunk.js} +2 -2
- package/dist/scripts/bundle-5771c11f65.min.js +2 -0
- package/package.json +1 -1
- package/dist/scripts/9367-8563a20575-lite.chunk.js +0 -1
- package/dist/scripts/bundle-3bccb10d43.min.js +0 -2
- /package/dist/scripts/{1437-2f15dbca57-lite.chunk.js → 1437-065c3e71ee-lite.chunk.js} +0 -0
- /package/dist/scripts/{1895-863b69f0d5-lite.chunk.js.LICENSE.txt → 1895-c1c2bfa87c-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3095-263663f4ca-lite.chunk.js.LICENSE.txt → 3095-719e391940-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{537-0c5b3ae67e-lite.chunk.js.LICENSE.txt → 537-9c745fb245-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6489-c313e9c8f2-lite.chunk.js.LICENSE.txt → 6489-c7502eb99e-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6741-714df05335-lite.chunk.js.LICENSE.txt → 6741-4561f4439d-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7402-74f2a70ef1-lite.chunk.js.LICENSE.txt → 7402-226034510f-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7670-ac16764513-lite.chunk.js.LICENSE.txt → 7670-648e6e8945-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8199-bb53edb5f1-lite.chunk.js.LICENSE.txt → 8199-ccbefb8009-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{841-ae809f851d-lite.chunk.js.LICENSE.txt → 841-47328371aa-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9173-dc7f87cdf5-lite.chunk.js.LICENSE.txt → 9173-05803bdaca-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9918-cc79995e75-lite.chunk.js.LICENSE.txt → 9918-6eae7cefdf-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-3bccb10d43.min.js.LICENSE.txt → bundle-5771c11f65.min.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 6741-
|
|
1
|
+
/*! For license information please see 6741-4561f4439d-lite.chunk.js.LICENSE.txt */
|
|
2
2
|
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[6741],{3278:(e,t,n)=>{n.d(t,{z:()=>p});var r=n(32735),a=n(39202),i=n(23481),o=n(65858),c=n(38502),l=n(83345),u=n(73582);const s={pillTab:"bMJM0"};var d="discover.header";function p(e){var t,n,p,f,m,h;if(!e.type)return r.createElement(r.Fragment,null);if(e.type===u.Yv.Learner||e.hasStudentExperience)return r.createElement("div",{className:"py-3"},r.createElement("h1",{className:"h2 mb-0"},r.createElement(l.x,{namespace:d,phrase:"heading"})));var v=[{name:i.T.getPhrase(d,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:i.T.getPhrase(d,"forYou"),url:a.C$.getHref(null===(n=e.appLinks)||void 0===n?void 0:n.forYou)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}},{name:i.T.getPhrase(d,"whatsNew"),appLink:null===(p=e.appLinks)||void 0===p?void 0:p.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:i.T.getPhrase(d,"whatsNew"),url:a.C$.getHref(null===(f=e.appLinks)||void 0===f?void 0:f.whatsNew)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}}];return e.showCalendar&&v.push({name:i.T.getPhrase(d,"calendar"),appLink:null===(m=e.appLinks)||void 0===m?void 0:m.calendar,active:"calendar"===e.active,analyticsData:{name:i.T.getPhrase(d,"calendar"),url:a.C$.getHref(null===(h=e.appLinks)||void 0===h?void 0:h.calendar)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}}),r.createElement("div",{className:"py-3 text-center"},r.createElement(c.r,{tabs:v,className:s.pillTab}))}},38502:(e,t,n)=>{n.d(t,{r:()=>u});var r=n(32735),a=n(49985),i=n(36848),o=n(18559),c=n(11607),l=n(87432);function u(e){var t;return r.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},r.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(l.Z.pillTabSelector)},e.tabs.map((function(e){return r.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?r.createElement(i.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(l.Z.pillItem)},e.name,"number"==typeof e.count&&r.createElement("div",{className:"ps-2"},r.createElement(o.C,{type:o.g.Count,data:e.count}))):r.createElement(c.L,{className:"".concat(l.Z.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&a.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&r.createElement("div",{className:"ps-2"},r.createElement(o.C,{type:o.g.Count,data:e.count}))))}))))}},16741:(e,t,n)=>{n.r(t),n.d(t,{CuratedDiscoverView:()=>K});var r=n(32735),a=n(23481),i=n(57900),o=n(20354),c=n(2948),l=n(49985),u=n(65858),s=n(75896),d=n(3278),p=n(12275),f=n(16714),m=n(22902),h=n(73582),v=n(21366),y=n(23232),g=n(83345),b=n(76177),w=n(35223),L="subjects.discoverDashboardEmptyState",E=a.T.encloseNamespace(L);function S(e){var t,n,i=(null===(t=e.dashboard)||void 0===t?void 0:t.status)===h.GL.Archived;return r.createElement(y.u,null,r.createElement(y.u.Image,{src:e.imageUrl,altText:E("info")}),r.createElement(y.u.Heading,null,r.createElement(g.x,{namespace:L,phrase:"heading"})),r.createElement(y.u.Info,null,r.createElement(g.x,{namespace:L,phrase:"info"})),r.createElement(b.u,{title:i?a.T.getPhrase(L,"archivedCtaTooltip"):"",spanHack:!0},r.createElement(y.u.Cta,{text:a.T.getPhrase(L,"add"),appLink:null===(n=e.addWidgetApplink)||void 0===n?void 0:n.call(e),className:"btn btn-dark",icon:w.vn.Plus,disabled:i})))}function T(e){var t,n,a=s.m.sortBy(null===(t=e.dashboard)||void 0===t?void 0:t.widgets,"index"),i=(0,(0,m.T)().hasPermissions)(f.C.StudentExperience);function o(t,n,r){var a=v.S.getWidgetParams(n,r,v.S.getDashboardTargetType(e.dashboard));return e.getWidgetContentRequest(t,a,r,e.presentation)}var c=e.isReadonly&&!(null==a?void 0:a.length);return r.createElement(r.Fragment,null,r.createElement(d.z,{type:null===(n=e.dashboard)||void 0===n?void 0:n.userType,appLinks:e.headerAppLinks,hasStudentExperience:e.hasStudentExperience,showCalendar:e.showCalendar,active:"forYou"}),a.map((function(t,n){return r.createElement(p.L,{key:t.id,id:t.id,imageCdnUrl:e.imageCdnUrl,resourceThumbnailFallbackImageUrl:e.resourceThumbnailFallbackImageUrl,getContentRequest:o,audiences:e.audiences,name:t.name,description:t.description,templateId:t.templateId,metadata:t.metadata,presentation:e.presentation,setFavourite:e.setFavourite,canFavourite:e.canFavourite,appLinks:e.widgetAppLinks,isScrollToTargetWidget:(null==e?void 0:e.scrollToWidgetId)===t.id,widgetTypeId:t.widgetId,hasPermissions:e.hasPermissions,hasLocalPermissions:e.hasLocalPermissions,onSubmitFeedback:e.onSubmitFeedback,updatePreferences:e.updatePreferences,yearGroups:e.yearGroups,curriculum:e.curriculum,getCurriculumLinksRequest:e.getCurriculumLinksRequest,lazyLoad:e.lazyLoad,dashboardTarget:h.ku.Discover,widgetIndex:n,showVideoGuidance:!i,jobTitle:e.jobTitle,isPreviewing:e.isReadonly,imageUrls:e.imageUrls,settings:e.settings})})),c&&r.createElement(S,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.widgetAppLinks.widgetWizard}))}var A=n(38143),C=n(72639),k=n(21750),O=n(39151),N=n(1666),x=n(80889),I=n(61699),D=n(31949),P=n(79612),F=n(37802),U=n(69454),_=n(73417),j=n(99742),R=n(52333),B=n(82817),H=n(27638),M=n(85369),W=n(23737),G=n(56017),V=n(33192),Y=n(27051);function Z(e){return Z="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},Z(e)}function q(){q=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),c=new x(r||[]);return a(o,"_invoke",{value:C(e,n,c)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",f="suspendedYield",m="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,o,(function(){return this}));var L=Object.getPrototypeOf,E=L&&L(L(I([])));E&&E!==n&&r.call(E,o)&&(w=E);var S=b.prototype=y.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(a,i,o,c){var l=d(e[a],e,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Z(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):t.resolve(s).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function C(t,n,r){var a=p;return function(i,o){if(a===m)throw new Error("Generator is already running");if(a===h){if("throw"===i)throw o;return{value:e,done:!0}}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var l=k(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===p)throw a=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=m;var u=d(t,n,r);if("normal"===u.type){if(a=r.done?h:f,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(a=h,r.method="throw",r.arg=u.arg)}}}function k(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=d(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(Z(t)+" is not iterable")}return g.prototype=b,a(S,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},T(A.prototype),u(A.prototype,c,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,a,i){void 0===i&&(i=Promise);var o=new A(s(e,n,r,a),i);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},T(S),u(S,l,"Generator"),u(S,o,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;N(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function z(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 $=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function c(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,c)}l((r=r.apply(e,t||[])).next())}))},J=a.T.encloseNamespace("dashboard.dashboard");function K(e){var t,n,a,s,d,p,v,y=o.a.useBasicFetch(O.L.config()),g=o.a.useBasicFetch(D.N.currentUser()),b=o.a.useBasicFetch((null===(t=g.data)||void 0===t?void 0:t.isAuthenticated)&&D.N.user(g.data.id)),w=(0,m.T)(),L=w.hasLocalPermissions,E=w.hasPermissions,S=o.a.useBasicFetch(L(f.E.ManageDiscoverPreferences)&&g.data&&N.h.customer(g.data.customerId)),Z=o.a.useBasicFetch((null===(n=g.data)||void 0===n?void 0:n.isAuthenticated)&&N.h.yearGroups(g.data.customerId)),K=(0,B.M)().activeCurriculum,Q=(0,W.y)({targetType:h.ku.Discover,queryParams:e.queryParams,presentationSlug:e.presentationSlug}),X=Q.dashboard,ee=Q.presentation,te=Q.audiences,ne=o.a.useGetFetchAsync(),re=(0,F.r)(null),ae=(0,H.u)(u.LZ.Dashboard),ie=ae.setFavourite,oe=ae.canFavourite,ce=(p=(0,c.D)(A.g.AUDIENCE_FILTER,void 0,{storage:i.Z1.SessionStorage}),v=1,function(e){if(Array.isArray(e))return e}(p)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return c}}(p,v)||function(e,t){if(e){if("string"==typeof e)return z(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)?z(e,t):void 0}}(p,v)||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.")}())[0],le=(0,Y.E)(U.T.getAudienceParams(ce)),ue=function(e){return+C.p[null==e?void 0:e.learningLevel]===C.p.Level_1?"VariantOne":"VariantTwo"}(ee);(0,P.M)(G.C.getDiscoverMetadata({content:ee,phraseContext:{phraseHandler:J,titlePhrase:"pageTitle".concat(ue),descriptionPhrase:"pageDescription".concat(ue)},canonicalLink:V.f.getCanonicalLink(),allowIndexing:V.f.allowIndexing(),hrefLang:V.f.getStaticRouteHrefLang(null==ee?void 0:ee.learningLevel,le.discover)}));var se=(0,M.N)().showCalendar;return r.createElement("div",{className:"bg-white px-4"},r.createElement(_.T,null),r.createElement(T,{currentUser:g.data,dashboard:X.data,widgetAppLinks:le,headerAppLinks:(0,Y.u)(),presentation:ee,curriculum:K,getCurriculumLinksRequest:function(e){return k.x.curriculumLinks(e,null==K?void 0:K.id)},imageCdnUrl:y.data.imageCdnUrl,resourceThumbnailFallbackImageUrl:j.W.Fallbacks.RESOURCE_THUMBNAIL,getWidgetContentRequest:x._.dashboardWidgetContent,setFavourite:ie,audiences:te.data,canFavourite:oe,updatePreferences:function(e,t,n,r){return $(this,void 0,void 0,q().mark((function t(){var a,i;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=r.filter((function(e){return!e.hidden&&n.find((function(t){return t.id===e.id})).hidden})),i=r.filter((function(e){return!!e.hidden&&!n.find((function(t){return t.id===e.id})).hidden})),!(null==a?void 0:a.length)){t.next=5;break}return t.next=5,ne(I.o.followSubjects(a.map((function(e){return e.id}))));case 5:if(!(null==i?void 0:i.length)){t.next=8;break}return t.next=8,ne(I.o.unfollowSubjects(i.map((function(e){return e.id}))));case 8:return t.abrupt("return",ne(x._.updateWidgetPreferences(e,r.map((function(e){return{id:e.id,index:e.index}})),g.data)));case 9:case"end":return t.stop()}}),t)})))},hasPermissions:E,hasLocalPermissions:L,onSubmitFeedback:E(f.C.CanSubmitFeedback)&&function(e){var t=ne(R.n.sendDiscoverFooterFeedback(e,g.data,S.data,ee,X.data,E(f.C.StudentExperience)));return l.k.logUserAction({feedbackType:e.type,content:e.content,presentationId:ee.id,dashboardId:X.data.id},{actionType:u.Vw.Submit,location:u.LZ.DiscoverFooter,entity:u.py.Feedback,workflowPhase:u.eu.Complete}),t},hasStudentExperience:E(f.C.StudentExperience),yearGroups:Z.data,lazyLoad:!V.f.isBot(),showCalendar:se,jobTitle:null===(d=null===(s=null===(a=b.data)||void 0===a?void 0:a.userProfile)||void 0===s?void 0:s.metadata)||void 0===d?void 0:d.jobTitle,imageUrls:{onboardingAdminBackgroundFull:j.W.OnboardingV2.Widget.ADMIN_BACKGROUND_FULL,onboardingAdminBackground:j.W.OnboardingV2.Widget.ADMIN_BACKGROUND,onboardingTeacherBackground:j.W.OnboardingV2.Widget.TEACHER_BACKGROUND},settings:re}))}},27051:(e,t,n)=>{n.d(t,{E:()=>f,u:()=>m});var r=n(75896),a=n(28400),i=n(17475),o=n(183),c=n(67753),l=n(14070),u=n(97291),s=n(67963),d=n(82431),p="classification-latest-releases";function f(e){return{classification:function(t){return{application:u.O.SUBJECT,action:l.e.Subjects.CLASSIFICATION,args:[null==t?void 0:t.id,a.m.slugify(null==t?void 0:t.name)],params:e||{}}},classificationTopics:function(){return{application:u.O.SUBJECT,action:l.e.Subjects.CLASSIFICATION_TOPICS,params:e||{}}},videoType:function(e,t){return c.W.getAppLink(e,{context:o.Q.Widget,contextId:t})},series:d.j.getSeriesAppLink,subText:function(e){return d.j.getSeriesAppLink(e.series)},playlist:function(e){return{application:u.O.PLAYLISTS,action:l.e.Playlists.PLAYLIST,args:[e.id,a.m.slugify(e.name)]}},latestReleases:function(){return{application:u.O.CONTENT_UPDATES,action:l.e.ContentUpdates.CONTENT_UPDATES}},allTopics:function(e){return{application:u.O.SUBJECT,action:l.e.Subjects.CLASSIFICATION_ALL,params:{presentationId:e}}},classificationLatestReleases:function(e){return e.id===p?{application:u.O.CONTENT_UPDATES,action:l.e.ContentUpdates.CONTENT_UPDATES}:{application:u.O.CONTENT_UPDATES,action:l.e.ContentUpdates.CLASSIFICATION_UPDATE,args:[e.id,a.m.slugify(e.name)]}},widgetVideoList:function(e,t){return{application:u.O.DASHBOARD,action:l.e.Dashboard.DASHBOARD,args:[e,a.m.slugify(t)]}},watchHistory:function(){return{application:u.O.WATCH_HISTORY,action:l.e.WatchHistory.HOME}},rating:function(e,t){return{application:u.O.SEARCH,action:l.e.Search.HOME,params:{moviesAndTv:!0,rating:i.S.getFrontendParamValue([r.m.first(t),e])}}},company:function(e){return{application:u.O.MOVIES_AND_TV,action:l.e.MoviesAndTv.COMPANY_DASHBOARD,args:[e.id,a.m.slugify(e.name)]}},discover:function(){return{application:u.O.DASHBOARD,action:l.e.Dashboard.HOME}},calendar:function(){return{application:u.O.CALENDAR,action:l.e.Calendar.CALENDAR}},calendarMonth:function(e,t){var n={application:u.O.CALENDAR,action:l.e.Calendar.CALENDAR_MONTH,args:[e.toLowerCase()]};return t&&(n.params={year:t}),n},onboardingStep:function(e){return(0,s.u)()[e]},onboardingAppLinks:function(){return(0,s.u)()}}}function m(){return{forYou:{application:u.O.DASHBOARD,action:l.e.Dashboard.HOME},whatsNew:{application:u.O.CONTENT_UPDATES,action:l.e.ContentUpdates.CONTENT_UPDATES},calendar:{application:u.O.CALENDAR,action:l.e.Calendar.CALENDAR}}}},73417:(e,t,n)=>{n.d(t,{T:()=>s});var r=n(32735),a=n(11607),i=n(83914),o=n(83345),c=n(87348),l=n(35223),u="shared.upgradeFeedbackBanner";function s(){var e=(0,c.Q)(),t=e.showFeedbackBanner,n=e.dismissFeedbackBanner;return t?r.createElement("div",{className:"alert bg-light-blue p-2 rounded text-info fw-semibold d-flex justify-content-between align-items-center"},r.createElement(o.x,{namespace:u,phrase:"message",options:{url:"https://www.clickvieweducation.com/en-au/blog/product/exchange-tv-new-look"}}),r.createElement(a.L,{onClick:n},r.createElement(i.x,{svgName:l.vn.Close,className:"ms-2 svg-container"}))):r.createElement(r.Fragment,null)}},52333:(e,t,n)=>{n.d(t,{n:()=>c});var r=n(99940),a=n(19808),i=n(86613);function o(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 c={sendDiscoverFooterFeedback:function(e,t,n,r,a,i){var o=e.content.split("\n").join("<br />");return l("Discover Footer Feedback","\n <b>Type:</b> ".concat("positive"===e.type?"Positive":"Negative","\n <br />\n <b>Location:</b> Discover Footer\n <br />\n <b>Presentation:</b> ").concat(r.description," (ID: ").concat(r.id,")\n <br />\n <b>Dashboard:</b> ").concat(a.name," (ID: ").concat(a.id,")\n <br />\n ").concat(u(t,n,i),"\n <br />\n <b>Feedback:</b>\n <br />\n ").concat(o,"\n "),t,["discover",i?"student":"staff"])},sendTopicFooterFeedback:function(e,t,n,r,a,i,o){var c=e.content.split("\n").join("<br />");return l("Topic Footer Feedback","\n <b>Type:</b> ".concat("positive"===e.type?"Positive":"Negative","\n <br />\n <b>Location:</b> Topic Footer\n <br />\n <b>Presentation:</b> ").concat(r.description," (ID: ").concat(r.id,")\n <br />\n <b>Classification:</b> ").concat(a.name," (ID: ").concat(a.id,")\n <br />\n <b>Dashboard:</b> ").concat(i.name," (ID: ").concat(i.id,")\n <br />\n ").concat(u(t,n,o),"\n <br />\n <b>Feedback:</b>\n <br />\n ").concat(c,"\n "),t,["topics",o?"student":"staff"])}};function l(e,t,n,c){var l,u=["new product","in product feedback"].concat(function(e){if(Array.isArray(e))return o(e)}(l=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}(l)||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.")}());n.role===i.i.Admin&&u.push("administrator");var s=function(e){switch(e){case a.b.AU:return"au";case a.b.NZ:return"nz";case a.b.UK:return"uk";case a.b.US:return"us"}}(n.instanceRegion);return s&&u.push(s),{url:"/api/productboard/notes",key:"productboard:feedback",data:{title:e,content:t,user:{email:n.emailVerified?n.email:""},tags:u},type:r.k.POST}}function u(e,t,n){return"\n <b>User:</b>\n <br />\n <li>ID: ".concat(e.id,"</li>\n <li>Username: ").concat(e.username,"</li>\n <li>Email: ").concat(e.email,"</li>\n <li>User Type / Role: ").concat(function(e,t){return t?"Learner":e.role===i.i.Admin?"Admin":"Staff"}(e,n),"</li>\n <li>Customer ID: ").concat(e.customerId,"</li>\n <li>CVC ID: ").concat(t.crmId,"</li>\n <li>Customer Name: ").concat(t.name,"</li>\n <li>Instance Region: ").concat(e.instanceRegion,"</li>\n <li>Content Region: ").concat(e.contentRegion,"</li>\n ")}},85369:(e,t,n)=>{n.d(t,{N:()=>y});var r=n(32735),a=n(35242),i=n(20354),o=n(27022),c=n(72639),l=n(31949),u=n(37802),s=n(10144),d=n(86698);function p(e){return p="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},p(e)}function f(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){var r,a,i,o,c=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}(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 m(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 h(e,t,n){var r;return r=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==p(r)?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=h(h(h(h(h(h({},o.t.AU,[c.p.Level_1]),o.t.US,[c.p.Level_1]),o.t.UK,[c.p.Level_1]),o.t.SCOT,[c.p.Level_1]),o.t.NZ,[]),o.t.GLOBAL,[]);function y(){var e,t=(0,u.r)(null),n=t.hasSpecialEventCalendar,o=t.isLoadingSettings,c=(0,d.y)({redirectOnError:!0}).activePresentation,p=i.a.useBasicFetch(l.N.currentUser()),m=v[null===(e=p.data)||void 0===e?void 0:e.contentRegion],h=s.i.getMappedPresentationLevel(null==c?void 0:c.learningLevel),y=!(null==m?void 0:m.find((function(e){return e.toString()===(null==h?void 0:h.toString())}))),g=!o&&!n,b=f(r.useState(!g&&!y),2),w=b[0],L=b[1],E=f(r.useState(o||!(null==c?void 0:c.id)),2),S=E[0],T=E[1];return r.useEffect((function(){g||y?L(!1):S||L(!0),T(o||!(null==c?void 0:c.id))}),[n,null==c?void 0:c.id,S]),a.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:w,isLoading:S}}},87432:(e,t,n)=>{n.d(t,{Z:()=>r});const r={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 7402-
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7402],{75919:(t,e,n)=>{n.d(e,{N:()=>a});var r=n(32735);const o={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function a(t){return r.createElement("div",{className:(e="d-flex align-items-center text-center position-relative w-100 ".concat(o.imageContainer),"center"===t.contentPosition&&(e+=" px-5 justify-content-center"),"right"===t.contentPosition&&(e+=" me-n5 justify-content-end"),e)},!!t.annotationUrl&&r.createElement("div",{className:function(){var e=o.annotation;switch(t.annotationPosition){case"top-left":e+=" ".concat(o.above," ").concat(o.left);break;case"top-right":e+=" ".concat(o.above," ").concat(o.right);break;case"bottom-left":e+=" ".concat(o.below," ").concat(o.left);break;case"bottom-right":e+=" ".concat(o.below," ").concat(o.right)}return t.annotationClassName&&(e+=" ".concat(t.annotationClassName)),e}()},r.createElement("img",{className:"img-fluid",src:t.annotationUrl})),t.children,"right"===t.contentPosition&&r.createElement("div",{className:o.divider}));var e}a.defaultProps={contentPosition:"center"}},64934:(t,e,n)=>{n.r(e),n.d(e,{OnboardingWelcomeVideoView:()=>R});var r=n(32735),o=n(20354),a=n(65858),i=n(30439),c=n(83914),l=n(83345),u=n(60051),s=n(39151),d=n(47812),f=n(31949),h=n(1575),p=n(79967),v=n(35223),y=n(99742),m=n(75359),g=n(12058),b=n(40695),w=n(75919),x=n(57245);const E={playerContainer:"w7_Oy",fallback:"xcBuH"};function I(t){return r.createElement("div",{className:"".concat(E.playerContainer," w-100")},t.hasDataLoaded?r.createElement(x._,{config:t.config,video:t.video,currentUser:t.currentUser,shareLink:t.shareLink,viewKey:t.viewKey,onReady:t.onReady,allowPip:!1,allowCreateClip:!1}):r.createElement("div",{className:"".concat(E.fallback," w-100 h-100 bg-light rounded-3 overflow-hidden")}))}var k=n(73190),L=n(90815),C=n(19808),N={getWelcomeVideo:function(t,e){return t?t.primaryUrl.includes("staging")?{videoId:"43032783",shareId:"DBoRLj"}:e.instanceRegion===C.b.US?{videoId:"79456220",shareId:"bzK5LG"}:{videoId:"78694940",shareId:"DNBPmD"}:null}};const O={annotation:"cEpOT",headingContainer:"hPvDP",buttonContainer:"ORgxa",icon:"BogCL",skipButton:"uaLaz",replayContainer:"d1Nj9",playerContainer:"pHDzd",infoContainer:"lmbyg"};function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function P(){P=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new V(r||[]);return o(i,"_invoke",{value:C(t,n,c)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var f="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(_([])));E&&E!==n&&r.call(E,i)&&(w=E);var I=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(o,a,i,c){var l=d(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==j(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return n("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function C(e,n,r){var o=f;return function(a,i){if(o===p)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=N(c,r);if(l){if(l===y)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=d(e,n,r);if("normal"===u.type){if(o=r.done?v:h,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=v,r.method="throw",r.arg=u.arg)}}}function N(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=d(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function V(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(j(e)+" is not iterable")}return g.prototype=b,o(I,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(I),t},e.awrap=function(t){return{__await:t}},k(L.prototype),u(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new L(s(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(I),u(I,l,"Generator"),u(I,i,(function(){return this})),u(I,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=_,V.prototype={constructor:V,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return V(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(t,e):void 0}}(t,e)||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 V(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var _=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{l(r.next(t))}catch(t){a(t)}}function c(t){try{l(r.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}l((r=r.apply(t,e||[])).next())}))},B="onboarding.welcomeVideo";function R(){var t=(0,k.Q)(),e=t.completeStepAsync,n=t.onSaveError,x=(0,L.H)().logEvent,E=o.a.useBasicFetch(s.L.config()),C=o.a.useBasicFetch(f.N.currentUser()),j=N.getWelcomeVideo(E.data,C.data),V=r.useRef(),R=o.a.useBasicFetch(j&&h.R.sharedVideo(j.videoId,j.shareId)),F=o.a.useBasicFetch(i.o.getShareObject(j.shareId)),T=o.a.useBasicFetch(d.k.createViewKey(j.shareId,u.f.Share)),U=S(r.useState(!1),2),A=U[0],G=U[1],z=S(r.useState(!1),2),D=z[0],W=z[1],H=S(r.useState(!1),2),K=H[0],M=H[1],Y=(0,p.k)();function Q(){return _(this,void 0,void 0,P().mark((function t(){return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e();case 3:t.next=9;break;case 5:return t.prev=5,t.t0=t.catch(0),n(),t.abrupt("return",Promise.reject());case 9:case"end":return t.stop()}}),t,null,[[0,5]])})))}function Z(t){V.current=t,t.isPaused()||W(!0);var e=function(){var e=t.currentTime();e!==t.duration()||A?e!==t.duration()&&A&&G(!1):G(!0),K||Math.floor(t.duration()-e)<=20&&!K&&M(!0)},n=function(){D||W(!0),x(a.Vw.Click,a.Ix.PlayVideo,{videoId:j.videoId,shareId:j.shareId})},r=function(){x(a.Vw.Click,a.Ix.PauseVideo,{videoId:j.videoId,shareId:j.shareId})},o=function(){x(a.Vw.Complete,a.Ix.FinishVideo,{videoId:j.videoId,shareId:j.shareId})};t.on("timeupdate",e),t.on("play",n),t.on("pause",r),t.on("ended",o),t.one("dispose",(function(){t.off("timeupdate",e),t.off("play",n),t.off("pause",r),t.off("ended",o)}))}var X=R.data&&C.hasCompleted&&E.hasCompleted&&F.hasCompleted&&T.hasCompleted,$=Y.lg||Y.xl||Y.xxl;return r.createElement(b.z,{namespace:B},r.createElement(b.z.Left,{className:"bg-dark-blue d-flex justify-content-center flex-column"},$&&r.createElement(w.N,{annotationUrl:y.W.OnboardingV2.WelcomeVideo.HIT_PLAY,annotationPosition:"bottom-right",annotationClassName:"pe-5 ".concat(O.annotation)},r.createElement(I,{hasDataLoaded:X,config:E.data,video:R.data,currentUser:C.data,shareLink:F.data,viewKey:T.data,onReady:Z}))),r.createElement(b.z.Right,{hasCustomButtons:!0},r.createElement(m.W,{className:O.headingContainer},r.createElement(l.x,{phrase:"heading"})),!$&&r.createElement(I,{hasDataLoaded:X,config:E.data,video:R.data,currentUser:C.data,shareLink:F.data,viewKey:T.data,onReady:Z}),r.createElement(g.X,{className:O.infoContainer},r.createElement(l.x,{phrase:"watchVideo"})),A&&r.createElement("div",{className:"position-absolute ".concat(O.replayContainer)},r.createElement("button",{className:"btn btn-link text-info text-decoration-none btn-lg ".concat(O.replayButton),onClick:function(){var t,e;x(a.Vw.Click,a.Ix.ReplayVideo,{videoId:j.videoId,shareId:j.shareId}),G(!1),null===(t=V.current)||void 0===t||t.currentTime(0),null===(e=V.current)||void 0===e||e.play()}},r.createElement(c.x,{svgName:v.vn.Retry,className:"svg-container ".concat(O.icon)}),r.createElement(l.x,{phrase:"replayVideo"}))),r.createElement("div",{className:"position-absolute ".concat(O.buttonContainer)},r.createElement("button",{className:"btn btn-link text-decoration-none btn-lg ".concat(O.skipButton),onClick:function(){x(a.Vw.Click,a.Ix.SkipVideo,{videoId:j.videoId,shareId:j.shareId}),Q()}},r.createElement(l.x,{phrase:"skipVideo"})),r.createElement("button",{className:"btn btn-dark btn-lg",onClick:D?function(){x(a.Vw.Click,a.Ix.Next,{videoId:j.videoId,shareId:j.shareId}),Q()}:function(){var t;null===(t=V.current)||void 0===t||t.play()},disabled:D&&!K},!D&&r.createElement(c.x,{svgName:v.vn.Play,className:"svg-container ".concat(O.icon)}),r.createElement(l.x,{phrase:D?"next":"playVideo"})))))}}}]);
|
|
1
|
+
/*! For license information please see 7402-226034510f-lite.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7402],{75919:(t,e,n)=>{n.d(e,{N:()=>a});var r=n(32735);const o={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function a(t){return r.createElement("div",{className:(e="d-flex align-items-center text-center position-relative w-100 ".concat(o.imageContainer),"center"===t.contentPosition&&(e+=" px-5 justify-content-center"),"right"===t.contentPosition&&(e+=" me-n5 justify-content-end"),e)},!!t.annotationUrl&&r.createElement("div",{className:function(){var e=o.annotation;switch(t.annotationPosition){case"top-left":e+=" ".concat(o.above," ").concat(o.left);break;case"top-right":e+=" ".concat(o.above," ").concat(o.right);break;case"bottom-left":e+=" ".concat(o.below," ").concat(o.left);break;case"bottom-right":e+=" ".concat(o.below," ").concat(o.right)}return t.annotationClassName&&(e+=" ".concat(t.annotationClassName)),e}()},r.createElement("img",{className:"img-fluid",src:t.annotationUrl})),t.children,"right"===t.contentPosition&&r.createElement("div",{className:o.divider}));var e}a.defaultProps={contentPosition:"center"}},64934:(t,e,n)=>{n.r(e),n.d(e,{OnboardingWelcomeVideoView:()=>R});var r=n(32735),o=n(20354),a=n(65858),i=n(30439),c=n(83914),l=n(83345),u=n(60051),s=n(39151),d=n(47812),f=n(31949),h=n(1575),p=n(79967),v=n(35223),y=n(99742),m=n(75359),g=n(12058),b=n(40695),w=n(75919),x=n(57245);const E={playerContainer:"w7_Oy",fallback:"xcBuH"};function I(t){return r.createElement("div",{className:"".concat(E.playerContainer," w-100")},t.hasDataLoaded?r.createElement(x._,{config:t.config,video:t.video,currentUser:t.currentUser,shareLink:t.shareLink,viewKey:t.viewKey,onReady:t.onReady,allowPip:!1,allowCreateClip:!1}):r.createElement("div",{className:"".concat(E.fallback," w-100 h-100 bg-light rounded-3 overflow-hidden")}))}var k=n(73190),L=n(90815),C=n(19808),N={getWelcomeVideo:function(t,e){return t?t.primaryUrl.includes("staging")?{videoId:"43032783",shareId:"DBoRLj"}:e.instanceRegion===C.b.US?{videoId:"79456220",shareId:"bzK5LG"}:{videoId:"78694940",shareId:"DNBPmD"}:null}};const O={annotation:"cEpOT",headingContainer:"hPvDP",buttonContainer:"ORgxa",icon:"BogCL",skipButton:"uaLaz",replayContainer:"d1Nj9",playerContainer:"pHDzd",infoContainer:"lmbyg"};function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function P(){P=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new V(r||[]);return o(i,"_invoke",{value:C(t,n,c)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var f="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(_([])));E&&E!==n&&r.call(E,i)&&(w=E);var I=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(o,a,i,c){var l=d(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==j(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return n("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function C(e,n,r){var o=f;return function(a,i){if(o===p)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=N(c,r);if(l){if(l===y)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=d(e,n,r);if("normal"===u.type){if(o=r.done?v:h,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=v,r.method="throw",r.arg=u.arg)}}}function N(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=d(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function V(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(j(e)+" is not iterable")}return g.prototype=b,o(I,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(I),t},e.awrap=function(t){return{__await:t}},k(L.prototype),u(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new L(s(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(I),u(I,l,"Generator"),u(I,i,(function(){return this})),u(I,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=_,V.prototype={constructor:V,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return V(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(t,e):void 0}}(t,e)||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 V(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var _=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{l(r.next(t))}catch(t){a(t)}}function c(t){try{l(r.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}l((r=r.apply(t,e||[])).next())}))},B="onboarding.welcomeVideo";function R(t){var e=(0,k.Q)(t.redirectUrl),n=e.completeStepAsync,x=e.onSaveError,E=(0,L.H)().logEvent,C=o.a.useBasicFetch(s.L.config()),j=o.a.useBasicFetch(f.N.currentUser()),V=N.getWelcomeVideo(C.data,j.data),R=r.useRef(),F=o.a.useBasicFetch(V&&h.R.sharedVideo(V.videoId,V.shareId)),U=o.a.useBasicFetch(i.o.getShareObject(V.shareId)),T=o.a.useBasicFetch(d.k.createViewKey(V.shareId,u.f.Share)),A=S(r.useState(!1),2),G=A[0],z=A[1],D=S(r.useState(!1),2),W=D[0],H=D[1],K=S(r.useState(!1),2),M=K[0],Y=K[1],Q=(0,p.k)();function Z(){return _(this,void 0,void 0,P().mark((function t(){return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n();case 3:t.next=9;break;case 5:return t.prev=5,t.t0=t.catch(0),x(),t.abrupt("return",Promise.reject());case 9:case"end":return t.stop()}}),t,null,[[0,5]])})))}function X(t){R.current=t,t.isPaused()||H(!0);var e=function(){var e=t.currentTime();e!==t.duration()||G?e!==t.duration()&&G&&z(!1):z(!0),M||Math.floor(t.duration()-e)<=20&&!M&&Y(!0)},n=function(){W||H(!0),E(a.Vw.Click,a.Ix.PlayVideo,{videoId:V.videoId,shareId:V.shareId})},r=function(){E(a.Vw.Click,a.Ix.PauseVideo,{videoId:V.videoId,shareId:V.shareId})},o=function(){E(a.Vw.Complete,a.Ix.FinishVideo,{videoId:V.videoId,shareId:V.shareId})};t.on("timeupdate",e),t.on("play",n),t.on("pause",r),t.on("ended",o),t.one("dispose",(function(){t.off("timeupdate",e),t.off("play",n),t.off("pause",r),t.off("ended",o)}))}var $=F.data&&j.hasCompleted&&C.hasCompleted&&U.hasCompleted&&T.hasCompleted,q=Q.lg||Q.xl||Q.xxl;return r.createElement(b.z,{namespace:B},r.createElement(b.z.Left,{className:"bg-dark-blue d-flex justify-content-center flex-column"},q&&r.createElement(w.N,{annotationUrl:y.W.OnboardingV2.WelcomeVideo.HIT_PLAY,annotationPosition:"bottom-right",annotationClassName:"pe-5 ".concat(O.annotation)},r.createElement(I,{hasDataLoaded:$,config:C.data,video:F.data,currentUser:j.data,shareLink:U.data,viewKey:T.data,onReady:X}))),r.createElement(b.z.Right,{hasCustomButtons:!0},r.createElement(m.W,{className:O.headingContainer},r.createElement(l.x,{phrase:"heading"})),!q&&r.createElement(I,{hasDataLoaded:$,config:C.data,video:F.data,currentUser:j.data,shareLink:U.data,viewKey:T.data,onReady:X}),r.createElement(g.X,{className:O.infoContainer},r.createElement(l.x,{phrase:"watchVideo"})),G&&r.createElement("div",{className:"position-absolute ".concat(O.replayContainer)},r.createElement("button",{className:"btn btn-link text-info text-decoration-none btn-lg ".concat(O.replayButton),onClick:function(){var t,e;E(a.Vw.Click,a.Ix.ReplayVideo,{videoId:V.videoId,shareId:V.shareId}),z(!1),null===(t=R.current)||void 0===t||t.currentTime(0),null===(e=R.current)||void 0===e||e.play()}},r.createElement(c.x,{svgName:v.vn.Retry,className:"svg-container ".concat(O.icon)}),r.createElement(l.x,{phrase:"replayVideo"}))),r.createElement("div",{className:"position-absolute ".concat(O.buttonContainer)},r.createElement("button",{className:"btn btn-link text-decoration-none btn-lg ".concat(O.skipButton),onClick:function(){E(a.Vw.Click,a.Ix.SkipVideo,{videoId:V.videoId,shareId:V.shareId}),Z()}},r.createElement(l.x,{phrase:"skipVideo"})),r.createElement("button",{className:"btn btn-dark btn-lg",onClick:W?function(){E(a.Vw.Click,a.Ix.Next,{videoId:V.videoId,shareId:V.shareId}),Z()}:function(){var t;null===(t=R.current)||void 0===t||t.play()},disabled:W&&!M},!W&&r.createElement(c.x,{svgName:v.vn.Play,className:"svg-container ".concat(O.icon)}),r.createElement(l.x,{phrase:W?"next":"playVideo"})))))}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 7670-
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7670],{68293:(e,t,r)=>{r.d(t,{B:()=>f});var n=r(32735),o=["Teacher","Librarian / Teacher Librarian","Curriculum Coordinator","Digital Technology Coordinator","SSO / SLSO","IT","Head of Department","Head of Subject","Assistant Principal","Deputy Principal","Principal"],a=["Teacher","Librarian / Teacher Librarian","Head of Department","Instructional Technology Specialist","Curriculum Coordinator","School Leadership","District Leadership","Academic Coach","Principal","IT / IT Specialist"],i={au:o,nz:o,uk:["Teacher","Librarian / Teacher Librarian","IT/LRC","e-Learning/ICT Coordinator","Head of Key Stage","Head of Department","Subject Lead","Assistant Head Teacher","Deputy Head Teacher","Head Teacher"],us:a};function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var u="OTHER";function s(e,t){return t.includes(e)?e:e?u:""}function f(e){var t,r,o=e.error,l=e.onChange,f=(t=e.countryCode,r=null==t?void 0:t.toLowerCase(),i[r]||a),h=s(e.initialValue,f),d=c(n.useState(h),2),m=d[0],y=d[1],p=c(n.useState(h===u?e.initialValue:""),2),v=p[0],g=p[1];n.useEffect((function(){y(s(e.initialValue,f))}),[e.initialValue]);var b=m===u;return n.createElement(n.Fragment,null,n.createElement("div",{className:"mb-2"},n.createElement("select",{id:e.id,name:e.id,className:"form-select form-select-lg ".concat(m.length?"text-dark":"text-secondary"," ").concat(!!o&&"is-invalid"),value:m,placeholder:"Role",onChange:function(e){y(e.target.value),g(""),l(e.target.value===u?"":e.target.value)}},n.createElement("option",{value:"",disabled:!0,className:"text-muted"},e.placeholder?e.placeholder:n.createElement(n.Fragment,null,"What do you do?")),f.map((function(e,t){return n.createElement("option",{value:e,className:"text-dark",key:t},e)})),n.createElement("option",{value:u,className:"text-dark"},"Other")),!!o&&!b&&n.createElement("div",{className:"invalid-feedback"},o)),b&&n.createElement("div",{className:"mb-3"},n.createElement("input",{className:"form-control form-control-lg ".concat(!!o&&"is-invalid"),type:"text",value:v,placeholder:"What do you do?",autoFocus:!0,onChange:function(e){g(e.target.value),l(e.target.value)}}),!!o&&n.createElement("div",{className:"invalid-feedback"},o)))}},12238:(e,t,r)=>{var n;r.d(t,{C:()=>n}),function(e){e.MasterId="master_id",e.CrmId="crm_id",e.SalesforceId="salesforce_id"}(n||(n={}))},58329:(e,t,r)=>{r.r(t),r.d(t,{OnboardingSelectRoleView:()=>I});var n=r(32735),o=r(23481),a=r(20354),i=r(65858),c=r(38304),l=r(68293),u=r(60376),s=r(83914),f=r(83345),h=r(54610),d=r(31949),m=r(22902),y=r(67453),p=r(35223),v=r(99742),g=r(75359),b=r(12058),w=r(40695),S=r(73190),E=r(90815),x=r(44842);const L={customerLogo:"O0Fk5"};function j(e){return j="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},j(e)}function O(){O=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var a=t&&t.prototype instanceof v?t:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:N(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",d="suspendedYield",m="executing",y="completed",p={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(_([])));E&&E!==r&&n.call(E,i)&&(w=E);var x=b.prototype=v.prototype=Object.create(w);function L(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==j(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function N(t,r,n){var o=h;return function(a,i){if(o===m)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===p)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(t,r,n);if("normal"===u.type){if(o=n.done?y:d,u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var a=f(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,p;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function _(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(j(t)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},L(T.prototype),u(T.prototype,c,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new T(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=_,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:_(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),p}},t}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N(e,t):void 0}}(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 N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((n=n.apply(e,t||[])).next())}))},k="onboarding.selectRole";function I(){var e,t,r,j=(0,S.Q)(),N=j.onClickBack,I=j.exitOnboarding,A=j.completeStepAsync,_=j.onSaveError,P=(0,E.H)().logEvent,U=a.a.useBasicFetch(d.N.currentUser()),B=a.a.useBasicFetch(U.data&&d.N.user(U.data.id)),V=a.a.useGetFetchAsync(),D=(0,m.T)().hasPermissions,F=T(n.useState(""),2),G=F[0],H=F[1],R=T(n.useState(""),2),M=R[0],z=R[1];return n.createElement(w.z,{namespace:k},n.createElement(w.z.Left,{className:"bg-dark-blue d-flex align-items-center"},n.createElement("div",{className:"px-5 pt-4"},n.createElement("img",{className:"img-fluid",src:v.W.OnboardingV2.SelectRole.BACKGROUND}))),n.createElement(w.z.Right,{hasCustomButtons:!1,onClickNext:function(){return C(this,void 0,void 0,O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(G){e.next=2;break}return e.abrupt("return");case 2:return P(i.Vw.Click,i.Ix.Next,{jobTitle:G},{jobTitleOverride:G}),e.prev=3,e.next=6,V(d.N.updateJobTitle(U.data.id,U.data.customerId,G));case 6:return e.next=8,A({jobTitleOverride:G});case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(3),_(),e.abrupt("return",Promise.reject());case 14:case"end":return e.stop()}}),e,null,[[3,10]])})))},onClickBack:N,onClickComeBackLater:(null===(r=null===(t=null===(e=B.data)||void 0===e?void 0:e.userProfile)||void 0===t?void 0:t.metadata)||void 0===r?void 0:r.jobTitle)||!c.m.hasNonBdmTrial(D)?I:null,disableNext:!!M||!G},n.createElement("div",{className:"position-relative"},n.createElement("div",{className:"".concat(L.customerLogo," mx-auto mb-3")},n.createElement(u.f,{imageUrl:y.j.createUrl(U.data.customerLogo,{size:h.h2.Small}),svgName:p.vn.GraduationCap,variant:"green",svgSize:s.S.Large})),n.createElement(g.W,null,n.createElement(f.x,{phrase:"heading",options:{schoolName:U.data.customerName}}))),n.createElement(b.X,{className:"mb-3 mt-2"},n.createElement(f.x,{phrase:"info"})),n.createElement(l.B,{id:"onboarding-job-title",onChange:function(e){H(e),P(i.Vw.Select,i.Ix.SelectJobTitle,{jobTitle:G});var t=x.h.validateJobTitle(e),r=t.isValid,n=t.errorMessage;r?n&&z(""):z(n)},countryCode:U.data.countryCode,placeholder:o.T.getPhrase(k,"rolePlaceholder"),initialValue:G,error:M})))}},44842:(e,t,r)=>{r.d(t,{h:()=>h});var n=r(97395),o=r(12238),a=r(19808);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 c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t,r){var n;return n=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==i(n)?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=/\$+[\w\s]?/,f=u(u(u(u({},a.b.AU,"02 9509 2600"),a.b.UK,"+44 (0)333 207 6595"),a.b.NZ,"09 916 1156"),a.b.US,null),h={getSalesforceId:function(e){if(e&&e.length){var t=e.find((function(e){return e.type===o.C.SalesforceId}));if(t)return t.externalId}},buildQueryData:function(e,t){var r={id:e,fname:null==t?void 0:t.givenName,sname:null==t?void 0:t.familyName,email:null==t?void 0:t.email};return Object.entries(r).filter((function(e){return!!c(e,2)[1]})).reduce((function(e,t){var r=c(t,2),n=r[0],o=r[1];return Object.assign(Object.assign({},e),u({},n,o))}),{})},getBookDemoUrl:function(e,t,r){var o=h.getSalesforceId(r),a=n._.safeUrlConcat(e,"/book-a-demo/");return n._.urlBuilder(a,h.buildQueryData(o,t))},getUpgradePageUrl:function(e,t,r){var o=h.getSalesforceId(r),a=n._.safeUrlConcat(e,"/contact-us/trial-upgrade/");return n._.urlBuilder(a,h.buildQueryData(o,t))},getContactNumber:function(e){return f[e]},validateJobTitle:function(e){return s.test(e)?{isValid:!1,errorMessage:"Please enter a valid job title."}:e.length>255?{isValid:!1,errorMessage:"Job title cannot exceed max length of 255 characters."}:{isValid:!0}}}}}]);
|
|
1
|
+
/*! For license information please see 7670-648e6e8945-lite.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7670],{68293:(e,t,r)=>{r.d(t,{B:()=>f});var n=r(32735),o=["Teacher","Librarian / Teacher Librarian","Curriculum Coordinator","Digital Technology Coordinator","SSO / SLSO","IT","Head of Department","Head of Subject","Assistant Principal","Deputy Principal","Principal"],a=["Teacher","Librarian / Teacher Librarian","Head of Department","Instructional Technology Specialist","Curriculum Coordinator","School Leadership","District Leadership","Academic Coach","Principal","IT / IT Specialist"],i={au:o,nz:o,uk:["Teacher","Librarian / Teacher Librarian","IT/LRC","e-Learning/ICT Coordinator","Head of Key Stage","Head of Department","Subject Lead","Assistant Head Teacher","Deputy Head Teacher","Head Teacher"],us:a};function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var u="OTHER";function s(e,t){return t.includes(e)?e:e?u:""}function f(e){var t,r,o=e.error,l=e.onChange,f=(t=e.countryCode,r=null==t?void 0:t.toLowerCase(),i[r]||a),h=s(e.initialValue,f),d=c(n.useState(h),2),m=d[0],y=d[1],p=c(n.useState(h===u?e.initialValue:""),2),v=p[0],g=p[1];n.useEffect((function(){y(s(e.initialValue,f))}),[e.initialValue]);var b=m===u;return n.createElement(n.Fragment,null,n.createElement("div",{className:"mb-2"},n.createElement("select",{id:e.id,name:e.id,className:"form-select form-select-lg ".concat(m.length?"text-dark":"text-secondary"," ").concat(!!o&&"is-invalid"),value:m,placeholder:"Role",onChange:function(e){y(e.target.value),g(""),l(e.target.value===u?"":e.target.value)}},n.createElement("option",{value:"",disabled:!0,className:"text-muted"},e.placeholder?e.placeholder:n.createElement(n.Fragment,null,"What do you do?")),f.map((function(e,t){return n.createElement("option",{value:e,className:"text-dark",key:t},e)})),n.createElement("option",{value:u,className:"text-dark"},"Other")),!!o&&!b&&n.createElement("div",{className:"invalid-feedback"},o)),b&&n.createElement("div",{className:"mb-3"},n.createElement("input",{className:"form-control form-control-lg ".concat(!!o&&"is-invalid"),type:"text",value:v,placeholder:"What do you do?",autoFocus:!0,onChange:function(e){g(e.target.value),l(e.target.value)}}),!!o&&n.createElement("div",{className:"invalid-feedback"},o)))}},12238:(e,t,r)=>{var n;r.d(t,{C:()=>n}),function(e){e.MasterId="master_id",e.CrmId="crm_id",e.SalesforceId="salesforce_id"}(n||(n={}))},58329:(e,t,r)=>{r.r(t),r.d(t,{OnboardingSelectRoleView:()=>I});var n=r(32735),o=r(23481),a=r(20354),i=r(65858),c=r(38304),l=r(68293),u=r(60376),s=r(83914),f=r(83345),h=r(54610),d=r(31949),m=r(22902),y=r(67453),p=r(35223),v=r(99742),g=r(75359),b=r(12058),w=r(40695),S=r(73190),E=r(90815),x=r(44842);const L={customerLogo:"O0Fk5"};function j(e){return j="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},j(e)}function O(){O=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var a=t&&t.prototype instanceof v?t:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:N(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",d="suspendedYield",m="executing",y="completed",p={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(_([])));E&&E!==r&&n.call(E,i)&&(w=E);var x=b.prototype=v.prototype=Object.create(w);function L(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==j(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function N(t,r,n){var o=h;return function(a,i){if(o===m)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===p)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(t,r,n);if("normal"===u.type){if(o=n.done?y:d,u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var a=f(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,p;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function _(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(j(t)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},L(T.prototype),u(T.prototype,c,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new T(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=_,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:_(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),p}},t}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N(e,t):void 0}}(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 N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((n=n.apply(e,t||[])).next())}))},k="onboarding.selectRole";function I(e){var t,r,j,N=(0,S.Q)(e.redirectUrl),I=N.onClickBack,A=N.exitOnboarding,_=N.completeStepAsync,P=N.onSaveError,U=(0,E.H)().logEvent,B=a.a.useBasicFetch(d.N.currentUser()),V=a.a.useBasicFetch(B.data&&d.N.user(B.data.id)),D=a.a.useGetFetchAsync(),F=(0,m.T)().hasPermissions,G=T(n.useState(""),2),H=G[0],R=G[1],M=T(n.useState(""),2),z=M[0],J=M[1];return n.createElement(w.z,{namespace:k},n.createElement(w.z.Left,{className:"bg-dark-blue d-flex align-items-center"},n.createElement("div",{className:"px-5 pt-4"},n.createElement("img",{className:"img-fluid",src:v.W.OnboardingV2.SelectRole.BACKGROUND}))),n.createElement(w.z.Right,{hasCustomButtons:!1,onClickNext:function(){return C(this,void 0,void 0,O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(H){e.next=2;break}return e.abrupt("return");case 2:return U(i.Vw.Click,i.Ix.Next,{jobTitle:H},{jobTitleOverride:H}),e.prev=3,e.next=6,D(d.N.updateJobTitle(B.data.id,B.data.customerId,H));case 6:return e.next=8,_({jobTitleOverride:H});case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(3),P(),e.abrupt("return",Promise.reject());case 14:case"end":return e.stop()}}),e,null,[[3,10]])})))},onClickBack:I,onClickComeBackLater:(null===(j=null===(r=null===(t=V.data)||void 0===t?void 0:t.userProfile)||void 0===r?void 0:r.metadata)||void 0===j?void 0:j.jobTitle)||!c.m.hasNonBdmTrial(F)?A:null,disableNext:!!z||!H},n.createElement("div",{className:"position-relative"},n.createElement("div",{className:"".concat(L.customerLogo," mx-auto mb-3")},n.createElement(u.f,{imageUrl:y.j.createUrl(B.data.customerLogo,{size:h.h2.Small}),svgName:p.vn.GraduationCap,variant:"green",svgSize:s.S.Large})),n.createElement(g.W,null,n.createElement(f.x,{phrase:"heading",options:{schoolName:B.data.customerName}}))),n.createElement(b.X,{className:"mb-3 mt-2"},n.createElement(f.x,{phrase:"info"})),n.createElement(l.B,{id:"onboarding-job-title",onChange:function(e){R(e),U(i.Vw.Select,i.Ix.SelectJobTitle,{jobTitle:H});var t=x.h.validateJobTitle(e),r=t.isValid,n=t.errorMessage;r?n&&J(""):J(n)},countryCode:B.data.countryCode,placeholder:o.T.getPhrase(k,"rolePlaceholder"),initialValue:H,error:z})))}},44842:(e,t,r)=>{r.d(t,{h:()=>h});var n=r(97395),o=r(12238),a=r(19808);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 c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t,r){var n;return n=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==i(n)?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=/\$+[\w\s]?/,f=u(u(u(u({},a.b.AU,"02 9509 2600"),a.b.UK,"+44 (0)333 207 6595"),a.b.NZ,"09 916 1156"),a.b.US,null),h={getSalesforceId:function(e){if(e&&e.length){var t=e.find((function(e){return e.type===o.C.SalesforceId}));if(t)return t.externalId}},buildQueryData:function(e,t){var r={id:e,fname:null==t?void 0:t.givenName,sname:null==t?void 0:t.familyName,email:null==t?void 0:t.email};return Object.entries(r).filter((function(e){return!!c(e,2)[1]})).reduce((function(e,t){var r=c(t,2),n=r[0],o=r[1];return Object.assign(Object.assign({},e),u({},n,o))}),{})},getBookDemoUrl:function(e,t,r){var o=h.getSalesforceId(r),a=n._.safeUrlConcat(e,"/book-a-demo/");return n._.urlBuilder(a,h.buildQueryData(o,t))},getUpgradePageUrl:function(e,t,r){var o=h.getSalesforceId(r),a=n._.safeUrlConcat(e,"/contact-us/trial-upgrade/");return n._.urlBuilder(a,h.buildQueryData(o,t))},getContactNumber:function(e){return f[e]},validateJobTitle:function(e){return s.test(e)?{isValid:!1,errorMessage:"Please enter a valid job title."}:e.length>255?{isValid:!1,errorMessage:"Job title cannot exceed max length of 255 characters."}:{isValid:!0}}}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 8199-
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[8199],{2381:(e,t,n)=>{n.d(t,{q:()=>c});var r=n(5173),a=n(23481),o="playlists.validation",c=r.Ry().shape({name:r.Z_().max(250,(function(){return a.T.getPhrase(o,"nameExceeds")})).required((function(){return a.T.getPhrase(o,"nameRequired")})),description:r.Z_().max(16e3,(function(){return a.T.getPhrase(o,"descriptionExceeds")})).nullable()})},75919:(e,t,n)=>{n.d(t,{N:()=>o});var r=n(32735);const a={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function o(e){return r.createElement("div",{className:(t="d-flex align-items-center text-center position-relative w-100 ".concat(a.imageContainer),"center"===e.contentPosition&&(t+=" px-5 justify-content-center"),"right"===e.contentPosition&&(t+=" me-n5 justify-content-end"),t)},!!e.annotationUrl&&r.createElement("div",{className:function(){var t=a.annotation;switch(e.annotationPosition){case"top-left":t+=" ".concat(a.above," ").concat(a.left);break;case"top-right":t+=" ".concat(a.above," ").concat(a.right);break;case"bottom-left":t+=" ".concat(a.below," ").concat(a.left);break;case"bottom-right":t+=" ".concat(a.below," ").concat(a.right)}return e.annotationClassName&&(t+=" ".concat(e.annotationClassName)),t}()},r.createElement("img",{className:"img-fluid",src:e.annotationUrl})),e.children,"right"===e.contentPosition&&r.createElement("div",{className:a.divider}));var t}o.defaultProps={contentPosition:"center"}},2248:(e,t,n)=>{n.d(t,{L:()=>p});var r=n(32735),a=n(60376),o=n(83914),c=n(2786),i=n(83345),l=n(72639),s=n(79967),u=n(35223),m=n(10144);const d={dot:"AlRQD",logo:"L42gR",blackBar:"ESCxm",topNav:"a3G_4",leftNav:"YxGVV",belowHeader:"jc_cg",leftNavIcon:"U6i6r",leftNavText:"LnYlW",presentationPlaceholderIcon:"Ljaju",presentationIcon:"QdwPq",presentationPlaceholderText:"af06V",curriculumIcon:"N7T4T",curriculumIconSmall:"_6xrUg",curriculumContainer:"Z65qX",iconPlaceholder:"CKOXL",shadow:"zygeJ",presentationName:"Oj7Dt"};var f="onboarding.mockLayout";function h(){return r.createElement("div",{className:"d-flex align-items-center justify-content-center mb-2 px-3"},r.createElement("div",{className:"".concat(d.leftNavIcon," rounded-circle")}),r.createElement("div",{className:"".concat(d.leftNavText," rounded-pill")}))}function p(e){var t,n,p=(0,s.k)();return r.createElement("div",{className:"border border-dark border-2 bg-white rounded-3 user-select-none overflow-hidden position-relative h-100 w-100"},!!e.editingCurriculum&&r.createElement("div",{className:"w-100 h-100 position-absolute ".concat(d.shadow)},r.createElement("div",{className:"d-flex align-items-center h-100 w-50 ".concat(d.curriculumContainer)},r.createElement("div",{className:"bg-white rounded-3 border p-3 w-100"},r.createElement("h2",{className:"h6 text-start"},r.createElement(i.x,{namespace:f,phrase:"curriculum"})),e.curriculum?r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(d.curriculumIcon," rounded-circle me-2 border")},r.createElement(a.f,{imageUrl:null===(t=e.curriculum.cover)||void 0===t?void 0:t.url})),r.createElement("div",{className:"text-start"},e.curriculum.name)):r.createElement("div",{className:"d-flex align-items-center text-muted"},r.createElement("div",{className:"me-2 rounded-circle p-1 ".concat(d.iconPlaceholder)},r.createElement(a.f,{svgSize:o.S.Large,textVariant:"secondary",svgName:u.vn.GraduationCap})),r.createElement(i.x,{namespace:f,phrase:"selectCurriculum"}))))),r.createElement("div",{className:"bg-dark d-flex px-3 py-2 ".concat(d.blackBar)},r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle ".concat(d.dot)})),r.createElement("div",{className:"border-bottom px-3 py-2 d-flex align-items-center ".concat(d.topNav)},r.createElement("div",{className:"".concat(d.logo," me-4")},p.xs?r.createElement(c.bc,null):r.createElement(c.$S,null)),r.createElement("div",{className:"form-control w-75 d-flex justify-content-start"},r.createElement(o.x,{svgName:u.vn.Search})),!!e.curriculum&&r.createElement("div",{className:"".concat(d.curriculumIconSmall," rounded-circle ms-2 me-n1 border")},r.createElement(a.f,{imageUrl:null===(n=e.curriculum.cover)||void 0===n?void 0:n.url}))),r.createElement("div",{className:"d-flex ".concat(d.belowHeader)},r.createElement("div",{className:"".concat(d.leftNav," border-end")},r.createElement("div",{className:"d-flex flex-column pt-3 h-100"},r.createElement(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement("div",{className:"d-flex align-items-end h-100 w-100"},r.createElement("div",{className:"border-top p-3 w-100"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(function(){if(!e.presentation)return d.presentationPlaceholderIcon;switch(m.i.getMappedPresentationLevel(e.presentation.learningLevel)){case l.p.Level_1:return"bg-indigo ".concat(d.presentationIcon);case l.p.Level_3:return"bg-blue ".concat(d.presentationIcon);default:case l.p.Level_2:return"bg-green ".concat(d.presentationIcon)}}()," text-white rounded")},r.createElement(o.x,{svgName:u.vn.School,size:o.S.Large})),e.presentation?r.createElement("span",{className:"fw-semibold text-truncate ".concat(d.presentationName)},e.presentation.name):r.createElement("div",{className:"".concat(d.presentationPlaceholderText," fw-semibold")},r.createElement(i.x,{namespace:f,phrase:"schoolLevel"}))))))),r.createElement("div",{className:"w-100 h-100 overflow-hidden"},e.children)))}},62007:(e,t,n)=>{n.d(t,{u:()=>u});var r=n(32735),a=n(5465),o=n(5438),c=n(54610),i=n(2248);const l={banner:"CQxNy",title:"NzV5V",description1:"kjCZi",description2:"cBeyJ",placeholder:"Ks_Tl",playlistName:"eFPqz",thumbnailCol:"dgCQ7",videoInfoCol:"pzfE2"};function s(e){return r.createElement("li",{className:"row mb-2"},r.createElement("div",{className:"col-lg-4 col-5 ".concat(l.thumbnailCol)},e.video?r.createElement(o.u,{video:e.video,type:"cosmetic",hideDuration:!0,imageOptions:{size:c.h2.Small}}):r.createElement(a.oy,{type:a.mS.Video,extraClasses:"position-relative rounded-3 ".concat(l.placeholder)})),r.createElement("div",{className:"col-lg-8 col-7 ".concat(l.videoInfoCol)},r.createElement("div",{className:"".concat(l.title," rounded-pill bg-grey mb-1")}),r.createElement("div",{className:"".concat(l.description1," rounded-pill bg-grey mb-1")}),r.createElement("div",{className:"".concat(l.description2," rounded-pill bg-grey mb-1")})))}function u(e){var t,n,a,o=e.hidePlaceholders?0:Math.max(6-(null!==(n=null===(t=e.videos)||void 0===t?void 0:t.length)&&void 0!==n?n:0),0);return r.createElement(i.L,{presentation:e.presentation,curriculum:e.curriculum},r.createElement("div",{className:"bg-teal ".concat(l.banner," position-relative")},e.name&&r.createElement("div",{className:"h5 text-white mb-0 ".concat(l.playlistName)},e.name)),r.createElement("ul",{className:"list-unstyled mb-0 w-100 p-2"},null===(a=e.videos)||void 0===a?void 0:a.map((function(e){return r.createElement(s,{key:e.id,video:e})})),new Array(o).fill(0).map((function(e,t){return r.createElement(s,{key:t})}))))}},82718:(e,t,n)=>{n.r(t),n.d(t,{OnboardingCreatePlaylistView:()=>T});var r=n(32735),a=n(23481),o=n(57900),c=n(2948),i=n(20354),l=n(65858),s=n(2381),u=n(83345),m=n(55171),d=n(54610),f=n(5112),h=n(31949),p=n(99742),v=n(86702),y=n(82817),g=n(86698),b=n(75359),E=n(12058),N=n(40695),w=n(75919),x=n(62007),L=n(73190),P=n(90815);const I={annotation:"EYKMF"};function k(e){return k="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},k(e)}function O(){O=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,c=Object.create(o.prototype),i=new j(r||[]);return a(c,"_invoke",{value:I(e,n,i)}),c}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",v={};function y(){}function g(){}function b(){}var E={};s(E,c,(function(){return this}));var N=Object.getPrototypeOf,w=N&&N(N(T([])));w&&w!==n&&r.call(w,c)&&(E=w);var x=b.prototype=y.prototype=Object.create(E);function L(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(a,o,c,i){var l=m(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==k(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,c,i)}),(function(e){n("throw",e,c,i)})):t.resolve(u).then((function(e){s.value=e,c(s)}),(function(e){return n("throw",e,c,i)}))}i(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function I(t,n,r){var a=d;return function(o,c){if(a===h)throw new Error("Generator is already running");if(a===p){if("throw"===o)throw c;return{value:e,done:!0}}for(r.method=o,r.arg=c;;){var i=r.delegate;if(i){var l=S(i,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=m(t,n,r);if("normal"===s.type){if(a=r.done?p:f,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=p,r.method="throw",r.arg=s.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=m(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var c=o.arg;return c?c.done?(n[t.resultName]=c.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):c:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(k(t)+" is not iterable")}return g.prototype=b,a(x,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},L(P.prototype),s(P.prototype,i,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var c=new P(u(e,n,r,a),o);return t.isGeneratorFunction(n)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},L(x),s(x,l,"Generator"),s(x,c,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return i.type="throw",i.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],i=c.completion;if("root"===c.tryLoc)return a("end");if(c.tryLoc<=this.prev){var l=r.call(c,"catchLoc"),s=r.call(c,"finallyLoc");if(l&&s){if(this.prev<c.catchLoc)return a(c.catchLoc,!0);if(this.prev<c.finallyLoc)return a(c.finallyLoc)}else if(l){if(this.prev<c.catchLoc)return a(c.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return a(c.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var c=o?o.completion:{};return c.type=e,c.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(c)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;_(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function S(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){var r,a,o,c,i=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(s)throw a}}return i}}(e,t)||function(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}}(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 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}var _=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function c(e){try{l(r.next(e))}catch(e){o(e)}}function i(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,i)}l((r=r.apply(e,t||[])).next())}))},j="onboarding.createPlaylist";function T(){var e=S((0,c.D)(v.y.ONBOARDING_VIDEOS_V2,[],{storage:o.Z1.LocalStorage}),1)[0],t=S((0,c.D)(v.y.ONBOARDING_LOADER,{}),2)[1],n=i.a.useBasicFetch(h.N.currentUser()),k=(0,L.Q)(),C=k.onClickBack,T=k.exitOnboarding,A=k.onSaveError,V=k.completeStepAsync,F=(0,P.H)().logEvent,B=(0,g.y)().preferredPresentation,z=(0,y.M)().activeCurriculum,G=i.a.useGetFetchAsync(),D=r.useState(function(){var e=a.T.getPhrase(j,"firstPlaylist"),t=n.data.givenName;return t.endsWith("s")?"".concat(t,"' ").concat(e):"".concat(t,"'s ").concat(e)}()),R=S(D,2),U=R[0],q=R[1],Z={name:U,videos:e.map((function(e){var t;return{id:e.data.id,name:e.data.name,thumbnailUrl:null===(t=e.data.thumbnail)||void 0===t?void 0:t.url,videoSubjectId:e.classificationId,videoSubjectName:e.classificationName}})),presentationId:B.id,presentationName:B.name,presentationDescription:B.description};return r.createElement(N.z,{namespace:j},r.createElement(N.z.Left,{className:"bg-dark-blue d-flex flex-column align-items-end justify-content-center"},r.createElement(w.N,{annotationUrl:p.W.OnboardingV2.CreatePlaylist.ANNOTATION,annotationPosition:"top-left",annotationClassName:"ms-5 ".concat(I.annotation),contentPosition:"right"},r.createElement(x.u,{presentation:B,curriculum:z,videos:e.map((function(e){return e.data})),name:U}))),r.createElement(N.z.Right,{hasCustomButtons:!1,onClickBack:C,onClickComeBackLater:T,onClickNext:function(){return _(this,void 0,void 0,O().mark((function r(){return O().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(F(l.Vw.Click,l.Ix.Next,Z),s.q.isValidSync({name:U})){r.next=3;break}return r.abrupt("return");case 3:return r.prev=3,r.next=6,G(f.C.createPlaylist(n.data.id,{name:U,cover:{fileId:m.e.Onboarding.Playlist.COVER_FILE_ID,fileIdType:d.z9.ImageAPIv2},banner:{fileId:m.e.Onboarding.Playlist.BANNER_FILE_ID,fileIdType:d.z9.ImageAPIv2},videos:e.map((function(e){return{id:e.data.id}}))}));case 6:return t("playlistName",U),r.next=9,V();case 9:r.next=15;break;case 11:return r.prev=11,r.t0=r.catch(3),A(),r.abrupt("return",Promise.reject());case 15:case"end":return r.stop()}}),r,null,[[3,11]])})))},disableNext:!s.q.isValidSync({name:U})},r.createElement(b.W,null,r.createElement(u.x,{phrase:"heading"})),r.createElement(E.X,null,r.createElement(u.x,{phrase:"info"})),r.createElement("form",{onSubmit:function(e){return e.preventDefault()},className:"pb-3"},r.createElement("label",{htmlFor:"name",className:"form-label"},r.createElement(u.x,{phrase:"label"})),r.createElement("input",{id:"name",className:"form-control form-control-lg",placeholder:a.T.getPhrase(j,"placeholder"),name:"name",value:U,onChange:function(e){return q(e.target.value)},onFocus:function(){F(l.Vw.Focus,l.Ix.PlaylistName,Z)},onBlur:function(){F(l.Vw.Blur,l.Ix.PlaylistName,Z)}})),r.createElement(E.X,null,r.createElement(u.x,{phrase:"noWorries"}))))}}}]);
|
|
1
|
+
/*! For license information please see 8199-ccbefb8009-lite.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[8199],{2381:(e,t,n)=>{n.d(t,{q:()=>c});var r=n(5173),a=n(23481),o="playlists.validation",c=r.Ry().shape({name:r.Z_().max(250,(function(){return a.T.getPhrase(o,"nameExceeds")})).required((function(){return a.T.getPhrase(o,"nameRequired")})),description:r.Z_().max(16e3,(function(){return a.T.getPhrase(o,"descriptionExceeds")})).nullable()})},75919:(e,t,n)=>{n.d(t,{N:()=>o});var r=n(32735);const a={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function o(e){return r.createElement("div",{className:(t="d-flex align-items-center text-center position-relative w-100 ".concat(a.imageContainer),"center"===e.contentPosition&&(t+=" px-5 justify-content-center"),"right"===e.contentPosition&&(t+=" me-n5 justify-content-end"),t)},!!e.annotationUrl&&r.createElement("div",{className:function(){var t=a.annotation;switch(e.annotationPosition){case"top-left":t+=" ".concat(a.above," ").concat(a.left);break;case"top-right":t+=" ".concat(a.above," ").concat(a.right);break;case"bottom-left":t+=" ".concat(a.below," ").concat(a.left);break;case"bottom-right":t+=" ".concat(a.below," ").concat(a.right)}return e.annotationClassName&&(t+=" ".concat(e.annotationClassName)),t}()},r.createElement("img",{className:"img-fluid",src:e.annotationUrl})),e.children,"right"===e.contentPosition&&r.createElement("div",{className:a.divider}));var t}o.defaultProps={contentPosition:"center"}},2248:(e,t,n)=>{n.d(t,{L:()=>p});var r=n(32735),a=n(60376),o=n(83914),c=n(2786),i=n(83345),l=n(72639),s=n(79967),u=n(35223),m=n(10144);const d={dot:"AlRQD",logo:"L42gR",blackBar:"ESCxm",topNav:"a3G_4",leftNav:"YxGVV",belowHeader:"jc_cg",leftNavIcon:"U6i6r",leftNavText:"LnYlW",presentationPlaceholderIcon:"Ljaju",presentationIcon:"QdwPq",presentationPlaceholderText:"af06V",curriculumIcon:"N7T4T",curriculumIconSmall:"_6xrUg",curriculumContainer:"Z65qX",iconPlaceholder:"CKOXL",shadow:"zygeJ",presentationName:"Oj7Dt"};var f="onboarding.mockLayout";function h(){return r.createElement("div",{className:"d-flex align-items-center justify-content-center mb-2 px-3"},r.createElement("div",{className:"".concat(d.leftNavIcon," rounded-circle")}),r.createElement("div",{className:"".concat(d.leftNavText," rounded-pill")}))}function p(e){var t,n,p=(0,s.k)();return r.createElement("div",{className:"border border-dark border-2 bg-white rounded-3 user-select-none overflow-hidden position-relative h-100 w-100"},!!e.editingCurriculum&&r.createElement("div",{className:"w-100 h-100 position-absolute ".concat(d.shadow)},r.createElement("div",{className:"d-flex align-items-center h-100 w-50 ".concat(d.curriculumContainer)},r.createElement("div",{className:"bg-white rounded-3 border p-3 w-100"},r.createElement("h2",{className:"h6 text-start"},r.createElement(i.x,{namespace:f,phrase:"curriculum"})),e.curriculum?r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(d.curriculumIcon," rounded-circle me-2 border")},r.createElement(a.f,{imageUrl:null===(t=e.curriculum.cover)||void 0===t?void 0:t.url})),r.createElement("div",{className:"text-start"},e.curriculum.name)):r.createElement("div",{className:"d-flex align-items-center text-muted"},r.createElement("div",{className:"me-2 rounded-circle p-1 ".concat(d.iconPlaceholder)},r.createElement(a.f,{svgSize:o.S.Large,textVariant:"secondary",svgName:u.vn.GraduationCap})),r.createElement(i.x,{namespace:f,phrase:"selectCurriculum"}))))),r.createElement("div",{className:"bg-dark d-flex px-3 py-2 ".concat(d.blackBar)},r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle ".concat(d.dot)})),r.createElement("div",{className:"border-bottom px-3 py-2 d-flex align-items-center ".concat(d.topNav)},r.createElement("div",{className:"".concat(d.logo," me-4")},p.xs?r.createElement(c.bc,null):r.createElement(c.$S,null)),r.createElement("div",{className:"form-control w-75 d-flex justify-content-start"},r.createElement(o.x,{svgName:u.vn.Search})),!!e.curriculum&&r.createElement("div",{className:"".concat(d.curriculumIconSmall," rounded-circle ms-2 me-n1 border")},r.createElement(a.f,{imageUrl:null===(n=e.curriculum.cover)||void 0===n?void 0:n.url}))),r.createElement("div",{className:"d-flex ".concat(d.belowHeader)},r.createElement("div",{className:"".concat(d.leftNav," border-end")},r.createElement("div",{className:"d-flex flex-column pt-3 h-100"},r.createElement(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement("div",{className:"d-flex align-items-end h-100 w-100"},r.createElement("div",{className:"border-top p-3 w-100"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(function(){if(!e.presentation)return d.presentationPlaceholderIcon;switch(m.i.getMappedPresentationLevel(e.presentation.learningLevel)){case l.p.Level_1:return"bg-indigo ".concat(d.presentationIcon);case l.p.Level_3:return"bg-blue ".concat(d.presentationIcon);default:case l.p.Level_2:return"bg-green ".concat(d.presentationIcon)}}()," text-white rounded")},r.createElement(o.x,{svgName:u.vn.School,size:o.S.Large})),e.presentation?r.createElement("span",{className:"fw-semibold text-truncate ".concat(d.presentationName)},e.presentation.name):r.createElement("div",{className:"".concat(d.presentationPlaceholderText," fw-semibold")},r.createElement(i.x,{namespace:f,phrase:"schoolLevel"}))))))),r.createElement("div",{className:"w-100 h-100 overflow-hidden"},e.children)))}},62007:(e,t,n)=>{n.d(t,{u:()=>u});var r=n(32735),a=n(5465),o=n(5438),c=n(54610),i=n(2248);const l={banner:"CQxNy",title:"NzV5V",description1:"kjCZi",description2:"cBeyJ",placeholder:"Ks_Tl",playlistName:"eFPqz",thumbnailCol:"dgCQ7",videoInfoCol:"pzfE2"};function s(e){return r.createElement("li",{className:"row mb-2"},r.createElement("div",{className:"col-lg-4 col-5 ".concat(l.thumbnailCol)},e.video?r.createElement(o.u,{video:e.video,type:"cosmetic",hideDuration:!0,imageOptions:{size:c.h2.Small}}):r.createElement(a.oy,{type:a.mS.Video,extraClasses:"position-relative rounded-3 ".concat(l.placeholder)})),r.createElement("div",{className:"col-lg-8 col-7 ".concat(l.videoInfoCol)},r.createElement("div",{className:"".concat(l.title," rounded-pill bg-grey mb-1")}),r.createElement("div",{className:"".concat(l.description1," rounded-pill bg-grey mb-1")}),r.createElement("div",{className:"".concat(l.description2," rounded-pill bg-grey mb-1")})))}function u(e){var t,n,a,o=e.hidePlaceholders?0:Math.max(6-(null!==(n=null===(t=e.videos)||void 0===t?void 0:t.length)&&void 0!==n?n:0),0);return r.createElement(i.L,{presentation:e.presentation,curriculum:e.curriculum},r.createElement("div",{className:"bg-teal ".concat(l.banner," position-relative")},e.name&&r.createElement("div",{className:"h5 text-white mb-0 ".concat(l.playlistName)},e.name)),r.createElement("ul",{className:"list-unstyled mb-0 w-100 p-2"},null===(a=e.videos)||void 0===a?void 0:a.map((function(e){return r.createElement(s,{key:e.id,video:e})})),new Array(o).fill(0).map((function(e,t){return r.createElement(s,{key:t})}))))}},82718:(e,t,n)=>{n.r(t),n.d(t,{OnboardingCreatePlaylistView:()=>T});var r=n(32735),a=n(23481),o=n(57900),c=n(2948),i=n(20354),l=n(65858),s=n(2381),u=n(83345),m=n(55171),d=n(54610),f=n(5112),h=n(31949),p=n(99742),v=n(86702),y=n(82817),g=n(86698),b=n(75359),E=n(12058),N=n(40695),w=n(75919),x=n(62007),L=n(73190),P=n(90815);const I={annotation:"EYKMF"};function k(e){return k="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},k(e)}function O(){O=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,c=Object.create(o.prototype),i=new j(r||[]);return a(c,"_invoke",{value:I(e,n,i)}),c}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",v={};function y(){}function g(){}function b(){}var E={};s(E,c,(function(){return this}));var N=Object.getPrototypeOf,w=N&&N(N(T([])));w&&w!==n&&r.call(w,c)&&(E=w);var x=b.prototype=y.prototype=Object.create(E);function L(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(a,o,c,i){var l=m(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==k(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,c,i)}),(function(e){n("throw",e,c,i)})):t.resolve(u).then((function(e){s.value=e,c(s)}),(function(e){return n("throw",e,c,i)}))}i(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function I(t,n,r){var a=d;return function(o,c){if(a===h)throw new Error("Generator is already running");if(a===p){if("throw"===o)throw c;return{value:e,done:!0}}for(r.method=o,r.arg=c;;){var i=r.delegate;if(i){var l=S(i,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=m(t,n,r);if("normal"===s.type){if(a=r.done?p:f,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=p,r.method="throw",r.arg=s.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=m(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var c=o.arg;return c?c.done?(n[t.resultName]=c.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):c:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(k(t)+" is not iterable")}return g.prototype=b,a(x,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},L(P.prototype),s(P.prototype,i,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var c=new P(u(e,n,r,a),o);return t.isGeneratorFunction(n)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},L(x),s(x,l,"Generator"),s(x,c,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return i.type="throw",i.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],i=c.completion;if("root"===c.tryLoc)return a("end");if(c.tryLoc<=this.prev){var l=r.call(c,"catchLoc"),s=r.call(c,"finallyLoc");if(l&&s){if(this.prev<c.catchLoc)return a(c.catchLoc,!0);if(this.prev<c.finallyLoc)return a(c.finallyLoc)}else if(l){if(this.prev<c.catchLoc)return a(c.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return a(c.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var c=o?o.completion:{};return c.type=e,c.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(c)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;_(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function S(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){var r,a,o,c,i=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(s)throw a}}return i}}(e,t)||function(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}}(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 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}var _=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function c(e){try{l(r.next(e))}catch(e){o(e)}}function i(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,i)}l((r=r.apply(e,t||[])).next())}))},j="onboarding.createPlaylist";function T(e){var t=S((0,c.D)(v.y.ONBOARDING_VIDEOS_V2,[],{storage:o.Z1.LocalStorage}),1)[0],n=S((0,c.D)(v.y.ONBOARDING_LOADER,{}),2)[1],k=i.a.useBasicFetch(h.N.currentUser()),C=(0,L.Q)(e.redirectUrl),T=C.onClickBack,A=C.exitOnboarding,V=C.onSaveError,F=C.completeStepAsync,B=(0,P.H)().logEvent,z=(0,g.y)().preferredPresentation,G=(0,y.M)().activeCurriculum,D=i.a.useGetFetchAsync(),R=r.useState(function(){var e=a.T.getPhrase(j,"firstPlaylist"),t=k.data.givenName;return t.endsWith("s")?"".concat(t,"' ").concat(e):"".concat(t,"'s ").concat(e)}()),U=S(R,2),q=U[0],Z=U[1],M={name:q,videos:t.map((function(e){var t;return{id:e.data.id,name:e.data.name,thumbnailUrl:null===(t=e.data.thumbnail)||void 0===t?void 0:t.url,videoSubjectId:e.classificationId,videoSubjectName:e.classificationName}})),presentationId:z.id,presentationName:z.name,presentationDescription:z.description};return r.createElement(N.z,{namespace:j},r.createElement(N.z.Left,{className:"bg-dark-blue d-flex flex-column align-items-end justify-content-center"},r.createElement(w.N,{annotationUrl:p.W.OnboardingV2.CreatePlaylist.ANNOTATION,annotationPosition:"top-left",annotationClassName:"ms-5 ".concat(I.annotation),contentPosition:"right"},r.createElement(x.u,{presentation:z,curriculum:G,videos:t.map((function(e){return e.data})),name:q}))),r.createElement(N.z.Right,{hasCustomButtons:!1,onClickBack:T,onClickComeBackLater:A,onClickNext:function(){return _(this,void 0,void 0,O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B(l.Vw.Click,l.Ix.Next,M),s.q.isValidSync({name:q})){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,e.next=6,D(f.C.createPlaylist(k.data.id,{name:q,cover:{fileId:m.e.Onboarding.Playlist.COVER_FILE_ID,fileIdType:d.z9.ImageAPIv2},banner:{fileId:m.e.Onboarding.Playlist.BANNER_FILE_ID,fileIdType:d.z9.ImageAPIv2},videos:t.map((function(e){return{id:e.data.id}}))}));case 6:return n("playlistName",q),e.next=9,F();case 9:e.next=15;break;case 11:return e.prev=11,e.t0=e.catch(3),V(),e.abrupt("return",Promise.reject());case 15:case"end":return e.stop()}}),e,null,[[3,11]])})))},disableNext:!s.q.isValidSync({name:q})},r.createElement(b.W,null,r.createElement(u.x,{phrase:"heading"})),r.createElement(E.X,null,r.createElement(u.x,{phrase:"info"})),r.createElement("form",{onSubmit:function(e){return e.preventDefault()},className:"pb-3"},r.createElement("label",{htmlFor:"name",className:"form-label"},r.createElement(u.x,{phrase:"label"})),r.createElement("input",{id:"name",className:"form-control form-control-lg",placeholder:a.T.getPhrase(j,"placeholder"),name:"name",value:q,onChange:function(e){return Z(e.target.value)},onFocus:function(){B(l.Vw.Focus,l.Ix.PlaylistName,M)},onBlur:function(){B(l.Vw.Blur,l.Ix.PlaylistName,M)}})),r.createElement(E.X,null,r.createElement(u.x,{phrase:"noWorries"}))))}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 841-
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[841],{49602:(e,t,n)=>{var r;n.d(t,{b:()=>c}),function(e){e[e.None=0]="None",e[e.AllSubjects=1]="AllSubjects",e[e.AllLevels=2]="AllLevels",e[e.AllSubjectsAndAllLevels=3]="AllSubjectsAndAllLevels"}(r||(r={}));var a=n(25925),c={hasManyPresentationTypes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0,n=0;return null==e||e.forEach((function(e){e.type===a.R.Subject?t++:e.type===a.R.Curriculum&&n++})),{hasManySubjectPresentations:t>1,hasManyCurriculumPresentations:n>1}},getBulkPreferencesState:function(e){return e===r.AllSubjectsAndAllLevels?{levels:!0,subjects:!0}:{levels:e===r.AllLevels,subjects:e===r.AllSubjects}},hasBulkSelectedLevels:function(e){return e===r.AllLevels||e===r.AllSubjectsAndAllLevels},hasBulkSelectedTopics:function(e){return e===r.AllSubjects||e===r.AllSubjectsAndAllLevels},getNextBulkState:function(e,t){var n=r.None,a=r.AllSubjects,c=r.AllLevels,l=r.AllSubjectsAndAllLevels,o="topics"===t;switch(e){case n:default:return o?a:c;case a:return o?n:l;case c:return o?l:n;case l:return o?c:a}}}},2192:(e,t,n)=>{n.d(t,{M:()=>h,Q:()=>g});var r=n(32735),a=n(45157),c=n(36848),l=n(60376),o=n(5465),i=n(83914),s=n(83345),u=n(54610),m=n(67453),d=n(35223),f=n(92038),v=function(e){var t=e.name,n=e.multiline,a="".concat(f.Z.comingSoonPanel," \n d-flex flex-column align-items-center justify-content-center px-3 text-center"),c="";return n?c+=" ".concat(f.Z.clamped," clamp-2"):(a+=" text-nowrap",c+=" text-truncate"),r.createElement("div",{className:a},r.createElement("small",{className:"text-muted"},r.createElement(s.x,{namespace:"shared.subjectWidgetItem",phrase:"comingSoon"})),r.createElement("p",{className:"".concat(f.Z.name," h6")},r.createElement("span",{className:c},t)))},p=function(e){var t=e.name,n=e.multiline,a=e.subtitle,c="px-3 d-flex flex-column justify-content-center",l="".concat(f.Z.name," h6");return n?l+=" clamp-3 text-start":(c+=" text-nowrap text-truncate",l+=" text-truncate mb-0 pb-1"),r.createElement("div",{className:c},a&&r.createElement("div",{className:"text-secondary clamp-1 ".concat(f.Z.text)},a),r.createElement("div",{className:l,title:t},t))};function h(e){var t=m.j.createUrl(e.coverUrl,{size:e.isLarge?u.h2.Medium:u.h2.Small}),n={name:e.data.name,multiline:e.isLarge||e.multiline,subtitle:e.subtitle};return r.createElement("div",{className:"border d-flex position-relative ".concat(e.className," ").concat(f.Z.widgetItem," ").concat(e.isSelected?"border-success border-2":""),id:"".concat(e.data.id,"-").concat(a.Y.getRandomInt())},e.isSelected&&r.createElement("div",{className:"".concat(f.Z.selectedMask," border-2")}),r.createElement("div",{className:"".concat(f.Z.imagePanel," ").concat(e.isLarge?f.Z.large:"")},e.isSelected&&!e.hideCheckmark&&r.createElement("div",{className:f.Z.selected},r.createElement(l.f,{svgName:d.vn.Check,svgSize:i.S.Large,textVariant:"white",variant:"green"})),r.createElement("div",{className:"".concat(f.Z.image," ").concat(e.imageClassName),style:e.coverUrl?{backgroundImage:"url('".concat(t,"')")}:{}}),!e.hideFallback&&r.createElement(o.oy,{type:o.mS.Subject,extraClasses:e.isLarge?f.Z.large:""})),e.isComingSoon?r.createElement(v,Object.assign({},n)):r.createElement(p,Object.assign({},n)))}function g(e){var t,n=e.getChildAppLink?e.getChildAppLink(e.data):null;return r.createElement(r.Fragment,null,n?r.createElement(c.F,{className:f.Z.appLink,appLink:n,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLinkOptions:null===(t=e.getChildAppLinkOptions)||void 0===t?void 0:t.call(e)},r.createElement(h,Object.assign({},e))):r.createElement(h,Object.assign({},e)))}},75919:(e,t,n)=>{n.d(t,{N:()=>c});var r=n(32735);const a={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function c(e){return r.createElement("div",{className:(t="d-flex align-items-center text-center position-relative w-100 ".concat(a.imageContainer),"center"===e.contentPosition&&(t+=" px-5 justify-content-center"),"right"===e.contentPosition&&(t+=" me-n5 justify-content-end"),t)},!!e.annotationUrl&&r.createElement("div",{className:function(){var t=a.annotation;switch(e.annotationPosition){case"top-left":t+=" ".concat(a.above," ").concat(a.left);break;case"top-right":t+=" ".concat(a.above," ").concat(a.right);break;case"bottom-left":t+=" ".concat(a.below," ").concat(a.left);break;case"bottom-right":t+=" ".concat(a.below," ").concat(a.right)}return e.annotationClassName&&(t+=" ".concat(e.annotationClassName)),t}()},r.createElement("img",{className:"img-fluid",src:e.annotationUrl})),e.children,"right"===e.contentPosition&&r.createElement("div",{className:a.divider}));var t}c.defaultProps={contentPosition:"center"}},39375:(e,t,n)=>{n.d(t,{Y:()=>u});var r=n(32735),a=n(54610),c=n(67453),l=n(2248);const o={magicTab:"H5jzm",subjectPlaceholder:"r1L6T",placeholderCover:"z9CFT",promotedTopicPlaceholder:"PbYs6",promotedTopicPlaceholderText:"hZ8Nf"};function i(e){return r.createElement("li",{className:"col-4"},r.createElement("div",{className:"d-flex border rounded-3 overflow-hidden ".concat(o.subjectPlaceholder)},e.coverUrl?r.createElement("div",{className:o.placeholderCover},r.createElement("img",{className:"img-fluid",src:c.j.createUrl(e.coverUrl,{size:a.h2.Small})})):r.createElement("div",{className:"".concat(o.placeholderCover," bg-light-blue")})))}function s(){return r.createElement("li",{className:"col-4"},r.createElement("div",{className:"bg-light-blue rounded-3 w-100 p-1 ".concat(o.promotedTopicPlaceholder)}))}function u(e){var t,n,a,c=Math.max(12-(null!==(n=null===(t=e.subjects)||void 0===t?void 0:t.length)&&void 0!==n?n:0),0);return r.createElement(l.L,{presentation:e.presentation,curriculum:e.curriculum,editingCurriculum:e.editingCurriculum},r.createElement("div",{className:"px-3 pt-3 w-100 d-flex flex-column align-items-center"},r.createElement("div",{className:"rounded-3 border overflow-hidden d-flex mb-2"},r.createElement("div",{className:"bg-light ".concat(o.magicTab)}),r.createElement("div",{className:"".concat(o.magicTab)})),r.createElement("ul",{className:"list-unstyled mb-0 row w-100 g-xl-2 g-lg-1 mb-2"},null===(a=e.subjects)||void 0===a?void 0:a.map((function(e){var t;return r.createElement(i,{key:e.id,coverUrl:null===(t=e.cover)||void 0===t?void 0:t.url})})),new Array(c).fill(0).map((function(e,t){return r.createElement(i,{key:t})}))),r.createElement("ul",{className:"list-unstyled mb-0 row w-100 g-xl-2 g-lg-1"},r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null))))}},2248:(e,t,n)=>{n.d(t,{L:()=>p});var r=n(32735),a=n(60376),c=n(83914),l=n(2786),o=n(83345),i=n(72639),s=n(79967),u=n(35223),m=n(10144);const d={dot:"AlRQD",logo:"L42gR",blackBar:"ESCxm",topNav:"a3G_4",leftNav:"YxGVV",belowHeader:"jc_cg",leftNavIcon:"U6i6r",leftNavText:"LnYlW",presentationPlaceholderIcon:"Ljaju",presentationIcon:"QdwPq",presentationPlaceholderText:"af06V",curriculumIcon:"N7T4T",curriculumIconSmall:"_6xrUg",curriculumContainer:"Z65qX",iconPlaceholder:"CKOXL",shadow:"zygeJ",presentationName:"Oj7Dt"};var f="onboarding.mockLayout";function v(){return r.createElement("div",{className:"d-flex align-items-center justify-content-center mb-2 px-3"},r.createElement("div",{className:"".concat(d.leftNavIcon," rounded-circle")}),r.createElement("div",{className:"".concat(d.leftNavText," rounded-pill")}))}function p(e){var t,n,p=(0,s.k)();return r.createElement("div",{className:"border border-dark border-2 bg-white rounded-3 user-select-none overflow-hidden position-relative h-100 w-100"},!!e.editingCurriculum&&r.createElement("div",{className:"w-100 h-100 position-absolute ".concat(d.shadow)},r.createElement("div",{className:"d-flex align-items-center h-100 w-50 ".concat(d.curriculumContainer)},r.createElement("div",{className:"bg-white rounded-3 border p-3 w-100"},r.createElement("h2",{className:"h6 text-start"},r.createElement(o.x,{namespace:f,phrase:"curriculum"})),e.curriculum?r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(d.curriculumIcon," rounded-circle me-2 border")},r.createElement(a.f,{imageUrl:null===(t=e.curriculum.cover)||void 0===t?void 0:t.url})),r.createElement("div",{className:"text-start"},e.curriculum.name)):r.createElement("div",{className:"d-flex align-items-center text-muted"},r.createElement("div",{className:"me-2 rounded-circle p-1 ".concat(d.iconPlaceholder)},r.createElement(a.f,{svgSize:c.S.Large,textVariant:"secondary",svgName:u.vn.GraduationCap})),r.createElement(o.x,{namespace:f,phrase:"selectCurriculum"}))))),r.createElement("div",{className:"bg-dark d-flex px-3 py-2 ".concat(d.blackBar)},r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle ".concat(d.dot)})),r.createElement("div",{className:"border-bottom px-3 py-2 d-flex align-items-center ".concat(d.topNav)},r.createElement("div",{className:"".concat(d.logo," me-4")},p.xs?r.createElement(l.bc,null):r.createElement(l.$S,null)),r.createElement("div",{className:"form-control w-75 d-flex justify-content-start"},r.createElement(c.x,{svgName:u.vn.Search})),!!e.curriculum&&r.createElement("div",{className:"".concat(d.curriculumIconSmall," rounded-circle ms-2 me-n1 border")},r.createElement(a.f,{imageUrl:null===(n=e.curriculum.cover)||void 0===n?void 0:n.url}))),r.createElement("div",{className:"d-flex ".concat(d.belowHeader)},r.createElement("div",{className:"".concat(d.leftNav," border-end")},r.createElement("div",{className:"d-flex flex-column pt-3 h-100"},r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement("div",{className:"d-flex align-items-end h-100 w-100"},r.createElement("div",{className:"border-top p-3 w-100"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(function(){if(!e.presentation)return d.presentationPlaceholderIcon;switch(m.i.getMappedPresentationLevel(e.presentation.learningLevel)){case i.p.Level_1:return"bg-indigo ".concat(d.presentationIcon);case i.p.Level_3:return"bg-blue ".concat(d.presentationIcon);default:case i.p.Level_2:return"bg-green ".concat(d.presentationIcon)}}()," text-white rounded")},r.createElement(c.x,{svgName:u.vn.School,size:c.S.Large})),e.presentation?r.createElement("span",{className:"fw-semibold text-truncate ".concat(d.presentationName)},e.presentation.name):r.createElement("div",{className:"".concat(d.presentationPlaceholderText," fw-semibold")},r.createElement(o.x,{namespace:f,phrase:"schoolLevel"}))))))),r.createElement("div",{className:"w-100 h-100 overflow-hidden"},e.children)))}},59158:(e,t,n)=>{n.r(t),n.d(t,{OnboardingSubjectsView:()=>G});var r=n(32735),a=n(23481),c=n(20354),l=n(65858),o=n(60736),i=n(45716),s=n(2158),u=n(49602),m=n(11607),d=n(83345),f=n(2192),v=n(54610),p=n(77963),h=n(65728),g=n(61699),b=n(31949),y=n(84703),E=n(37802),N=n(67453),x=n(10144),w=n(99742),S=n(82817),j=n(86698),L=n(75359),k=n(12058),A=n(40695),P=n(75919),C=n(39375),I=n(73190),O=n(90815),T=n(67963);const _={selected:"igx0Y",disabled:"nDUWB",annotation:"IN0vA"};function U(e){return U="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},U(e)}function B(){B=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",o=c.asyncIterator||"@@asyncIterator",i=c.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var c=t&&t.prototype instanceof g?t:g,l=Object.create(c.prototype),o=new C(r||[]);return a(l,"_invoke",{value:L(e,n,o)}),l}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",f="suspendedYield",v="executing",p="completed",h={};function g(){}function b(){}function y(){}var E={};s(E,l,(function(){return this}));var N=Object.getPrototypeOf,x=N&&N(N(I([])));x&&x!==n&&r.call(x,l)&&(E=x);var w=y.prototype=g.prototype=Object.create(E);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(a,c,l,o){var i=m(e[a],e,c);if("throw"!==i.type){var s=i.arg,u=s.value;return u&&"object"==U(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,l,o)}),(function(e){n("throw",e,l,o)})):t.resolve(u).then((function(e){s.value=e,l(s)}),(function(e){return n("throw",e,l,o)}))}o(i.arg)}var c;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return c=c?c.then(a,a):a()}})}function L(t,n,r){var a=d;return function(c,l){if(a===v)throw new Error("Generator is already running");if(a===p){if("throw"===c)throw l;return{value:e,done:!0}}for(r.method=c,r.arg=l;;){var o=r.delegate;if(o){var i=k(o,r);if(i){if(i===h)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var s=m(t,n,r);if("normal"===s.type){if(a=r.done?p:f,s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=p,r.method="throw",r.arg=s.arg)}}}function k(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var c=m(a,t.iterator,n.arg);if("throw"===c.type)return n.method="throw",n.arg=c.arg,n.delegate=null,h;var l=c.arg;return l?l.done?(n[t.resultName]=l.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):l:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,c=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return c.next=c}}throw new TypeError(U(t)+" is not iterable")}return b.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,i,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,i,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},S(j.prototype),s(j.prototype,o,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,a,c){void 0===c&&(c=Promise);var l=new j(u(e,n,r,a),c);return t.isGeneratorFunction(n)?l:l.next().then((function(e){return e.done?e.value:l.next()}))},S(w),s(w,i,"Generator"),s(w,l,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return o.type="throw",o.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var c=this.tryEntries.length-1;c>=0;--c){var l=this.tryEntries[c],o=l.completion;if("root"===l.tryLoc)return a("end");if(l.tryLoc<=this.prev){var i=r.call(l,"catchLoc"),s=r.call(l,"finallyLoc");if(i&&s){if(this.prev<l.catchLoc)return a(l.catchLoc,!0);if(this.prev<l.finallyLoc)return a(l.finallyLoc)}else if(i){if(this.prev<l.catchLoc)return a(l.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return a(l.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var c=a;break}}c&&("break"===e||"continue"===e)&&c.tryLoc<=t&&t<=c.finallyLoc&&(c=null);var l=c?c.completion:{};return l.type=e,l.arg=t,c?(this.method="next",this.next=c.finallyLoc,h):this.complete(l)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;P(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}function F(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){var r,a,c,l,o=[],i=!0,s=!1;try{if(c=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=c.call(n)).done)&&(o.push(r.value),o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Z(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)?Z(e,t):void 0}}(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 Z(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 z=function(e,t,n,r){return new(n||(n=Promise))((function(a,c){function l(e){try{i(r.next(e))}catch(e){c(e)}}function o(e){try{i(r.throw(e))}catch(e){c(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))},M="onboarding.subjects";function G(){var e,t=(0,T.u)(),n=(0,s.T)(t).getPathway,U=c.a.useBasicFetch(b.N.currentUser()),Z=(0,j.y)().preferredPresentation,G=c.a.useGetFetchAsync(),R=(0,I.Q)(),V=R.onClickBack,D=R.exitOnboarding,Y=R.onSaveError,H=R.completeStepAsync,W=(0,S.M)().activeCurriculum,J=(0,O.H)().logEvent,Q=n(),X=i.H[Q.currentScreen],q=(0,E.r)(null==X?void 0:X.analyticsLocation),K=q.updateSettingAsync,$=q.bulkOnboardingPreferencesState,ee=c.a.useBasicFetch(g.o.allSubjectPreferences()),te=c.a.useBasicFetch(g.o.mySubjectPreferences()),ne=u.b.hasBulkSelectedTopics($),re=F(r.useState([]),2),ae=re[0],ce=re[1],le=F(r.useState(ne),2),oe=le[0],ie=le[1],se=(0,y.n)(),ue=null===(e=ee.data)||void 0===e?void 0:e.filter((function(e){var t;return!!(null===(t=o.A[e.presentationId])||void 0===t?void 0:t[e.id])}));return r.useEffect((function(){var e;te.hasCompleted&&(null===(e=te.data)||void 0===e?void 0:e.length)&&(oe||ce(te.data))}),[te.hasCompleted]),r.createElement(A.z,{namespace:M},r.createElement(A.z.Left,{className:"bg-dark-blue d-flex flex-column align-items-end justify-content-center"},r.createElement(P.N,{annotationUrl:w.W.OnboardingV2.Subjects.ANNOTATION,annotationPosition:"top-right",annotationClassName:"me-5 ".concat(_.annotation)},r.createElement(C.Y,{presentation:Z,subjects:oe?ue:ae,curriculum:W}))),r.createElement(A.z.Right,{hasCustomButtons:!1,onClickNext:function(){return z(this,void 0,void 0,B().mark((function e(){var t,n,r;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return J(l.Vw.Click,l.Ix.Next,{subjects:ae.map((function(e){return{subjectId:e.id,subjectName:e.name}})),allSubjectsSelected:oe,presentationId:Z.id,presentationName:Z.name,presentationDescription:Z.description}),e.prev=1,t=[],oe!==ne&&t.push(K(U.data.id,{name:h.E.BulkOnboardingPreferencesState,value:u.b.getNextBulkState($,"topics"),kind:p.g.Permanent})),oe||(n=ae.filter((function(e){return!te.data.find((function(t){return t.id===e.id}))})),r=te.data.filter((function(e){return!ae.find((function(t){return t.id===e.id}))})),(null==n?void 0:n.length)&&t.push(G(g.o.followSubjects(n.map((function(e){return e.id}))))),(null==r?void 0:r.length)&&t.push(G(g.o.unfollowSubjects(r.map((function(e){return e.id})))))),e.next=7,Promise.all(t);case 7:return e.next=9,H();case 9:e.next=15;break;case 11:return e.prev=11,e.t0=e.catch(1),Y(),e.abrupt("return",Promise.reject());case 15:case"end":return e.stop()}}),e,null,[[1,11]])})))},onClickBack:V,onClickComeBackLater:D,disableNext:!ae.length&&!oe},r.createElement(L.W,null,r.createElement(d.x,{phrase:se?"headingKdm":"heading"})),r.createElement(k.X,null,r.createElement(d.x,{phrase:"info"})),r.createElement(m.L,{onClick:function(){J(l.Vw.Select,l.Ix.SelectAllSubjects,{presentationId:Z.id,presentationName:Z.name,presentationDescription:Z.description}),oe||ce([]),ie(!oe)}},r.createElement(f.M,{data:{name:a.T.getPhrase(M,"allSubjects")},coverUrl:x.i.getPresentationLevelImage(Z.learningLevel,"cover"),isSelected:oe,multiline:!0})),r.createElement("div",{className:"d-flex align-items-center justify-content-between py-3"},r.createElement("hr",{className:"m-0 flex-grow-1 border-dark"}),r.createElement("p",{className:"mb-0 px-3"},r.createElement(d.x,{phrase:"orSelectSubjects"})),r.createElement("hr",{className:"m-0 flex-grow-1 border-dark"})),r.createElement("ul",{className:"list-unstyled row g-2 mb-0"},null==ue?void 0:ue.map((function(e){var t,n=!!ae.find((function(t){return t.id===e.id})),a="";return oe?a+="cursor-default ".concat(_.disabled):n&&(a+=_.selected),r.createElement("li",{key:e.id,className:"col-12 col-sm-6 col-md-6 col-lg-12 col-xl-6"},r.createElement(m.L,{onClick:function(){return function(e){oe||(J(l.Vw.Select,l.Ix.SelectSubject,{subjectId:e.id,subjectName:e.name,presentationId:Z.id,presentationName:Z.name,presentationDescription:Z.description}),ae.find((function(t){return t.id===e.id}))?ce(ae.filter((function(t){return t.id!==e.id}))):ce(ae.concat(e)))}(e)},disabled:oe,className:a},r.createElement(f.M,{data:e,coverUrl:N.j.createUrl(null===(t=e.cover)||void 0===t?void 0:t.url,{size:v.h2.Small}),isSelected:n,multiline:!0})))}))),r.createElement(k.X,{className:"mt-2"},r.createElement(d.x,{phrase:"addMoreLater"}))))}},92038:(e,t,n)=>{n.d(t,{Z:()=>r});const r={appLink:"fFjKN",name:"A_by9",selectedMask:"xSQtR",widgetItem:"Ys9W_",text:"JfAoy",imagePanel:"aUNDc",partialLargeImage:"RuLxv",selected:"BViJb",image:"LkTep",dragHandle:"CJqvP",large:"R5clw",comingSoonPanel:"Wa2PG",editSubjectsItem:"gGNFD",allSubjectsItem:"IHdlJ",logoContainer:"Nzaes",draggingItem:"zUOye",partialLargeFallback:"FmJP9",partialIcon:"sdZuo"}}}]);
|
|
1
|
+
/*! For license information please see 841-47328371aa-lite.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[841],{49602:(e,t,n)=>{var r;n.d(t,{b:()=>c}),function(e){e[e.None=0]="None",e[e.AllSubjects=1]="AllSubjects",e[e.AllLevels=2]="AllLevels",e[e.AllSubjectsAndAllLevels=3]="AllSubjectsAndAllLevels"}(r||(r={}));var a=n(25925),c={hasManyPresentationTypes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0,n=0;return null==e||e.forEach((function(e){e.type===a.R.Subject?t++:e.type===a.R.Curriculum&&n++})),{hasManySubjectPresentations:t>1,hasManyCurriculumPresentations:n>1}},getBulkPreferencesState:function(e){return e===r.AllSubjectsAndAllLevels?{levels:!0,subjects:!0}:{levels:e===r.AllLevels,subjects:e===r.AllSubjects}},hasBulkSelectedLevels:function(e){return e===r.AllLevels||e===r.AllSubjectsAndAllLevels},hasBulkSelectedTopics:function(e){return e===r.AllSubjects||e===r.AllSubjectsAndAllLevels},getNextBulkState:function(e,t){var n=r.None,a=r.AllSubjects,c=r.AllLevels,l=r.AllSubjectsAndAllLevels,o="topics"===t;switch(e){case n:default:return o?a:c;case a:return o?n:l;case c:return o?l:n;case l:return o?c:a}}}},2192:(e,t,n)=>{n.d(t,{M:()=>h,Q:()=>g});var r=n(32735),a=n(45157),c=n(36848),l=n(60376),o=n(5465),i=n(83914),s=n(83345),u=n(54610),m=n(67453),d=n(35223),f=n(92038),v=function(e){var t=e.name,n=e.multiline,a="".concat(f.Z.comingSoonPanel," \n d-flex flex-column align-items-center justify-content-center px-3 text-center"),c="";return n?c+=" ".concat(f.Z.clamped," clamp-2"):(a+=" text-nowrap",c+=" text-truncate"),r.createElement("div",{className:a},r.createElement("small",{className:"text-muted"},r.createElement(s.x,{namespace:"shared.subjectWidgetItem",phrase:"comingSoon"})),r.createElement("p",{className:"".concat(f.Z.name," h6")},r.createElement("span",{className:c},t)))},p=function(e){var t=e.name,n=e.multiline,a=e.subtitle,c="px-3 d-flex flex-column justify-content-center",l="".concat(f.Z.name," h6");return n?l+=" clamp-3 text-start":(c+=" text-nowrap text-truncate",l+=" text-truncate mb-0 pb-1"),r.createElement("div",{className:c},a&&r.createElement("div",{className:"text-secondary clamp-1 ".concat(f.Z.text)},a),r.createElement("div",{className:l,title:t},t))};function h(e){var t=m.j.createUrl(e.coverUrl,{size:e.isLarge?u.h2.Medium:u.h2.Small}),n={name:e.data.name,multiline:e.isLarge||e.multiline,subtitle:e.subtitle};return r.createElement("div",{className:"border d-flex position-relative ".concat(e.className," ").concat(f.Z.widgetItem," ").concat(e.isSelected?"border-success border-2":""),id:"".concat(e.data.id,"-").concat(a.Y.getRandomInt())},e.isSelected&&r.createElement("div",{className:"".concat(f.Z.selectedMask," border-2")}),r.createElement("div",{className:"".concat(f.Z.imagePanel," ").concat(e.isLarge?f.Z.large:"")},e.isSelected&&!e.hideCheckmark&&r.createElement("div",{className:f.Z.selected},r.createElement(l.f,{svgName:d.vn.Check,svgSize:i.S.Large,textVariant:"white",variant:"green"})),r.createElement("div",{className:"".concat(f.Z.image," ").concat(e.imageClassName),style:e.coverUrl?{backgroundImage:"url('".concat(t,"')")}:{}}),!e.hideFallback&&r.createElement(o.oy,{type:o.mS.Subject,extraClasses:e.isLarge?f.Z.large:""})),e.isComingSoon?r.createElement(v,Object.assign({},n)):r.createElement(p,Object.assign({},n)))}function g(e){var t,n=e.getChildAppLink?e.getChildAppLink(e.data):null;return r.createElement(r.Fragment,null,n?r.createElement(c.F,{className:f.Z.appLink,appLink:n,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLinkOptions:null===(t=e.getChildAppLinkOptions)||void 0===t?void 0:t.call(e)},r.createElement(h,Object.assign({},e))):r.createElement(h,Object.assign({},e)))}},75919:(e,t,n)=>{n.d(t,{N:()=>c});var r=n(32735);const a={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function c(e){return r.createElement("div",{className:(t="d-flex align-items-center text-center position-relative w-100 ".concat(a.imageContainer),"center"===e.contentPosition&&(t+=" px-5 justify-content-center"),"right"===e.contentPosition&&(t+=" me-n5 justify-content-end"),t)},!!e.annotationUrl&&r.createElement("div",{className:function(){var t=a.annotation;switch(e.annotationPosition){case"top-left":t+=" ".concat(a.above," ").concat(a.left);break;case"top-right":t+=" ".concat(a.above," ").concat(a.right);break;case"bottom-left":t+=" ".concat(a.below," ").concat(a.left);break;case"bottom-right":t+=" ".concat(a.below," ").concat(a.right)}return e.annotationClassName&&(t+=" ".concat(e.annotationClassName)),t}()},r.createElement("img",{className:"img-fluid",src:e.annotationUrl})),e.children,"right"===e.contentPosition&&r.createElement("div",{className:a.divider}));var t}c.defaultProps={contentPosition:"center"}},39375:(e,t,n)=>{n.d(t,{Y:()=>u});var r=n(32735),a=n(54610),c=n(67453),l=n(2248);const o={magicTab:"H5jzm",subjectPlaceholder:"r1L6T",placeholderCover:"z9CFT",promotedTopicPlaceholder:"PbYs6",promotedTopicPlaceholderText:"hZ8Nf"};function i(e){return r.createElement("li",{className:"col-4"},r.createElement("div",{className:"d-flex border rounded-3 overflow-hidden ".concat(o.subjectPlaceholder)},e.coverUrl?r.createElement("div",{className:o.placeholderCover},r.createElement("img",{className:"img-fluid",src:c.j.createUrl(e.coverUrl,{size:a.h2.Small})})):r.createElement("div",{className:"".concat(o.placeholderCover," bg-light-blue")})))}function s(){return r.createElement("li",{className:"col-4"},r.createElement("div",{className:"bg-light-blue rounded-3 w-100 p-1 ".concat(o.promotedTopicPlaceholder)}))}function u(e){var t,n,a,c=Math.max(12-(null!==(n=null===(t=e.subjects)||void 0===t?void 0:t.length)&&void 0!==n?n:0),0);return r.createElement(l.L,{presentation:e.presentation,curriculum:e.curriculum,editingCurriculum:e.editingCurriculum},r.createElement("div",{className:"px-3 pt-3 w-100 d-flex flex-column align-items-center"},r.createElement("div",{className:"rounded-3 border overflow-hidden d-flex mb-2"},r.createElement("div",{className:"bg-light ".concat(o.magicTab)}),r.createElement("div",{className:"".concat(o.magicTab)})),r.createElement("ul",{className:"list-unstyled mb-0 row w-100 g-xl-2 g-lg-1 mb-2"},null===(a=e.subjects)||void 0===a?void 0:a.map((function(e){var t;return r.createElement(i,{key:e.id,coverUrl:null===(t=e.cover)||void 0===t?void 0:t.url})})),new Array(c).fill(0).map((function(e,t){return r.createElement(i,{key:t})}))),r.createElement("ul",{className:"list-unstyled mb-0 row w-100 g-xl-2 g-lg-1"},r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null))))}},2248:(e,t,n)=>{n.d(t,{L:()=>p});var r=n(32735),a=n(60376),c=n(83914),l=n(2786),o=n(83345),i=n(72639),s=n(79967),u=n(35223),m=n(10144);const d={dot:"AlRQD",logo:"L42gR",blackBar:"ESCxm",topNav:"a3G_4",leftNav:"YxGVV",belowHeader:"jc_cg",leftNavIcon:"U6i6r",leftNavText:"LnYlW",presentationPlaceholderIcon:"Ljaju",presentationIcon:"QdwPq",presentationPlaceholderText:"af06V",curriculumIcon:"N7T4T",curriculumIconSmall:"_6xrUg",curriculumContainer:"Z65qX",iconPlaceholder:"CKOXL",shadow:"zygeJ",presentationName:"Oj7Dt"};var f="onboarding.mockLayout";function v(){return r.createElement("div",{className:"d-flex align-items-center justify-content-center mb-2 px-3"},r.createElement("div",{className:"".concat(d.leftNavIcon," rounded-circle")}),r.createElement("div",{className:"".concat(d.leftNavText," rounded-pill")}))}function p(e){var t,n,p=(0,s.k)();return r.createElement("div",{className:"border border-dark border-2 bg-white rounded-3 user-select-none overflow-hidden position-relative h-100 w-100"},!!e.editingCurriculum&&r.createElement("div",{className:"w-100 h-100 position-absolute ".concat(d.shadow)},r.createElement("div",{className:"d-flex align-items-center h-100 w-50 ".concat(d.curriculumContainer)},r.createElement("div",{className:"bg-white rounded-3 border p-3 w-100"},r.createElement("h2",{className:"h6 text-start"},r.createElement(o.x,{namespace:f,phrase:"curriculum"})),e.curriculum?r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(d.curriculumIcon," rounded-circle me-2 border")},r.createElement(a.f,{imageUrl:null===(t=e.curriculum.cover)||void 0===t?void 0:t.url})),r.createElement("div",{className:"text-start"},e.curriculum.name)):r.createElement("div",{className:"d-flex align-items-center text-muted"},r.createElement("div",{className:"me-2 rounded-circle p-1 ".concat(d.iconPlaceholder)},r.createElement(a.f,{svgSize:c.S.Large,textVariant:"secondary",svgName:u.vn.GraduationCap})),r.createElement(o.x,{namespace:f,phrase:"selectCurriculum"}))))),r.createElement("div",{className:"bg-dark d-flex px-3 py-2 ".concat(d.blackBar)},r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle ".concat(d.dot)})),r.createElement("div",{className:"border-bottom px-3 py-2 d-flex align-items-center ".concat(d.topNav)},r.createElement("div",{className:"".concat(d.logo," me-4")},p.xs?r.createElement(l.bc,null):r.createElement(l.$S,null)),r.createElement("div",{className:"form-control w-75 d-flex justify-content-start"},r.createElement(c.x,{svgName:u.vn.Search})),!!e.curriculum&&r.createElement("div",{className:"".concat(d.curriculumIconSmall," rounded-circle ms-2 me-n1 border")},r.createElement(a.f,{imageUrl:null===(n=e.curriculum.cover)||void 0===n?void 0:n.url}))),r.createElement("div",{className:"d-flex ".concat(d.belowHeader)},r.createElement("div",{className:"".concat(d.leftNav," border-end")},r.createElement("div",{className:"d-flex flex-column pt-3 h-100"},r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement("div",{className:"d-flex align-items-end h-100 w-100"},r.createElement("div",{className:"border-top p-3 w-100"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(function(){if(!e.presentation)return d.presentationPlaceholderIcon;switch(m.i.getMappedPresentationLevel(e.presentation.learningLevel)){case i.p.Level_1:return"bg-indigo ".concat(d.presentationIcon);case i.p.Level_3:return"bg-blue ".concat(d.presentationIcon);default:case i.p.Level_2:return"bg-green ".concat(d.presentationIcon)}}()," text-white rounded")},r.createElement(c.x,{svgName:u.vn.School,size:c.S.Large})),e.presentation?r.createElement("span",{className:"fw-semibold text-truncate ".concat(d.presentationName)},e.presentation.name):r.createElement("div",{className:"".concat(d.presentationPlaceholderText," fw-semibold")},r.createElement(o.x,{namespace:f,phrase:"schoolLevel"}))))))),r.createElement("div",{className:"w-100 h-100 overflow-hidden"},e.children)))}},59158:(e,t,n)=>{n.r(t),n.d(t,{OnboardingSubjectsView:()=>G});var r=n(32735),a=n(23481),c=n(20354),l=n(65858),o=n(60736),i=n(45716),s=n(2158),u=n(49602),m=n(11607),d=n(83345),f=n(2192),v=n(54610),p=n(77963),h=n(65728),g=n(61699),b=n(31949),y=n(84703),E=n(37802),N=n(67453),x=n(10144),w=n(99742),S=n(82817),j=n(86698),L=n(75359),k=n(12058),A=n(40695),P=n(75919),C=n(39375),I=n(73190),O=n(90815),T=n(67963);const _={selected:"igx0Y",disabled:"nDUWB",annotation:"IN0vA"};function U(e){return U="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},U(e)}function B(){B=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",o=c.asyncIterator||"@@asyncIterator",i=c.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var c=t&&t.prototype instanceof g?t:g,l=Object.create(c.prototype),o=new C(r||[]);return a(l,"_invoke",{value:L(e,n,o)}),l}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",f="suspendedYield",v="executing",p="completed",h={};function g(){}function b(){}function y(){}var E={};s(E,l,(function(){return this}));var N=Object.getPrototypeOf,x=N&&N(N(I([])));x&&x!==n&&r.call(x,l)&&(E=x);var w=y.prototype=g.prototype=Object.create(E);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(a,c,l,o){var i=m(e[a],e,c);if("throw"!==i.type){var s=i.arg,u=s.value;return u&&"object"==U(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,l,o)}),(function(e){n("throw",e,l,o)})):t.resolve(u).then((function(e){s.value=e,l(s)}),(function(e){return n("throw",e,l,o)}))}o(i.arg)}var c;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return c=c?c.then(a,a):a()}})}function L(t,n,r){var a=d;return function(c,l){if(a===v)throw new Error("Generator is already running");if(a===p){if("throw"===c)throw l;return{value:e,done:!0}}for(r.method=c,r.arg=l;;){var o=r.delegate;if(o){var i=k(o,r);if(i){if(i===h)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var s=m(t,n,r);if("normal"===s.type){if(a=r.done?p:f,s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=p,r.method="throw",r.arg=s.arg)}}}function k(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var c=m(a,t.iterator,n.arg);if("throw"===c.type)return n.method="throw",n.arg=c.arg,n.delegate=null,h;var l=c.arg;return l?l.done?(n[t.resultName]=l.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):l:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,c=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return c.next=c}}throw new TypeError(U(t)+" is not iterable")}return b.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,i,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,i,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},S(j.prototype),s(j.prototype,o,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,a,c){void 0===c&&(c=Promise);var l=new j(u(e,n,r,a),c);return t.isGeneratorFunction(n)?l:l.next().then((function(e){return e.done?e.value:l.next()}))},S(w),s(w,i,"Generator"),s(w,l,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return o.type="throw",o.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var c=this.tryEntries.length-1;c>=0;--c){var l=this.tryEntries[c],o=l.completion;if("root"===l.tryLoc)return a("end");if(l.tryLoc<=this.prev){var i=r.call(l,"catchLoc"),s=r.call(l,"finallyLoc");if(i&&s){if(this.prev<l.catchLoc)return a(l.catchLoc,!0);if(this.prev<l.finallyLoc)return a(l.finallyLoc)}else if(i){if(this.prev<l.catchLoc)return a(l.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return a(l.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var c=a;break}}c&&("break"===e||"continue"===e)&&c.tryLoc<=t&&t<=c.finallyLoc&&(c=null);var l=c?c.completion:{};return l.type=e,l.arg=t,c?(this.method="next",this.next=c.finallyLoc,h):this.complete(l)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;P(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}function F(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){var r,a,c,l,o=[],i=!0,s=!1;try{if(c=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=c.call(n)).done)&&(o.push(r.value),o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Z(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)?Z(e,t):void 0}}(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 Z(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 z=function(e,t,n,r){return new(n||(n=Promise))((function(a,c){function l(e){try{i(r.next(e))}catch(e){c(e)}}function o(e){try{i(r.throw(e))}catch(e){c(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))},M="onboarding.subjects";function G(e){var t,n=(0,T.u)(),U=(0,s.T)(n).getPathway,Z=c.a.useBasicFetch(b.N.currentUser()),G=(0,j.y)().preferredPresentation,R=c.a.useGetFetchAsync(),V=(0,I.Q)(e.redirectUrl),D=V.onClickBack,Y=V.exitOnboarding,H=V.onSaveError,W=V.completeStepAsync,J=(0,S.M)().activeCurriculum,Q=(0,O.H)().logEvent,X=U(),q=i.H[X.currentScreen],K=(0,E.r)(null==q?void 0:q.analyticsLocation),$=K.updateSettingAsync,ee=K.bulkOnboardingPreferencesState,te=c.a.useBasicFetch(g.o.allSubjectPreferences()),ne=c.a.useBasicFetch(g.o.mySubjectPreferences()),re=u.b.hasBulkSelectedTopics(ee),ae=F(r.useState([]),2),ce=ae[0],le=ae[1],oe=F(r.useState(re),2),ie=oe[0],se=oe[1],ue=(0,y.n)(),me=null===(t=te.data)||void 0===t?void 0:t.filter((function(e){var t;return!!(null===(t=o.A[e.presentationId])||void 0===t?void 0:t[e.id])}));return r.useEffect((function(){var e;ne.hasCompleted&&(null===(e=ne.data)||void 0===e?void 0:e.length)&&(ie||le(ne.data))}),[ne.hasCompleted]),r.createElement(A.z,{namespace:M},r.createElement(A.z.Left,{className:"bg-dark-blue d-flex flex-column align-items-end justify-content-center"},r.createElement(P.N,{annotationUrl:w.W.OnboardingV2.Subjects.ANNOTATION,annotationPosition:"top-right",annotationClassName:"me-5 ".concat(_.annotation)},r.createElement(C.Y,{presentation:G,subjects:ie?me:ce,curriculum:J}))),r.createElement(A.z.Right,{hasCustomButtons:!1,onClickNext:function(){return z(this,void 0,void 0,B().mark((function e(){var t,n,r;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Q(l.Vw.Click,l.Ix.Next,{subjects:ce.map((function(e){return{subjectId:e.id,subjectName:e.name}})),allSubjectsSelected:ie,presentationId:G.id,presentationName:G.name,presentationDescription:G.description}),e.prev=1,t=[],ie!==re&&t.push($(Z.data.id,{name:h.E.BulkOnboardingPreferencesState,value:u.b.getNextBulkState(ee,"topics"),kind:p.g.Permanent})),ie||(n=ce.filter((function(e){return!ne.data.find((function(t){return t.id===e.id}))})),r=ne.data.filter((function(e){return!ce.find((function(t){return t.id===e.id}))})),(null==n?void 0:n.length)&&t.push(R(g.o.followSubjects(n.map((function(e){return e.id}))))),(null==r?void 0:r.length)&&t.push(R(g.o.unfollowSubjects(r.map((function(e){return e.id})))))),e.next=7,Promise.all(t);case 7:return e.next=9,W();case 9:e.next=15;break;case 11:return e.prev=11,e.t0=e.catch(1),H(),e.abrupt("return",Promise.reject());case 15:case"end":return e.stop()}}),e,null,[[1,11]])})))},onClickBack:D,onClickComeBackLater:Y,disableNext:!ce.length&&!ie},r.createElement(L.W,null,r.createElement(d.x,{phrase:ue?"headingKdm":"heading"})),r.createElement(k.X,null,r.createElement(d.x,{phrase:"info"})),r.createElement(m.L,{onClick:function(){Q(l.Vw.Select,l.Ix.SelectAllSubjects,{presentationId:G.id,presentationName:G.name,presentationDescription:G.description}),ie||le([]),se(!ie)}},r.createElement(f.M,{data:{name:a.T.getPhrase(M,"allSubjects")},coverUrl:x.i.getPresentationLevelImage(G.learningLevel,"cover"),isSelected:ie,multiline:!0})),r.createElement("div",{className:"d-flex align-items-center justify-content-between py-3"},r.createElement("hr",{className:"m-0 flex-grow-1 border-dark"}),r.createElement("p",{className:"mb-0 px-3"},r.createElement(d.x,{phrase:"orSelectSubjects"})),r.createElement("hr",{className:"m-0 flex-grow-1 border-dark"})),r.createElement("ul",{className:"list-unstyled row g-2 mb-0"},null==me?void 0:me.map((function(e){var t,n=!!ce.find((function(t){return t.id===e.id})),a="";return ie?a+="cursor-default ".concat(_.disabled):n&&(a+=_.selected),r.createElement("li",{key:e.id,className:"col-12 col-sm-6 col-md-6 col-lg-12 col-xl-6"},r.createElement(m.L,{onClick:function(){return function(e){ie||(Q(l.Vw.Select,l.Ix.SelectSubject,{subjectId:e.id,subjectName:e.name,presentationId:G.id,presentationName:G.name,presentationDescription:G.description}),ce.find((function(t){return t.id===e.id}))?le(ce.filter((function(t){return t.id!==e.id}))):le(ce.concat(e)))}(e)},disabled:ie,className:a},r.createElement(f.M,{data:e,coverUrl:N.j.createUrl(null===(t=e.cover)||void 0===t?void 0:t.url,{size:v.h2.Small}),isSelected:n,multiline:!0})))}))),r.createElement(k.X,{className:"mt-2"},r.createElement(d.x,{phrase:"addMoreLater"}))))}},92038:(e,t,n)=>{n.d(t,{Z:()=>r});const r={appLink:"fFjKN",name:"A_by9",selectedMask:"xSQtR",widgetItem:"Ys9W_",text:"JfAoy",imagePanel:"aUNDc",partialLargeImage:"RuLxv",selected:"BViJb",image:"LkTep",dragHandle:"CJqvP",large:"R5clw",comingSoonPanel:"Wa2PG",editSubjectsItem:"gGNFD",allSubjectsItem:"IHdlJ",logoContainer:"Nzaes",draggingItem:"zUOye",partialLargeFallback:"FmJP9",partialIcon:"sdZuo"}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 9173-
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[9173],{75919:(t,e,n)=>{n.d(e,{N:()=>i});var r=n(32735);const o={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function i(t){return r.createElement("div",{className:(e="d-flex align-items-center text-center position-relative w-100 ".concat(o.imageContainer),"center"===t.contentPosition&&(e+=" px-5 justify-content-center"),"right"===t.contentPosition&&(e+=" me-n5 justify-content-end"),e)},!!t.annotationUrl&&r.createElement("div",{className:function(){var e=o.annotation;switch(t.annotationPosition){case"top-left":e+=" ".concat(o.above," ").concat(o.left);break;case"top-right":e+=" ".concat(o.above," ").concat(o.right);break;case"bottom-left":e+=" ".concat(o.below," ").concat(o.left);break;case"bottom-right":e+=" ".concat(o.below," ").concat(o.right)}return t.annotationClassName&&(e+=" ".concat(t.annotationClassName)),e}()},r.createElement("img",{className:"img-fluid",src:t.annotationUrl})),t.children,"right"===t.contentPosition&&r.createElement("div",{className:o.divider}));var e}i.defaultProps={contentPosition:"center"}},68276:(t,e,n)=>{n.r(e),n.d(e,{OnboardingUsageIntentionView:()=>I});var r=n(32735),o=n(23481),i=n(65858),a=n(38304),c=n(83345),s=n(84703),l=n(99742),u=n(75359),f=n(11607);const h={icon:"ohit6",description:"DmrW6",option:"KOzYf"};function m(t){return r.createElement("ul",{className:"list-unstyled mb-0"},t.options.map((function(e){return r.createElement("li",{key:e.id,className:"".concat(h.option," mb-2 border border-2 rounded-3 ").concat(t.selection===e.id?"border-dark bg-light-blue":"border-transparent")},r.createElement(f.L,{onClick:function(){return t.setSelection(e.id)},className:"d-flex align-items-center p-2"},r.createElement("div",{className:"rounded border border-dark ".concat(e.colourClass," ").concat(h.icon)},r.createElement("img",{src:e.imageUrl,className:"img-fluid"})),r.createElement("div",null,r.createElement("h2",{className:"mb-1 h6"},e.title),r.createElement("p",{className:"mb-0 ".concat(h.description)},e.description))))})))}var p=n(12058),d=n(40695),g=n(75919),y=n(73190),v=n(90815);const b={notSureImage:"MuA8k",searchVideoImage:"d82DS",searchVideoAnnotation:"BxbBK",browseTopicsAnnotation:"hwc8g",notSureAnnotation:"PwDKP",supportTeachersAnnotation:"odEci"};function E(t){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(t)}function O(){O=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new k(r||[]);return o(a,"_invoke",{value:x(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var h="suspendedStart",m="suspendedYield",p="executing",d="completed",g={};function y(){}function v(){}function b(){}var w={};l(w,a,(function(){return this}));var N=Object.getPrototypeOf,S=N&&N(N(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var _=b.prototype=y.prototype=Object.create(w);function I(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==E(u)&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(u).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function x(e,n,r){var o=h;return function(i,a){if(o===p)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=U(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=f(e,n,r);if("normal"===l.type){if(o=r.done?d:m,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=d,r.method="throw",r.arg=l.arg)}}}function U(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,U(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(E(e)+" is not iterable")}return v.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=l(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},I(C.prototype),l(C.prototype,c,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new C(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},I(_),l(_,s,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var N=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},S="onboarding.usageIntention",_=o.T.encloseNamespace(S);function I(){var t,e,n=(0,y.Q)(),o=n.onClickBack,f=n.exitOnboarding,h=n.completeStepAsync,E=n.onSaveError,I=(0,v.H)().logEvent,C=a.m.getUsageIntention(),x=(t=r.useState(C),e=2,function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){l=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(t,e):void 0}}(t,e)||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.")}()),U=x[0],T=x[1],A=(0,s.n)(),k=function(){var t=[{id:"search-video",imageUrl:l.W.OnboardingV2.UsageIntention.SEARCH_VIDEO_ICON,colourClass:"bg-blue",title:_("searchVideoTitle"),description:_("searchVideoDescription")},{id:"browse-topics",imageUrl:l.W.OnboardingV2.UsageIntention.BROWSE_TOPICS_ICON,colourClass:"bg-yellow",title:_("browseTopicsTitle"),description:_("browseTopicsDescription")}];return A&&t.push({id:"support-teachers",imageUrl:l.W.OnboardingV2.UsageIntention.SUPPORT_TEACHERS_ICON,colourClass:"bg-green",title:_("supportTeachersTitle"),description:_("supportTeachersDescription")}),t.push({id:"not-sure",imageUrl:l.W.OnboardingV2.UsageIntention.NOT_SURE_ICON,colourClass:"bg-indigo",title:_("notSureTitle"),description:_("notSureDescription")}),t}();return r.createElement(d.z,{namespace:S},r.createElement(d.z.Left,{className:"bg-dark-blue d-flex align-items-center"},("search-video"===U||!U)&&r.createElement(g.N,{annotationUrl:l.W.OnboardingV2.UsageIntention.SEARCH_VIDEO_ANNOTATION,annotationPosition:"top-left",annotationClassName:"ps-5 ms-4 ".concat(b.searchVideoAnnotation)},r.createElement("img",{className:"img-fluid ".concat(b.searchVideoImage),src:l.W.OnboardingV2.UsageIntention.SEARCH_VIDEO_BACKGROUND})),"browse-topics"===U&&r.createElement(g.N,{annotationUrl:l.W.OnboardingV2.UsageIntention.BROWSE_TOPICS_ANNOTATION,annotationPosition:"bottom-left",annotationClassName:"ps-5 ms-4 ".concat(b.browseTopicsAnnotation)},r.createElement("img",{className:"img-fluid",src:l.W.OnboardingV2.UsageIntention.BROWSE_TOPICS_BACKGROUND})),"support-teachers"===U&&r.createElement(g.N,{annotationUrl:l.W.OnboardingV2.UsageIntention.SUPPORT_TEACHERS_ANNOTATION,annotationPosition:"top-left",annotationClassName:"ps-5 ms-4 ".concat(b.supportTeachersAnnotation)},r.createElement("img",{className:"img-fluid ".concat(b.notSureImage),src:l.W.OnboardingV2.UsageIntention.SUPPORT_TEACHERS_BACKGROUND})),"not-sure"===U&&r.createElement(g.N,{annotationUrl:l.W.OnboardingV2.UsageIntention.NOT_SURE_ANNOTATION,annotationPosition:"top-left",annotationClassName:"ps-5 ms-4 ".concat(b.notSureAnnotation)},r.createElement("img",{className:"img-fluid ".concat(b.notSureImage),src:l.W.OnboardingV2.UsageIntention.NOT_SURE_BACKGROUND}))),r.createElement(d.z.Right,{hasCustomButtons:!1,onClickNext:function(){return N(this,void 0,void 0,O().mark((function t(){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(U){t.next=2;break}return t.abrupt("return");case 2:return a.m.updateUsageIntention(U),I(i.Vw.Click,i.Ix.Next,{usageIntention:U}),t.prev=4,t.next=7,h();case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(4),E(),t.abrupt("return",Promise.reject());case 13:case"end":return t.stop()}}),t,null,[[4,9]])})))},onClickBack:o,onClickComeBackLater:f,disableNext:!U},r.createElement(u.W,null,r.createElement(c.x,{phrase:"heading"})),r.createElement(p.X,null,r.createElement(c.x,{phrase:A?"infoKdm":"info"})),r.createElement(m,{options:k,selection:U,setSelection:function(t){var e;I(i.Vw.Select,i.Ix.SelectOption,{optionId:t,optionName:null===(e=k.find((function(e){return e.id===t})))||void 0===e?void 0:e.title}),T(t)}}),r.createElement(p.X,{className:"pb-4"},r.createElement(c.x,{phrase:"dontWorry"})),r.createElement("div",{className:"d-none"},r.createElement("img",{src:l.W.OnboardingV2.UsageIntention.SEARCH_VIDEO_BACKGROUND}),r.createElement("img",{src:l.W.OnboardingV2.UsageIntention.BROWSE_TOPICS_BACKGROUND}),r.createElement("img",{src:l.W.OnboardingV2.UsageIntention.SUPPORT_TEACHERS_BACKGROUND}),r.createElement("img",{src:l.W.OnboardingV2.UsageIntention.NOT_SURE_BACKGROUND}))))}}}]);
|
|
1
|
+
/*! For license information please see 9173-05803bdaca-lite.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[9173],{75919:(t,e,n)=>{n.d(e,{N:()=>i});var r=n(32735);const o={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function i(t){return r.createElement("div",{className:(e="d-flex align-items-center text-center position-relative w-100 ".concat(o.imageContainer),"center"===t.contentPosition&&(e+=" px-5 justify-content-center"),"right"===t.contentPosition&&(e+=" me-n5 justify-content-end"),e)},!!t.annotationUrl&&r.createElement("div",{className:function(){var e=o.annotation;switch(t.annotationPosition){case"top-left":e+=" ".concat(o.above," ").concat(o.left);break;case"top-right":e+=" ".concat(o.above," ").concat(o.right);break;case"bottom-left":e+=" ".concat(o.below," ").concat(o.left);break;case"bottom-right":e+=" ".concat(o.below," ").concat(o.right)}return t.annotationClassName&&(e+=" ".concat(t.annotationClassName)),e}()},r.createElement("img",{className:"img-fluid",src:t.annotationUrl})),t.children,"right"===t.contentPosition&&r.createElement("div",{className:o.divider}));var e}i.defaultProps={contentPosition:"center"}},68276:(t,e,n)=>{n.r(e),n.d(e,{OnboardingUsageIntentionView:()=>I});var r=n(32735),o=n(23481),i=n(65858),a=n(38304),c=n(83345),s=n(84703),l=n(99742),u=n(75359),f=n(11607);const h={icon:"ohit6",description:"DmrW6",option:"KOzYf"};function m(t){return r.createElement("ul",{className:"list-unstyled mb-0"},t.options.map((function(e){return r.createElement("li",{key:e.id,className:"".concat(h.option," mb-2 border border-2 rounded-3 ").concat(t.selection===e.id?"border-dark bg-light-blue":"border-transparent")},r.createElement(f.L,{onClick:function(){return t.setSelection(e.id)},className:"d-flex align-items-center p-2"},r.createElement("div",{className:"rounded border border-dark ".concat(e.colourClass," ").concat(h.icon)},r.createElement("img",{src:e.imageUrl,className:"img-fluid"})),r.createElement("div",null,r.createElement("h2",{className:"mb-1 h6"},e.title),r.createElement("p",{className:"mb-0 ".concat(h.description)},e.description))))})))}var p=n(12058),d=n(40695),g=n(75919),y=n(73190),v=n(90815);const b={notSureImage:"MuA8k",searchVideoImage:"d82DS",searchVideoAnnotation:"BxbBK",browseTopicsAnnotation:"hwc8g",notSureAnnotation:"PwDKP",supportTeachersAnnotation:"odEci"};function E(t){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(t)}function O(){O=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new k(r||[]);return o(a,"_invoke",{value:U(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var h="suspendedStart",m="suspendedYield",p="executing",d="completed",g={};function y(){}function v(){}function b(){}var w={};l(w,a,(function(){return this}));var N=Object.getPrototypeOf,S=N&&N(N(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var _=b.prototype=y.prototype=Object.create(w);function I(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==E(u)&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(u).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function U(e,n,r){var o=h;return function(i,a){if(o===p)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=f(e,n,r);if("normal"===l.type){if(o=r.done?d:m,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=d,r.method="throw",r.arg=l.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(E(e)+" is not iterable")}return v.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=l(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},I(C.prototype),l(C.prototype,c,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new C(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},I(_),l(_,s,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var N=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},S="onboarding.usageIntention",_=o.T.encloseNamespace(S);function I(t){var e,n,o=(0,y.Q)(t.redirectUrl),f=o.onClickBack,h=o.exitOnboarding,E=o.completeStepAsync,I=o.onSaveError,C=(0,v.H)().logEvent,U=a.m.getUsageIntention(),x=(e=r.useState(U),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){l=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(t,e):void 0}}(e,n)||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.")}()),T=x[0],A=x[1],k=(0,s.n)(),P=function(){var t=[{id:"search-video",imageUrl:l.W.OnboardingV2.UsageIntention.SEARCH_VIDEO_ICON,colourClass:"bg-blue",title:_("searchVideoTitle"),description:_("searchVideoDescription")},{id:"browse-topics",imageUrl:l.W.OnboardingV2.UsageIntention.BROWSE_TOPICS_ICON,colourClass:"bg-yellow",title:_("browseTopicsTitle"),description:_("browseTopicsDescription")}];return k&&t.push({id:"support-teachers",imageUrl:l.W.OnboardingV2.UsageIntention.SUPPORT_TEACHERS_ICON,colourClass:"bg-green",title:_("supportTeachersTitle"),description:_("supportTeachersDescription")}),t.push({id:"not-sure",imageUrl:l.W.OnboardingV2.UsageIntention.NOT_SURE_ICON,colourClass:"bg-indigo",title:_("notSureTitle"),description:_("notSureDescription")}),t}();return r.createElement(d.z,{namespace:S},r.createElement(d.z.Left,{className:"bg-dark-blue d-flex align-items-center"},("search-video"===T||!T)&&r.createElement(g.N,{annotationUrl:l.W.OnboardingV2.UsageIntention.SEARCH_VIDEO_ANNOTATION,annotationPosition:"top-left",annotationClassName:"ps-5 ms-4 ".concat(b.searchVideoAnnotation)},r.createElement("img",{className:"img-fluid ".concat(b.searchVideoImage),src:l.W.OnboardingV2.UsageIntention.SEARCH_VIDEO_BACKGROUND})),"browse-topics"===T&&r.createElement(g.N,{annotationUrl:l.W.OnboardingV2.UsageIntention.BROWSE_TOPICS_ANNOTATION,annotationPosition:"bottom-left",annotationClassName:"ps-5 ms-4 ".concat(b.browseTopicsAnnotation)},r.createElement("img",{className:"img-fluid",src:l.W.OnboardingV2.UsageIntention.BROWSE_TOPICS_BACKGROUND})),"support-teachers"===T&&r.createElement(g.N,{annotationUrl:l.W.OnboardingV2.UsageIntention.SUPPORT_TEACHERS_ANNOTATION,annotationPosition:"top-left",annotationClassName:"ps-5 ms-4 ".concat(b.supportTeachersAnnotation)},r.createElement("img",{className:"img-fluid ".concat(b.notSureImage),src:l.W.OnboardingV2.UsageIntention.SUPPORT_TEACHERS_BACKGROUND})),"not-sure"===T&&r.createElement(g.N,{annotationUrl:l.W.OnboardingV2.UsageIntention.NOT_SURE_ANNOTATION,annotationPosition:"top-left",annotationClassName:"ps-5 ms-4 ".concat(b.notSureAnnotation)},r.createElement("img",{className:"img-fluid ".concat(b.notSureImage),src:l.W.OnboardingV2.UsageIntention.NOT_SURE_BACKGROUND}))),r.createElement(d.z.Right,{hasCustomButtons:!1,onClickNext:function(){return N(this,void 0,void 0,O().mark((function t(){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(T){t.next=2;break}return t.abrupt("return");case 2:return a.m.updateUsageIntention(T),C(i.Vw.Click,i.Ix.Next,{usageIntention:T}),t.prev=4,t.next=7,E();case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(4),I(),t.abrupt("return",Promise.reject());case 13:case"end":return t.stop()}}),t,null,[[4,9]])})))},onClickBack:f,onClickComeBackLater:h,disableNext:!T},r.createElement(u.W,null,r.createElement(c.x,{phrase:"heading"})),r.createElement(p.X,null,r.createElement(c.x,{phrase:k?"infoKdm":"info"})),r.createElement(m,{options:P,selection:T,setSelection:function(t){var e;C(i.Vw.Select,i.Ix.SelectOption,{optionId:t,optionName:null===(e=P.find((function(e){return e.id===t})))||void 0===e?void 0:e.title}),A(t)}}),r.createElement(p.X,{className:"pb-4"},r.createElement(c.x,{phrase:"dontWorry"})),r.createElement("div",{className:"d-none"},r.createElement("img",{src:l.W.OnboardingV2.UsageIntention.SEARCH_VIDEO_BACKGROUND}),r.createElement("img",{src:l.W.OnboardingV2.UsageIntention.BROWSE_TOPICS_BACKGROUND}),r.createElement("img",{src:l.W.OnboardingV2.UsageIntention.SUPPORT_TEACHERS_BACKGROUND}),r.createElement("img",{src:l.W.OnboardingV2.UsageIntention.NOT_SURE_BACKGROUND}))))}}}]);
|