PageSourceSearch

https://cdn-cy1.conveyour.com/ui/releases/a1f3d97c95ac893d09d3e92f…-widget-calWidget-CalWidget-vue.3385ef01.js

js conveyour.com collected 2026-09-24 09:07:32 UTC 9,398 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunkconveyour_ui"]=self["webpackChunkconveyour_ui"]||[]).push([[4296,6317,24451,32317,45569,51469,90252],{45569:function(t,e,i){i.r(e),i.d(e,{default:function(){return m}});var s=i(45961),n=function(){var t=this,e=t._self._c;return e(s.mM,[e("div",[e("div",{staticClass:"form-fields pa-4 pb-0"},t._l(t.schema,function(i,s){return e("form-field",{key:s,attrs:{item:t.item,schema:i,field:s,value:t.item.values[s],lessonId:t.lessonId}})}),1),e("done-editing",{attrs:{item:t.item,lessonId:t.lessonId}})],1)])},l=[],a=i(41331),o=i(43672),r={name:"FormFields",props:["item","lessonId"],components:{FormField:a["default"],DoneEditing:o["default"]},computed:{definition(){return this.$store.getters["items/type"](this.item.type)||{}},schema(){return this.definition.schema}}},d=r,c=i(81656),u=(0,c.A)(d,n,l,!1,null,null,null),m=u.exports},8557:function(t,e,i){i.r(e),i.d(e,{default:function(){return k}});var s=i(69390),n=i(3698),l=i(52938),a=function(){var t=this,e=t._self._c;return t.taking||t.editing?e("div",{staticClass:"widget-card--wrap"},[t.taking?t._e():e("editor",{attrs:{item:t.item,lessonId:t.lesson.id}}),e(n.A,[e(l.OQ,[t.taking?e("div",[t.completed&&t.val.success_text?e("h5",{staticClass:"mb-2 mt-2"},[t._v(" "+t._s(t.val.success_text)+" ")]):t._e(),t.widgetLoaded?e(s.A,{attrs:{disabled:t.completed,text:!t.taking,color:"primary"},on:{click:t.openModal}},[t._v(" "+t._s(t.val.toggle_text)+" ")]):t._e(),t.skipText?e(s.A,{staticClass:"skip-cal",attrs:{text:"",disabled:t.completed,color:"primary"},on:{click:t.completeWidget}},[t._v(" "+t._s(t.skipText)+" ")]):t._e()],1):e("p",[t._v(" Schedule will appear when testing/taking this lesson. ")])])],1)],1):e("div",{staticClass:"lesson-widget-summary"},[e("p",[t._v(t._s(t.summary))])])},o=[],r=(i(18111),i(7588),i(51469)),d=i(15188),c=i(36952),u=i.n(c),m=i(1910),h=i(90252),p=i(77927),f={name:"CalWidget",mixins:[r["default"],d["default"]],data(){return{widgetLoaded:!1,uid:String(Date.now()),processedBooking:!1}},watch:{eventUrl(){this.loadWidget()},active:{immediate:!0,handler(t){t&&this.showModal&&this.openModal()}}},computed:{...(0,m.L8)(["profile"]),summary(){return this.val?.toggle_text},showModal(){return this.taking&&this.active&&!this.completed},skipText(){return this.val?.skip_text},eventUrl(){return this.valCompiled("url")},parsedEventUrl(){const t=this.eventUrl;return t&&t.startsWith("https")?new URL(t):{}},completed(){return this.item?.engagementState?.completed}},methods:{...(0,m.PY)(["updateProfileField"]),loadWidget:u()(async function(t){!t&&window.Cal&&Cal.instance?.actionManager&&Cal.instance.actionManager.fire("__closeIframe");const e=this.parsedEventUrl;e&&((0,h["default"])({origin:e.origin}),this.listenForSuccessfullBooking(),await(0,p.a0)(()=>window.Cal.loaded,100),t&&this.openModal(),this.widgetLoaded=!0)},300),listenForSuccessfullBooking(){Cal("on",{action:"bookingSuccessful",callback:t=>{if(console.log({bookingSuccessful:t}),this.processedBooking)return;this.processedBooking=!0;const e=t.detail?.data?.booking;if(!e)return;let i=this.localAnswer=e.startTime||"";this.updateProfileFieldForInstantRetrieval(i),this.trackScheduledTimeEvent(e),this.saveAnswer(),Cal.instance.actionManager.fire("__closeIframe"),this.completeWidget()}})},updateProfileFieldForInstantRetrieval(t){if(!this.portal)return;const e=this.item.values.contact_field;this.updateProfileField({field:e,value:t})},trackScheduledTimeEvent(t){const e=this.parsedEventUrl,i={cal_id:t.id,cal_uid:t.uid,cal_contact_field:this.item.values.contact_field,cal_start_time:t.startTime,cal_end_time:t.endTime,cal_location:t.location,cal_title:t.title,cal_host:e.host,cal_path:e.pathname};console.log({properties:i,booking:t}),this.lesson.trackItemEvent(this.item,"cal_scheduled_time",i)},openModal(){if(!window.Cal)return void this.checkWidgetLoaded();const t=this.parsedEventUrl,e=this.constructPrefill(),i={calLink:t.pathname,uid:this.uid,calOrigin:t.origin,config:{...e}};Cal("modal",i)},checkWidgetLoaded(){let t=0;const e=20;let i=setInterval(()=>{window.Cal&&this.openModal(),(window.Cal||t>e)&&clearInterval(i),t+=1},100)},constructPrefill(){const t=this.getPrefillFields(),e=t=>{if("name"===t)return`${e("first_name")} ${e("last_name")}`;let i=this.profile[t]||"";return"mobile"===t&&i&&(i+="",i.startsWith("+")||(i="+1"+i.replaceAll(/\D/g,"").slice(-10))),i};return t.conveyour_pid=e("pid"),t.name=e("name"),t.email=e("email"),t.mobile=e("mobile"),t},getPrefillFields(){const t=this.valCompiled("prefill_fields")||[],e={};return t.forEach(t=>{const i=t.key,s=t.value;i&&s&&(e[i]=s)}),e},completeWidget(){this.complete(),this.$emit("ended",this.item)}},mounted(){this.taking&&this.loadWidget()}},g=f,v=i(81656),_=(0,v.A)(g,a,o,!1,null,null,null),k=_.exports}
1,43672:function(t,e,i){i.r(e),i.d(e,{default:function(){return c}});var s=i(69390),n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-fields-edit--wrap"},[t.item.editing&&!t.definition.inline_edits?e(s.A,{staticClass:"form-fields-edit",attrs:{color:"appMain"},on:{click:function(e){return e.preventDefault(),t.doneEditing(t.item)}}},[t._v(" Done Editing ")]):t._e()],1)},l=[],a={name:"doneEditing",props:["item","lessonId"],computed:{definition(){return this.$store.getters["items/type"](this.item.type)||{}}},methods:{doneEditing(){this.item.editing=!1}}},o=a,r=i(81656),d=(0,r.A)(o,n,l,!1,null,"f2dd7c84",null),c=d.exports},98392:function(t,e,i){i.r(e),i.d(e,{default:function(){return c}});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"editor"},[e("form-fields",{attrs:{item:t.item,lessonId:t.lessonId}})],1)},n=[],l=i(45569),a={name:"editor",props:["item","lessonId"],components:{FormFields:l["default"]}},o=a,r=i(81656),d=(0,r.A)(o,s,n,!1,null,null,null),c=d.exports},90252:function(t,e,i){i.r(e);i(44114);let s=!1;e["default"]=(t={})=>s||(function(t,e,i){let s=function(t,e){t.q.push(e)},n=t.document;t.Cal=t.Cal||function(){let l=t.Cal,a=arguments;if(l.loaded||(l.ns={},l.q=l.q||[],n.head.appendChild(n.createElement("script")).src=e,l.loaded=!0),a[0]===i){const t=function(){s(t,arguments)},e=a[1];return t.q=t.q||[],void("string"===typeof e?(l.ns[e]=t)&&s(t,a):s(l,a))}s(l,a)}}(window,"https://cal.conveyour.com/embed/embed.js","init"),Cal("init",t),s=!0),i.dn(e["default"])},51469:function(t,e,i){i.r(e),i.d(e,{default:function(){return g}});var s=i(98392),n=i(39575),l=i.n(n),a=function(){var t=this,e=t._self._c;return t.src?e("div",{staticClass:"mt-5 ml-2"},[e("audio",{ref:"audio",attrs:{src:t.src,controls:""}},[t._v(" Your browser does not support this audio element. ")])]):t._e()},o=[],r=i(36952),d=i.n(r);const c="lessons_audio_volume";var u={name:"audioPlayer",props:["src","active","taking"],data(){return{currentTime:0,audioTimeout:null,listening:!1}},watch:{active(){this.initAudio()}},methods:{initAudio(){if(!this.src)return!1;let t=this.$refs.audio;return!!t&&(this.listening||(this.listening=this.bindListeners(t)),this.audioTimeout&&clearTimeout(this.audioTimeout),this.taking&&this.active?this.audioTimeout=setTimeout(()=>{t.volume=this.getVolume(),t.play()},1e3):t.pause(),t)},bindListeners(t){return t.addEventListener("volumechange",()=>{this.storeVolume(t.volume)}),!0},getVolume(){let t=.75,e=0;try{e=sessionStorage.getItem(c)}catch(i){console.warn(i)}return parseFloat(!e||e>1?t:e)},storeVolume:d()((t=.5)=>{console.log("storingVolume",t);try{return sessionStorage.setItem(c,t),t}catch(e){return console.warn(e),!1}},500)},mounted(){this.initAudio()}},m=u,h=i(81656),p=(0,h.A)(m,a,o,!1,null,null,null),f=p.exports,g={template:"<span>dummy for testing</span>",components:{editor:s["default"],AudioPlayer:f},props:["active","item","first","last","lesson","section","summaryOnly","taking","testing"],data(){return{_calculating:!1,imageRatio:0,forceRecalc:Date.now()}},computed:{val(){return this.item.values},valCompiled(t){return t=>{const e=this.item.valuesCompiled;return e&&e[t]?e[t]:this.val[t]}},imgHeight(){if(this.imageRatio)return this.forceRecalc&&this.$el.clientWidth/this.imageRatio},imgSrc(){return this.val.image},summary(){return this.item.title},definition(){return this.$store.getters["items/type"](this.item.type)||{}},editing(){return this.item.editing||this.definition.inline_edits}},watch:{imgSrc(t){t&&this.calcImageRatio()}},methods:{alpha(t){return String.fromCharCode(97+t).toUpperCase()},calcImageRatio(){let t=this.val.image;if(!this.$el||!t||this._calculating==t)return;this._calculating=t;let e=document,i=document.getElementsByTagName("body")[0],s=e.createElement("img");s.src=t,l()(s.style,{position:"absolute",left:"-9999px",bottom:"0"}),s.onload=()=>{let t=s.width,e=s.height;this.setImageRatio(t/e),i.removeChild(s)},i.appendChild(s)},setImageRatio(t){this.$el.clientWidth?this.imageRatio=t:setTimeout(()=>{this.setImageRatio(t)},16)},recalcImgHeight(){this.forceRecalc=Date.now()},focusFirstInput(){this.$el||setTimeout(()=>{this.focusFirstInput()},50);let t=this.$el.getElementsByClassName("form-fields")[0]||!1;if(!t)return;let e=t.getElementsByClassName("input-group__input"),i=e.length?e[0]:null;if(i){let t=i.children[0];t.focus(),t.select&&t.select()}},updateItem(t){this.$emit("update",t)}},mounted:function(){this.val.image&&(this.calcImageRatio(),window.addEventListener("resize",()=>{this.recalcImgHeight()})),this.taking||this.focusFirstInput()}}}}]);
2//# sourceMappingURL=lesson-widget-calWidget-CalWidget-vue.3385ef01.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.