PageSourceSearch

https://c.mestskadivadlaprazska.cz/files/ext_assets/app-program.min.js?v=1548

js mestskadivadlaprazska.cz collected 2026-09-24 17:46:54 UTC 21,960 bytes, 2 lines download raw bytes

1"use strict";function switchExpandedTwo(){var t=document.getElementById("sceneFilterDropdown").getAttribute("aria-current");t="false"==t?"true":"false",document.getElementById("sceneFilterDropdown").setAttribute("aria-current",t)}Vue.component("comp-records",{props:["records","citations","citationsPositions","hallnames","itemsOffsetTop"],data:function(){return{availableDays:[],citationCount:-1}},methods:{getRandom:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},isCitationReady:function(t){return this.citationsPositions[t]&&this.citations[t]},getCitation:function(t){return this.citations[t]},showDayDivider:function(t){return!!t&&(console.log("this.records[index-1]: ",this.records[t-1]),!(this.records[t-1]&&moment(this.records[t].date).date()===moment(this.records[t-1].date).date()&&moment(this.records[t].date).month()===moment(this.records[t-1].date).month()))},hideDay:function(t){return this.records[t-1]&&moment(this.records[t].date).date()===moment(this.records[t-1].date).date()&&moment(this.records[t].date).month()===moment(this.records[t-1].date).month()},hideTime:function(t){var e=this.records[t];return!!(e&&e.hasOwnProperty("more")&&e.more&&e.more.hasOwnProperty("disable_time"))&&e.more.disable_time},getItemsOffsetTop:function(){var t=[];$(".program-item").each(function(){t.push($(this).offset().top)}),this.itemsOffsetTop=t,this.$emit("itemsOffsetTop",this.itemsOffsetTop)},lastTicketsText:function(t){if("Koupit vstupenku"!==this.getBuyTicketText(t))return"";if(t.more&&t.more.category.indexOf("pro-skoly")>=0)return"";var e=t.capacity.free;return e>4?"Posledních<br>"+e+" vstupenek":e>1&&e<5?"Poslední<br>"+e+" vstupenky":"Zbývá poslední<br>vstupenka"},getBuyTicketClassList:function(t){var e="btn btn-program";return t.isArchive||!t.sale_available||t.more&&(t.more.category.indexOf("zadane")>=0||t.more.category.indexOf("__cat-zadane")>=0||t.more.category.indexOf("zruseno")>=0||t.more.category.indexOf("__cat-zruseno")>=0||t.more.category.indexOf("pro-skoly")>=0||t.more.category.indexOf("__cat-pro-skoly")>=0||t.more.free||t.more.first_row)?e+=" btn-main disabled":t.capacity.available?e+=" btn-main":e+=" btn btn-program btn-main-reverse btn-sold-out",e},noSaleCategory:function(t){},getBuyTicketText:function(t){return t.isArchive?"Odehráno":t.more&&t.more.free?"Vstup zdarma":t.more&&t.more.first_row?"První řada":t.more&&(t.more.category.indexOf("zadane")>=0||t.more.category.indexOf("__cat-zadane")>=0)?"Zadáno":t.more&&(t.more.category.indexOf("zruseno")>=0||t.more.category.indexOf("__cat-zruseno")>=0)?"Zrušeno":t.more&&(t.more.category.indexOf("pro-skoly")>=0||t.more.category.indexOf("__cat-pro-skoly")>=0)?"Pro školy":t.sale_available?t.sale_available&&!t.capacity.available&&0==t.capacity.free?'<span class="so-text">Vyprodáno</span><div class="so-box d-flex justify-content-center align-items-center"><span class="so-icon"></span></div>':"Koupit vstupenku":"V prodeji od "+moment(String(t.date_sale_from)).format("D. M.")},buyTicket:function(t){if(!(t.isArchive||!t.sale_available||t.more&&(t.more.free||t.more.first_row))){var e=$(".buy-link-form");e.find("[name='eventid']").val(t.PRDID),e.submit()}},shortShow:function(t){var e=this.hallnames.find(function(e){return e.name===t.hall});return t.shortshow=!e.active,e.active},showHall:function(t){return!t.more||t.more.category.indexOf("prohlidka-zakulisi")<0},getPriceRangeText:function(t,e,a){return t&&0!==parseInt(t)&&"Koupit vstupenku"===this.getBuyTicketText(a)?t===e?"Jednotná cena "+t+" Kč":"Od "+t+" Kč do "+e+" Kč":"&nbsp;"}},filters:{dateShortName:function(t){return moment(String(t)).format("dd")},dateDay:function(t){return moment(String(t)).format("D")},dateMonthName:function(t){return moment(String(t)).format("M")},dateTime:function(t){return moment(String(t)).format("HH.mm")},dateSaleFrom:function(t){return moment(String(t)).format("D.M.YYYY")}},mounted:function(){var t=this;$(window).on("resize",function(){t.getItemsOffsetTop()})},updated:function(){this.getItemsOffsetTop(),$('[data-toggle="popover"]').popover()},watch:{hallnames:{handler:function(){this.getItemsOffsetTop()},deep:!0}},template:'\n<div id="events-container" class="container py-5">\n    <div v-for="(rec, index) in records" class="row program-item" :data-day="rec.dates.day" :data-month="rec.dates.month" :data-year="rec.dates.year" :data-id="rec.rec_id">            \n        <div class="col-12 p-relative pt-4" v-if="showDayDivider(index)">\n            <div class="program-extra-month" v-if="rec.dates.firstInMonth">{{rec.dates.monthStr}}</div>\n            <div class="divider mb-4"></div>\n        </div>\n        \n        <comp-citation v-else-if="isCitationReady(index)" :citation="getCitation(index)"></comp-citation>\n        \n        <div class="col-auto text-center" :class="hideDay(index) ? \'invisible\' : \'\'">\n            <div class="fsz-h2 ff-ae-b mb-2 mt-lg-custom">{{rec.date | dateDay}}<span class="d-lg-none">.{{rec.date | dateMonthName}}.</span></div>\n            <div class="text-uppercase">{{rec.date | dateShortName}}</div>\n        </div> \n        \n        <div class="col">\n            <article>\n                <div class="row" :class="hideDay(index) ? \'\' : \'d-none\'">\n                    <div class="col-12 col-md-80 ml-auto mb-1"><hr class="dashed"></div>    \n                </div>\n\n                <div class="row" v-if="rec.more && rec.more.labels && rec.more.labels.length">\n                    <div class="col-12 col-md-20 mb-3"></div>\n                    <div class="col">\n                        <div v-if="rec.more && rec.more.labels" class="mb-2">\n                        <template v-for="label in rec.more.labels" :key="label">\n                            \x3c!-- QUEER → SVG --\x3e\n                            <sp
1an\n                                v-if="label && label.toLowerCase() === \'queer\'"\n                                class="badge badge-main mr-1 mb-0 bg-transparent p-0"\n                            >\n                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 11.43" style="height:20px">\n                                    <path fill="#6d2380" d="M0 0h18v11.43H0z"></path>\n                                    <path fill="#2c58a4" d="M0 0h18v9.525H0z"></path>\n                                    <path fill="#78b82a" d="M0 0h18v7.62H0z"></path>\n                                    <path fill="#efe524" d="M0 0h18v5.715H0z"></path>\n                                    <path fill="#f28917" d="M0 0h18v3.81H0z"></path>\n                                    <path fill="#e22016" d="M0 0h18v1.905H0z"></path>\n                                    <path d="M4.725 0H0v11.43h4.725l5.295 -5.715z"></path>\n                                    <path fill="#945516" d="M3.615 0H0v11.43h3.615l5.295 -5.715z"></path>\n                                    <path fill="#7bcce5" d="M2.52 0H0v11.43h2.52l5.295 -5.715z"></path>\n                                    <path fill="#f4aec8" d="M1.425 0H0v11.43h1.425l5.295 -5.715z"></path>\n                                    <path fill="#fff" d="M0 0v11.43h0.33l5.28 -5.715L0.33 0z"></path>\n                                    <path fill="#fdd817" d="m0 10.59 4.515 -4.875L0 0.825z"></path>\n                                    <path fill="none" stroke="#66338b" stroke-width="0.285"\n                                        d="M2.865 5.715A1.2 1.2 0 0 1 1.665 6.915A1.2 1.2 0 0 1 0.465 5.715A1.2 1.2 0 0 1 2.865 5.715z">\n                                    </path>\n                                </svg>\n                            </span>\n\n                            \x3c!-- DEFAULT → text --\x3e\n                            <span\n                                v-else-if="label !== \'\'"\n                                class="badge badge-main mr-1 mb-1 text-uppercase"\n                            >\n                                {{ label }}\n                            </span>\n                        </template>\n                    </div>\n                    </div>\n                </div>\n            \n                <div class="row">\n                    \n                    <div class="col-12 col-md-20 mb-3">\n                        <div class="row">\n                            <div class="col pl-md-0 pr-1 text-lg-center custom-line-height-2 ff-ae-b" :class="hideTime(index) ? \'invisible\' : \'\'">{{rec.date | dateTime}}</div>\n                            <div class="col p-0"> \n                                <strong class="text-uppercase custom-line-height-2" v-if="showHall(rec)">{{rec.scene}}</strong>\n                                <div v-if="rec.more && rec.more.premiere" class="py-2 text-uppercase color-red">Premiéra</div>\n                            </div>\n                        </div>\n                    </div>\n                    \n                    <div class="col mb-3 mb-sm-0">\n                        <a v-if="rec.link && rec.name != \'Vánoce u Čapků aneb jak Karel a Olinka vařili dort cukroví\'" v-bind:href="rec.link" class="text-uppercase just-hover-underline"><h2>{{rec.name}}</h2></a>\n                        <a v-else-if="rec.link && rec.name == \'Vánoce u Čapků aneb jak Karel a Olinka vařili dort cukroví\'" v-bind:href="rec.link" class="text-uppercase just-hover-underline"><h2>Vánoce u Čapků aneb jak Karel a Olinka vařili <span style="text-decoration:line-through">dort</span> cukroví</h2></a>\n                        <h2 v-else class="text-uppercase">{{rec.name}}</h2>\n                        \n                        <p class="mb-2 text-uppercase ff-ae-b" v-if="rec.writers">{{rec.writers}}</p>\n                        <div v-html="rec.desc"></div>\n                        <div v-if="rec.more && rec.more.description && rec.desc" class="mb-3"></div>\n                        <div v-if="rec.more && rec.more.description" class="mb-0">{{rec.more.description}}</div>\n                    </div>\n                    \n                    <div class="col-12 col-sm-auto d-flex flex-column justify-content-end text-right">\n                        \n                        <p class="fsz-medium text-uppercase max-w-10rem mb-2 align-self-end" v-if="rec.more && rec.more.short_description">{{rec.more.short_description}}</p>\n                        \n                        <p v-if="rec.capacity.available && rec.capacity.free <= 10 && rec.capacity.free != 0"\n                        v-html="lastTicketsText(rec)"\n                        class="text-buy-button-two font-weight-bold text-uppercase mb-2 text-right text-sm-left"></p>\n                        \n                        \n                        <button v-if="rec.more && rec.more.info_button_text && rec.more.info_button_content" type="button" class="btn btn-program btn-main disabled" data-toggle="popover" data-trigger="focus" data-placement="top" :data-content="rec.more.info_button_content">{{rec.more.info_button_text}}</button>\n                        \n                        <button v-else-if="!rec.is_manually_added || (rec.more && rec.more.free)" v-on:click="buyTicket(rec)" v-bind:class="getBuyTicketClassList(rec)" v-html="getBuyTicketText(rec)"></button>\n                        <a v-else-if="rec.is_manually_added" v-bind:href="rec.ext_link" target="_blank" class="btn btn-program btn-main">Koupit vstupenku</a>\n\n                        <div class="mb-0 text-right text-md-left font-weight-bold fs-14" v-html="getPriceRangeText(rec.price_min, rec.price_max, rec)"></div>\n                    </div>\n                    \n                </div>\n            </article>\n        </div>\n        \n    </div>  \n    \n</div>\n'}),Vue.component("comp-calendar",{props:["actualDate","records","timeline","hallnames","itemsOffsetTop"],data:function(){return{today:moment(),actualMonth:"",items:[],activeFilterHallNames:[]}},methods:{isItAvailableDay:function(t,e){var a=this,n=this.timeline.filter(function(n){return a.activeFilterHallNames.length?n.day===t&&n.month===e&&a.activeFilterHallNames.indexOf(n.hall)>=0:n.day===t&&n.month===e});return t===parseInt(this.today.format("D"))&&e===parseInt(this.today.format("M"))?n.length?"available-today":"today":n.length?"available":""},availabilityInDay:function(t,e){return this.records.filter(function(a){if
1(a.capacity.available&&t===a.dates.day&&e===a.dates.month)return a}).length?"available":""},isItWeekend:function(t){var e=moment(this.actualDate).date(t).format("dd");return"so"===e||"ne"===e?"week-"+e:""},setCalendarItems:function(){var t=this;this.activeFilterHallNames=[],this.hallnames.map(function(e){e.active&&t.activeFilterHallNames.push(e.name)});for(var e=[],a=parseInt(this.actualDate.format("M")),n=1;n<this.actualDate.daysInMonth()+1;n++)e.push({day:n,month:a,activeClass:"",availableClass:this.isItAvailableDay(n,a),availabilityInDayClass:this.availabilityInDay(n,a)});this.actualMonth=this.actualDate.format("MMMM"),this.items=e},getMonth:function(t,e){var a=this.actualDate.clone();switch(t){case"next":return a.add(e||1,"month").format("M");case"prev":return a.subtract(e||1,"month").format("M");case"today":return this.today.format("M")}},setMonth:function(t,e){switch(e=e||1,t){case"next":this.actualDate.add(1,"month");break;case"prev":this.actualDate.subtract(1,"month");break;case"today":this.actualDate=this.today.clone()}this.$emit("dateChange",this.actualDate),this.setCalendarItems()},manualHiLightActualDay:function(){this.hiLightActualDay($(window).scrollTop()+200),this.scrollToQueryDate()},hiLightActualDay:function(t){if(this.itemsOffsetTop.length){var e=this.itemsOffsetTop.reduce(function(e,a){return Math.abs(a-t)<Math.abs(e-t)?a:e});if(this.records[this.itemsOffsetTop.indexOf(e)]){var a=moment(this.records[this.itemsOffsetTop.indexOf(e)].date).date(),n=parseInt(moment(this.records[this.itemsOffsetTop.indexOf(e)].date).format("M")),i=parseInt(this.actualDate.format("M"));n!==i&&(1===n&&12===i?this.setMonth("next"):12===n&&1===i?this.setMonth("prev"):n>i?this.setMonth("next"):n<i&&this.setMonth("prev"),this.actualMonth=this.actualDate.format("MMMM")),this.items.map(function(t){t.activeClass=t.day===a?"active":""})}}},setFixedActions:function(){var t=$(window),e=$("#wrapper"),a=$("#calendar"),n=a.offset().top+3*parseInt($("body, html").css("font-size")),i=this;t.on("scroll",function(s){var o=t.scrollTop();i.hiLightActualDay(o+200),o>=n&&!a.hasClass("is-fixed")?(e.css("padding-top",a.outerHeight()),a.addClass("is-fixed")):o<=n&&a.hasClass("is-fixed")&&(e.css("padding-top",0),a.removeClass("is-fixed"))})},getQueryParameters:function(t){return(t||document.location.search).replace(/(^\?)/,"").split("&").map(function(t){return this[(t=t.split("="))[0]]=t[1],this}.bind({}))[0]},scrollToQueryDate:function(){var t=this.getQueryParameters();(t.day||t.month||t.year)&&this.scrollToDate(t.day,t.month,t.year)},scrollToDate:function(t,e,a){var n,i="";if("string"==typeof e){var s=e;e=this.getMonth(e)}if(t&&(i+="[data-day='"+t+"']"),e&&(i+="[data-month='"+e+"']"),a&&(i+="[data-year='"+a+"']"),!(n=$(i)[0])&&("next"===s||"prev"===s))for(var o=12;o&&!n;)o--,"next"===s?e++:"prev"===s&&e--,e>12?e=0:0===e&&(e=12),i="[data-month='"+e+"']",n=$(i)[0];n?$("html, body").stop().animate({scrollTop:$(n).offset().top-120},800):$("html, body").scrollTop()&&$("html, body").stop().animate({scrollTop:0},800)}},filters:{example:function(t){return t}},watch:{hallnames:{handler:"setCalendarItems",deep:!0},timeline:{handler:"setCalendarItems"},itemsOffsetTop:{handler:"manualHiLightActualDay"}},mounted:function(){this.setFixedActions()},template:'\n<div id="calendar" class="container-fluid theme-bg">\n    <div class="row">\n        <div class="container">\n        <h1 class="title-absolute">Program</h1>\n            <div class="row">\n                <div class="col calendar-title">\n        \n                    <button @click="scrollToDate(false, \'today\')" class="d-inline-block hover-underline btn-invisible cursor-pointer">DNES</button>\n        \n                    <div class="d-inline-block pl-md-5">\n                        <button @click="scrollToDate(false, \'prev\')" class="d-inline-block hover-underline btn-invisible cursor-pointer" aria-label="Předchozí měsíc">&lt;</button>\n                        <span class="px-0 text-uppercase text-center d-inline-block min-w-6rem" aria-current="date">{{actualMonth}}</span>\n                        <button @click="scrollToDate(false, \'next\')" class="d-inline-block hover-underline btn-invisible cursor-pointer" aria-label="Následující měsíc">&gt;</button>\n                    </div>\n        \n                    <div class="d-inline-block pl-md-5">\n                    \n                        <div class="dropdown">\n                            <button class="btn-invisible calendar-scene-select-button cursor-pointer js-check-attr-aria-expanded" type="button" id="sceneFilterDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-current="false">
1\n                                <span>SCÉNA</span> <span class="ml-2 text-decoration-none">&gt;</span>\n                            </button>\n                            <div class="dropdown-menu mdp-dropdown" aria-labelledby="sceneFilterDropdown">\n                                <button v-for="hall in hallnames"\n                                    class="dropdown-item text-uppercase"\n                                    :class="[hall.active ? \'active\' : \'\']"\n                                    @click="hall.active = !hall.active"\n                                    >{{hall.name}}</button>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n            \n            <div class="row collapse show" id="calendar-days">\n                <div class="calendar-days text-left d-lg-flex flex-row justify-content-around pb-1 px-2 w-100">\n                    <div v-for="item in items" class="calendar-item" :class="item.activeClass">\n                        \n                        \x3c!-- \n                            ZMĚNA dle ticketu #202613510:\n                            - odstraněn disabled stav tlačítka\n                            - odstraněna podmínka na dostupnost\n                            - každé tlačítko má nyní natvrdo class "available"\n\n                            PŮVODNÍ KÓD:\n\n                            <button \n                                :disabled="item.availableClass == \'\' || item.availabilityInDayClass == \'\'" \n                                :class="[item.isWeekend, item.availabilityInDayClass]" \n                                @click="scrollToDate(item.day, item.month)">\n                                {{item.day}}\n                            </button>\n                        --\x3e\n                        \n                        <button \n                            class="available"\n                            :class="[item.isWeekend, item.availabilityInDayClass]"\n                            @click="scrollToDate(item.day, item.month)">\n                            {{item.day}}\n                        </button>\n\n                    </div>\n                </div> \n            </div>\n            <div class="row d-lg-none">\n                <div class="col text-right">\n                    <button class="btn btn-invisible btn-calendar-days" type="button" data-toggle="collapse" data-target="#calendar-days"></button>\n                </div>            \n            </div>\n        </div>\n    </div>\n</div>\n'}),Vue.component("comp-citation",{props:["citation"],template:'\n<div class="col-12" v-if="citation">\n    <div class="row pb-5 pt-3">\n        <div class="col-6 col-sm-4 col-md-2 pt-4">\n            <h4 class="text-uppercase mb-0" v-html="citation.title"></h4>\n            <h4 class="text-uppercase" v-html="citation.smallContent"></h4>\n        </div>\n        <div class="col-12 col-sm-8 col-md-8  text-center">\n            <h4 class="text-kr text-kr-big citation-text" v-html="citation.content"></h4>\n        </div>\n    </div>\n</div>\n'});var programApp=new Vue({el:"#vue-program",data:{urls:{records:"/ajax/program/"},allRecords:[],records:[],citations:[],timeline:[],citationsPositions:[],hallnames:[],itemsOffsetTop:[],actualDate:moment()},methods:{getRecords:function(){var t=this;this.$http.get(this.urls.records,{headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST, GET, PUT, OPTIONS, DELETE","Access-Control-Allow-Headers":"Access-Control-Allow-Methods, Access-Control-Allow-Origin, Origin, Accept, Content-Type","Content-Type":"application/json",Accept:"application/json"}}).then(function(e){t.allRecords=e.body.records,t.timeline=e.body.timeline,t.citationsPositions=e.body.citationsPositions,t.hallnames=e.body.hallnames,t.citations=e.body.citations,t.records=t.cloneArray(t.allRecords)},function(t){console.log("getRecords: Error",t.status)})},onItemsOffsetTop:function(t){this.itemsOffsetTop=t},cloneArray:function(t){return Object.assign([],t)},filterRecordsByHallNames:function(){var t=[];this.hallnames.map(function(e){e.active&&t.push(e.name)}),t.length?this.records=this.allRecords.filter(function(e){return t.indexOf(e.hall)>=0}):this.records=this.allRecords}},mounted:function(){this.getRecords()},watch:{hallnames:{handler:"filterRecordsByHallNames",deep:!0}},template:'\n    <div>\n        <comp-calendar\n            :actualDate="actualDate"\n            :records="records"\n            :timeline="timeline"\n            :hallnames="hallnames"\n            :itemsOffsetTop="itemsOffsetTop"></comp-calendar>\n        <comp-records\n            :records="records"\n            :citations="citations"\n            :citationsPositions="citationsPositions"\n            :hallnames="hallnames"\n            @itemsOffsetTop="onItemsOffsetTop"></comp-records>\n    </div>\n'});
2//# sourceMappingURL=app-program.min.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.