{"version":3,"file":"ticket-button-BRjzNUBJ.js","sources":["../../../node_modules/date-fns/isAfter.js","../../../node_modules/lodash/_basePropertyOf.js","../../../node_modules/lodash/_unescapeHtmlChar.js","../../../node_modules/lodash/unescape.js","../../../Scripts/tickets/ticket-button.html?vue-htmltemplate","../../../Scripts/tickets/ticket-button.ts"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n return +toDate(date) > +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = basePropertyOf;\n","var basePropertyOf = require('./_basePropertyOf');\n\n/** Used to map HTML entities to characters. */\nvar htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n};\n\n/**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\nvar unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\nmodule.exports = unescapeHtmlChar;\n","var toString = require('./toString'),\n unescapeHtmlChar = require('./_unescapeHtmlChar');\n\n/** Used to match HTML entities and HTML characters. */\nvar reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source);\n\n/**\n * The inverse of `_.escape`; this method converts the HTML entities\n * `&`, `<`, `>`, `"`, and `'` in `string` to\n * their corresponding characters.\n *\n * **Note:** No other HTML entities are unescaped. To unescape additional\n * HTML entities use a third-party library like [_he_](https://mths.be/he).\n *\n * @static\n * @memberOf _\n * @since 0.6.0\n * @category String\n * @param {string} [string=''] The string to unescape.\n * @returns {string} Returns the unescaped string.\n * @example\n *\n * _.unescape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\nfunction unescape(string) {\n string = toString(string);\n return (string && reHasEscapedHtml.test(string))\n ? string.replace(reEscapedHtml, unescapeHtmlChar)\n : string;\n}\n\nmodule.exports = unescape;\n","
\n\t\n\t
 
\n
\n","import { Vue, Component, Prop, Watch } from \"@wagich/vue-facing-decorator-metadata\";\nimport { isAfter, isBefore, parseISO } from \"date-fns\";\nimport unescape from \"lodash/unescape\";\nimport { Fancybox } from \"@fancyapps/ui\";\n\nimport { render } from \"./ticket-button.html\";\n\nimport type { MovieListItem, MovieListShow } from \"../common/models\";\nimport { trackEvent } from \"../analytics\";\nimport currency from \"currency.js\";\n\n@Component({\n\trender\n})\nexport class TicketButton extends Vue {\n\t@Prop()\n\tmovie: MovieListItem;\n\n\t@Prop()\n\tshow: MovieListShow;\n\n\t@Prop({ default: true, type: Boolean })\n\tshowShowInfo: boolean;\n\n\tget begin(): Date {\n\t\treturn parseISO(this.show.begin);\n\t}\n\n\tget bookingStart(): Date | null {\n\t\tif (this.show.bookingStart == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn parseISO(this.show.bookingStart);\n\t}\n\n\tget bookingEnd(): Date | null {\n\t\tif (this.show.bookingEnd == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn parseISO(this.show.bookingEnd);\n\t}\n\n\tget isEnabled(): boolean {\n\t\tlet now = new Date();\n\t\treturn this.bookingStart != null && isAfter(now, this.bookingStart);\n\t}\n\n\tget disabledTooltip(): string {\n\t\tif (this.isEnabled) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tif (this.bookingStart == null) {\n\t\t\treturn \"Für diese Vorstellung ist kein Onlinekauf möglich.\";\n\t\t}\n\n\t\treturn `Ticketverkauf startet am ${this.bookingStart.toLocaleDateString(\"de-CH\")} um ${this.bookingStart.toLocaleTimeString(\"de-CH\", {timeStyle: \"short\"})} Uhr`;\n\t}\n\n\tget freePercentage(): string {\n\t\t// use currency.js to avoid floating point issues\n\t\tlet percentage = currency(1, { symbol: \"\", precision: 2 })\n\t\t\t.subtract(this.show.occupancyRate)\n\t\t\t.multiply(100)\n\t\t\t.dollars();\n\t\treturn `${percentage.toFixed(0)}%`;\n\t}\n\n\tget occupancyTooltip(): string {\n\t\tif (this.show.isSoldOut) {\n\t\t\treturn \"Keine freien Plätze mehr verfügbar\";\n\t\t}\n\t\tif (this.show.occupancyRate === 0) {\n\t\t\treturn \"Noch alle Plätze verfügbar\";\n\t\t}\n\t\tif (this.show.occupancyRate > 0 && this.show.occupancyRate < 0.95) {\n\t\t\treturn `Noch ca. ${this.freePercentage} freie Plätze`\n\t\t}\n\t\tif (this.show.occupancyRate >= 0.95) {\n\t\t\treturn \"Nur noch wenige freie Plätze\";\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tget hasInfoText(): boolean {\n\t\treturn this.show.infoTextHtml != null;\n\t}\n\n\tget hasNote(): boolean {\n\t\treturn this.show.note != null;\n\t}\n\n\tget isExternalShow(): boolean {\n\t\treturn this.show.externalTicketingUrl != null\n\t\t\t&& this.show.externalTicketingUrl.length > 0;\n\t}\n\n\tget infoTooltip(): string {\n\t\tif (this.hasNote && !this.hasInfoText) {\n\t\t\treturn this.show.note!;\n\t\t}\n\t\treturn \"Informationen\";\n\t}\n\n\tget ticketingUrl(): string {\n\t\treturn `https://ticketonline.kino-thun.ch/Kino-Thun/Show/${this.show.dolphinId}`;\n\t}\n\n\tonClick() {\n\t\tif (!this.isEnabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.show.isSoldOut) {\n\t\t\tthis.$buefy.toast.open({\n\t\t\t\tmessage: \"Kein Onlinekauf mehr möglich. Diese Vorstellung ist ausverkauft.\",\n\t\t\t\ttype: \"is-danger\",\n\t\t\t\tposition: \"is-bottom\",\n\t\t\t\tduration: 6000,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tlet now = new Date();\n\t\tif (this.bookingEnd != null && isAfter(now, this.bookingEnd)) {\n\t\t\tif (this.show.occupancyRate >= 0.9) {\n\t\t\t\tthis.$buefy.toast.open({\n\t\t\t\t\tmessage: \"Kein Onlinekauf mehr möglich. Es sind nur noch wenige Tickets verfügbar, versuchen Sie Ihr Glück an der Kinokasse.\",\n\t\t\t\t\ttype: \"is-danger\",\n\t\t\t\t\tposition: \"is-bottom\",\n\t\t\t\t\tduration: 6000,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.$buefy.toast.open({\n\t\t\t\t\tmessage: \"Kein Onlinekauf mehr möglich, Tickets sind nur noch an der Kinokasse erhältlich.\",\n\t\t\t\t\ttype: \"is-danger\",\n\t\t\t\t\tposition: \"is-bottom\",\n\t\t\t\t\tduration: 6000,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis.openTicketWindow();\n\t}\n\n\topenTicketWindow() {\n\t\ttrackEvent(\"Ticketkauf begonnen\", {\n\t\t\tprops: {\n\t\t\t\tFilm: this.movie.name,\n\t\t\t}\n\t\t});\n\t\twindow.open(this.ticketingUrl);\n\t}\n\n\topenInfo() {\n\t\tlet id = `showinfo-${this.show.dolphinId}`;\n\n\t\tlet content = document.createElement(\"div\");\n\t\tcontent.id = id;\n\t\tcontent.classList.add(\"show-info-container\");\n\n\t\tif (this.hasInfoText) {\n\t\t\tlet showInfo = document.createElement(\"div\");\n\t\t\tshowInfo.classList.add(\"showinfo-content\");\n\t\t\tshowInfo.innerHTML = unescape(this.show.infoTextHtml!);\n\t\t\tcontent.append(showInfo);\n\t\t}\n\n\t\tif (this.hasNote) {\n\t\t\tlet note = document.createElement(\"div\");\n\t\t\tnote.classList.add(\"show-note\");\n\t\t\tlet noteTitle = document.createElement(\"h4\");\n\t\t\tnoteTitle.innerText = \"Bemerkungen\";\n\t\t\tnote.append(noteTitle, document.createTextNode(this.show.note!));\n\t\t\tcontent.prepend(note);\n\t\t}\n\n\t\tdocument.body.appendChild(content);\n\n\t\tnew Fancybox([{\n\t\t\tsrc: `#${id}`,\n\t\t\ttype: \"inline\"\n\t\t}], {\n\t\t\ton: {\n\t\t\t\tdestroy: () => {\n\t\t\t\t\twindow.setTimeout(() => document.getElementById(id)?.remove(), 0);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n"],"names":["basePropertyOf","require$$0","unescapeHtmlChar","require$$1","_createElementVNode","_openBlock","_createElementBlock","show","_renderSlot","onClick","isExternalShow","begin","_createBlock","disabledTooltip","isEnabled","_withCtx","_normalizeClass","ticketingUrl","_withModifiers","occupancyTooltip","_normalizeStyle","freePercentage","_createCommentVNode","_createVNode","infoTooltip","hasInfoText","showShowInfo","hasNote","TicketButton","Vue","parseISO","bookingStart","bookingEnd","now","Date","isAfter","toLocaleDateString","toLocaleTimeString","timeStyle","percentage","currency","symbol","precision","subtract","occupancyRate","multiply","dollars","toFixed","isSoldOut","infoTextHtml","note","externalTicketingUrl","length","dolphinId","$buefy","toast","open","message","type","position","duration","openTicketWindow","trackEvent","props","Film","movie","name","window","openInfo","id","content","document","createElement","classList","add","showInfo","innerHTML","unescape","append","noteTitle","innerText","createTextNode","prepend","body","appendChild","Fancybox","src","on","destroy","setTimeout","getElementById","remove","default","Boolean","render"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,OAAO,CAAC,IAAI,EAAE,aAAa,EAAE;AAC7C,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAChD;;;;;;;;;;ACfA,SAASA,gBAAc,CAAC,MAAM,EAAE;AAChC,EAAE,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