PageSourceSearch

https://www.kanopy.com/kui-assets/index-D68UiZEU.js

js kanopy.com collected 2026-09-24 08:30:32 UTC 11,554 bytes, 2 lines download raw bytes

1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"f2e84f41ed6c0beba456d92f07f35b71be0836fd"};var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e4f880d2-89ff-4639-8518-db75311e0352",t._sentryDebugIdIdentifier="sentry-dbid-e4f880d2-89ff-4639-8518-db75311e0352")}catch(s){}}();import{V as t,J as e,bf as s,b5 as i,N as l,n as a,w as n,x as o,z as r,B as _,bH as c,bI as p,M as d,ak as u,aN as m,C as y,aQ as h,aR as f,q as b,d as g,F as v,A as x,v as w,r as k,S as C,bJ as $}from"./client-ANZ33kkl.js";import{M as z,a as E,b as P}from"./MyListsHeader-BcW11YjX.js";import{F as D}from"./FourThumbnails-Bod1OBnN.js";import{D as L}from"./DurationView-BYTddQ0Y.js";import{O as S}from"./OptionsMenu-DlZAgo4G.js";import{E as F,T}from"./trash-CNDCMLlm.js";import{S as B}from"./Spinner-Ce5drrJq.js";import{D as j}from"./DarkTextfield-wEQuMk45.js";import{E as M}from"./ExpandCollapseButton-CbFkHP38.js";import"./TabBar-B55Bpwxe.js";const N=a(t.extend({name:"Playlists",data:()=>({show_delete_modal:!1,option_opens_other_component:!1}),props:{playlist:{type:Object,required:!0}},computed:{thumbnails(){const t=[];for(let e=0;e<4;e++){const s=this.item_at_index(e);null!=s&&t.push(s)}return t},options(){return[{option:"Edit".localized(),icon:F,role:"link",close_menu:!0,on_click:()=>l.navigate(this.$router,`/mylists/customplaylists/edit/${this.playlist.id}`)},{option:"Delete".localized(),icon:T,role:"button",close_menu:!0,selection_options:{is_destructive:!0},on_click:this.show_delete_playlist_modal}]},options_label(){return"Playlist options menu for {title}".localized({title:this.playlist.title})},playlist_items(){return this.playlist.items},playlist_items_nb(){return this.playlist_items.length},clip_nb_title(){return"{clip_count} Clip".localized({clip_count:this.playlist_items_nb},this.playlist_items_nb)},playlist_running_time(){return this.playlist.items.reduce((t,e)=>t+(e.clipEndSeconds-e.clipStartSeconds),0)},playlist_link(){return`/mylists/customplaylists/${this.playlist.id}`},total_duration(){return this.playlist.items.reduce((t,e)=>{const s=i(e.video);return t+(s?.durationSeconds??0)},0)},title(){return this.playlist.title},label(){const t=s.from_seconds(this.total_duration);return`${this.title}. ${this.clip_nb_title}. ${t.long_duration_format()}`}},methods:{item_at_index(t){const e=this.playlist_items[t];return null==e?void 0:{thumbnail:e.video.video.images.landscapes.medium,alt:e.title}},show_delete_playlist_modal(){this.option_opens_other_component=!0,this.$kuistore.dispatch("site/save_playlist_for_deletion",this.playlist),this.$kuistore.dispatch("site/show_delete_playlist_modal",!0)},on_options_close(){this.option_opens_other_component=!1}},components:{FourThumbnails:D,OptionsMenu:S,DurationView:L,KanopyLink:e}}),function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{staticClass:"playlist-item-container",attrs:{"data-clarity-mask":"true"}},[e("kanopy-link",{staticClass:"thumbnails",attrs:{to:t.playlist_link,"aria-label":t.label}},[e("four-thumbnails",{attrs:{thumbnails:t.thumbnails}}),e("duration-view",{staticClass:"time-container",attrs:{duration_second:t.playlist_running_time}})],1),e("div",{staticClass:"title"},[e("p",{staticClass:"text"},[t._v(t._s(t.playlist.title))]),e("options-menu",{attrs:{options:t.options,label:t.options_label,focus_parent_on_close:!t.option_opens_other_component},on:{close:t.on_options_close}})],1),e("p",{staticClass:"clip-number"},[t._v(t._s(t.clip_nb_title))])],1)},[],!1,null,"cbe47b59").exports;const q=a(t.extend({name:"PlaylistsList",data:()=>({vw:document.body.clientWidth,playlist_items_container_width:0}),props:{playlists:{type:Array,required:!0},is_loading_more:{type:Boolean,required:!1,default:!1},playlists_nb_items:{type:Number,required:!1,default:0}},beforeMount(){u.inNextEventTick(this.on_resize)},mounted(){window.addEventListener("resize",this.on_resize),this.on_resize()},beforeDestroy(){window.removeEventListener("resize",this.on_resize)},computed:{playlist_nb_title(){return"{playlist_count} Playlist".localized({playlist_count:this.playlists_nb_items},this.playlists_nb_items)},playlist_items_per_row_for_vw:()=>new o([{value:1,width:0},{value:2,width:r},{value:3,width:_},{value:4,width:c},{value:5,width:p},{value:6,width:d}]),playlist_items_size(){const t=this.playlist_items_per_row_for_vw.get_size_for_width(this.vw),e=(this.playlist_items_container_width-10*t)/t;return{width:`${e}px`,height:`${e/(16/9)+32+10+3}px`}},has_playlist_items(){return this.playlists_nb_items>0}},methods:{on_resize(){this.vw=document.body.clientWidth;
1const t=n.html_element(this.$refs.playlists_container);this.playlist_items_container_width=t?.getBoundingClientRect().width??0}},components:{Playlist:N,Spinner:B}}),function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{ref:"playlists_container",staticClass:"playlists-container"},[e("h2",{staticClass:"playlists_num"},[t._v(t._s(t.playlist_nb_title))]),t.has_playlist_items?e("div",{staticClass:"playlists-items-container"},t._l(t.playlists,function(s){return e("playlist",{key:s.id,staticClass:"playlist-item",style:t.playlist_items_size,attrs:{playlist:s}})}),1):e("p",{staticClass:"empty-text"},[t._v(t._s("Any playlists you create will appear in this list.".localized()))]),t.is_loading_more?e("spinner",{staticClass:"load-more-spinner"}):t._e()],1)},[],!1,null,"f0e9157f").exports;const I=a(t.extend({name:"CreateNewPlaylist",data:()=>({is_open:!1,playlist_name:"",panel_id:x.instance.getId("new-playlist-panel"),textfield_id:x.instance.getId("new-playlist-textfield"),error_msg:void 0,input_resetting:!1}),computed:{create_playlist_text:()=>"Create New Playlist".localized()},methods:{on_expand_collapse_clicked(){this.error_msg=void 0,this.is_open=!this.is_open,this.is_open&&this.$nextTick(()=>v.instance.getNextFocusableSibling(document.activeElement,this.$el)?.focus())},on_playlist_name_update(t){this.playlist_name=t,this.validate_input()},on_create_playlist_clicked(){if(!b.isEmpty(this.playlist_name)){const t={title:this.playlist_name};this.$kuistore.dispatch("mylists/create_playlist",t).then(()=>{g.notify("Playlist created".localized()).asSuccess().push(),this.reset_textfield(),this.send_analytics()}).catch(t=>{g.notify(t.userMessaging?.message??"Failed to create the playlist".localized()).asFailure().push()})}},on_cancel_clicked(){this.reset_textfield(),this.is_open=!1},reset_textfield(){this.input_resetting=!0;this.$refs["dark-textfield"].clear()},beforeEnter(t){t.style.height="0px"},enter(t){t.style.height=`${t.scrollHeight}px`},afterEnter(t){t.style.height="auto"},beforeLeave(t){t.style.height=`${t.scrollHeight}px`},leave(t){t.style.height="0px"},send_analytics(){h.sendEvent(this.$nuxt.context,f.PlaylistCreate)},validate_input(){setTimeout(()=>{this.error_msg=""!==this.playlist_name.trim()||this.input_resetting?void 0:"Playlist name is required".localized(),this.input_resetting=!1},100)}},components:{CTAButton:y,CTAButtonGray:m,DarkTextfield:j,ExpandCollapseButton:M}}),function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{staticClass:"create-new-playlist-container"},[e("button",{staticClass:"input-header",attrs:{"aria-expanded":t.is_open.toString(),"aria-controls":t.panel_id},on:{click:t.on_expand_collapse_clicked}},[e("h2",{staticClass:"header"},[t._v(t._s(t.create_playlist_text))]),e("expand-collapse-button",{attrs:{is_expanded:t.is_open,"aria-hidden":"true"}})],1),e("transition",{attrs:{name:"collapse-transition"},on:{"before-enter":t.beforeEnter,enter:t.enter,"after-enter":t.afterEnter,"before-leave":t.beforeLeave,leave:t.leave}},[t.is_open?e("div",{staticClass:"form-container",attrs:{id:t.panel_id}},[e("div",{staticClass:"label"},[e("label",{attrs:{for:t.textfield_id}},[t._v(" "+t._s("Playlist name".localized())+" "),e("span",{staticClass:"req"},[t._v(t._s("(required)".localized())+" ")])])]),e("div",{staticClass:"input-container"},[e("dark-textfield",{ref:"dark-textfield",staticClass:"playlist-input",attrs:{id:t.textfield_id,default_text:t.playlist_name,required:!0,maxlength:32,error_msg:t.error_msg},on:{update_value:t.on_playlist_name_update,submit:t.on_create_playlist_clicked,blur:t.validate_input}}),e("div",{staticClass:"button-container"},[e("c-t-a-button",{staticClass:"create-playlist-button",attrs:{title:t.create_playlist_text},on:{click:t.on_create_playlist_clicked}}),e("c-t-a-button-gray",{staticClass:"cancel-button",attrs:{title:"Cancel".localized()},on:{click:t.on_cancel_clicked}})],1)],1)]):t._e()])],1)},[],!1,null,"d044dc95").exports;const A=a(t.extend({name:"CustomPlaylists",layout:"default",middleware(t){new C($).guard(t)},head:{title:"My Lists - Custom Playlists | Kanopy"},data(){return{component_id:x.instance.getId(this.$options.name),tabpanel_id:E[P.CustomPlaylists].tabpanel_id}},created(){null==this.$kuistore.state.mylists.custom_playlists&&this.$kuistore.dispatch("mylists/fetch_custom_playlist",!1).then(()=>{this.$nuxt.$emit(k.LiveRegionUpdate,{text:"Displaying {number} custom playlists.".localized({number:this.custom_playlists_nb_items},this.custom_playlists_nb_items)})}).catch(t=>
1{g.notify(t.userMessaging?.message??"Custom playlists failed to load.".localized()).asFailure().push()})},mounted(){v.instance.addBlockingFocus(this.component_id,w.Footer,this.on_load_more_trigger),this.$kuistore.commit("site/set_skip_links",[{focus_id:w.Footer,text:"Skip to footer".localized()}])},beforeDestroy(){v.instance.removeAllBlockingFocuses(this.component_id),this.$kuistore.commit("site/clear_skip_links")},computed:{custom_playlists(){return this.$kuistore.state.mylists.custom_playlists??[]},custom_playlists_nb_items(){return this.$kuistore.getters["mylists/custom_playlists_nb"]??0},is_loading(){return this.$kuistore.state.mylists.fetching_custom_playlists},is_loading_more(){return this.$kuistore.state.mylists.fetching_more_custom_playlists},can_fetch_more_results(){return this.$kuistore.getters["mylists/can_fetch_more_custom_playlists"]}},methods:{on_load_more_trigger(){if(this.can_fetch_more_results&&!v.instance.hasBlockingFocus(this.component_id,w.Footer)){const t=window.innerHeight+window.scrollY;this.$refs.playlists_content_container.getBoundingClientRect().bottom+window.scrollY-t<=0&&this.$kuistore.dispatch("mylists/fetch_custom_playlist",!0).then(()=>{this.$nuxt.$emit(k.LiveRegionUpdate,{text:"Displaying additional custom playlists.".localized()})}).catch(()=>{this.$nuxt.$emit(k.LiveRegionUpdate,{text:"Additional custom playlists failed to load.".localized()})})}}},components:{MyListsHeader:z,MyListsPlaylistsContent:q,CreateNewPlaylist:I,Spinner:B}}),function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{staticClass:"custom-playlists-container"},[e("my-lists-header"),e("div",{staticClass:"custom-playlists-content",attrs:{id:t.tabpanel_id,role:"tabpanel","aria-label":"Custom Playlists".localized()}},[e("create-new-playlist"),t.is_loading?e("spinner",{staticClass:"load-spinner"}):e("div",{directives:[{name:"windowscroll",rawName:"v-windowscroll",value:t.on_load_more_trigger,expression:"on_load_more_trigger"}],ref:"playlists_content_container",staticClass:"playlists-content-container"},[e("my-lists-playlists-content",{attrs:{playlists:t.custom_playlists,is_loading_more:t.is_loading_more,playlists_nb_items:t.custom_playlists_nb_items}})],1)],1)],1)},[],!1,null,"2ca4d3c2").exports;export{A as default};
2//# sourceMappingURL=index-D68UiZEU.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.