⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.138
Server IP:
186.226.58.36
Server:
Linux da02.sh15.net 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Server Software:
Apache/2
PHP Version:
8.1.32
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
redesystem
/
public_html
/
sys
/
public
/
assets
/
js
/
View File Name :
pages.js
/*! For license information please see pages.js.LICENSE.txt */ (()=>{var __webpack_modules__={908:function(e,t){!function(e){"use strict";var t=function(){return(t=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},n="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},a={weekdays:{shorthand:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],longhand:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},months:{shorthand:["1","2","3","4","5","6","7","8","9","10","11","12"],longhand:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},firstDayOfWeek:6,rangeSeparator:" إلى ",weekAbbreviation:"Wk",scrollTitle:"قم بالتمرير للزيادة",toggleTitle:"اضغط للتبديل",amPM:["ص","م"],yearAriaLabel:"سنة",monthAriaLabel:"شهر",hourAriaLabel:"ساعة",minuteAriaLabel:"دقيقة",time_24hr:!1};n.l10ns.ar=a,n.l10ns;var r="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},i={weekdays:{shorthand:["So","Mo","Di","Mi","Do","Fr","Sa"],longhand:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},months:{shorthand:["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],longhand:["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},firstDayOfWeek:1,weekAbbreviation:"KW",rangeSeparator:" bis ",scrollTitle:"Zum Ändern scrollen",toggleTitle:"Zum Umschalten klicken",time_24hr:!0};r.l10ns.at=i,r.l10ns;var o="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},s={weekdays:{shorthand:["B.","B.e.","Ç.a.","Ç.","C.a.","C.","Ş."],longhand:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"]},months:{shorthand:["Yan","Fev","Mar","Apr","May","İyn","İyl","Avq","Sen","Okt","Noy","Dek"],longhand:["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"]},firstDayOfWeek:1,ordinal:function(){return"."},rangeSeparator:" - ",weekAbbreviation:"Hf",scrollTitle:"Artırmaq üçün sürüşdürün",toggleTitle:"Aç / Bağla",amPM:["GƏ","GS"],time_24hr:!0};o.l10ns.az=s,o.l10ns;var l="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},d={weekdays:{shorthand:["Нд","Пн","Аў","Ср","Чц","Пт","Сб"],longhand:["Нядзеля","Панядзелак","Аўторак","Серада","Чацвер","Пятніца","Субота"]},months:{shorthand:["Сту","Лют","Сак","Кра","Тра","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне"],longhand:["Студзень","Люты","Сакавік","Красавік","Травень","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Снежань"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Тыд.",scrollTitle:"Пракруціце для павелічэння",toggleTitle:"Націсніце для пераключэння",amPM:["ДП","ПП"],yearAriaLabel:"Год",time_24hr:!0};l.l10ns.be=d,l.l10ns;var c="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},u={firstDayOfWeek:1,weekdays:{shorthand:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],longhand:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],longhand:["Januar","Februar","Mart","April","Maj","Juni","Juli","Avgust","Septembar","Oktobar","Novembar","Decembar"]},time_24hr:!0};c.l10ns.bs=u,c.l10ns;var h="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},m={weekdays:{shorthand:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"]},months:{shorthand:["Яну","Фев","Март","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],longhand:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"]},time_24hr:!0,firstDayOfWeek:1};h.l10ns.bg=m,h.l10ns;var p="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},g={weekdays:{shorthand:["রবি","সোম","মঙ্গল","বুধ","বৃহস্পতি","শুক্র","শনি"],longhand:["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"]},months:{shorthand:["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগ","সেপ্টে","অক্টো","নভে","ডিসে"],longhand:["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"]}};p.l10ns.bn=g,p.l10ns;var f="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},v={weekdays:{shorthand:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"],longhand:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"]},months:{shorthand:["Gen","Febr","Març","Abr","Maig","Juny","Jul","Ag","Set","Oct","Nov","Des"],longhand:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"]},ordinal:function(e){var t=e%100;if(t>3&&t<21)return"è";switch(t%10){case 1:return"r";case 2:return"n";case 3:return"r";case 4:return"t";default:return"è"}},firstDayOfWeek:1,rangeSeparator:" a ",time_24hr:!0};f.l10ns.cat=f.l10ns.ca=v,f.l10ns;var w="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},b={weekdays:{shorthand:["یەکشەممە","دووشەممە","سێشەممە","چوارشەممە","پێنجشەممە","هەینی","شەممە"],longhand:["یەکشەممە","دووشەممە","سێشەممە","چوارشەممە","پێنجشەممە","هەینی","شەممە"]},months:{shorthand:["ڕێبەندان","ڕەشەمە","نەورۆز","گوڵان","جۆزەردان","پووشپەڕ","گەلاوێژ","خەرمانان","ڕەزبەر","گەڵاڕێزان","سەرماوەز","بەفرانبار"],longhand:["ڕێبەندان","ڕەشەمە","نەورۆز","گوڵان","جۆزەردان","پووشپەڕ","گەلاوێژ","خەرمانان","ڕەزبەر","گەڵاڕێزان","سەرماوەز","بەفرانبار"]},firstDayOfWeek:6,ordinal:function(){return""}};w.l10ns.ckb=b,w.l10ns;var y="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},$={weekdays:{shorthand:["Ne","Po","Út","St","Čt","Pá","So"],longhand:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota"]},months:{shorthand:["Led","Ún","Bře","Dub","Kvě","Čer","Čvc","Srp","Zář","Říj","Lis","Pro"],longhand:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"]},firstDayOfWeek:1,ordinal:function(){return"."},rangeSeparator:" do ",weekAbbreviation:"Týd.",scrollTitle:"Rolujte pro změnu",toggleTitle:"Přepnout dopoledne/odpoledne",amPM:["dop.","odp."],yearAriaLabel:"Rok",time_24hr:!0};y.l10ns.cs=$,y.l10ns;var k="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},S={weekdays:{shorthand:["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],longhand:["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"]},months:{shorthand:["Ion","Chwef","Maw","Ebr","Mai","Meh","Gorff","Awst","Medi","Hyd","Tach","Rhag"],longhand:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"]},firstDayOfWeek:1,ordinal:function(e){return 1===e?"af":2===e?"ail":3===e||4===e?"ydd":5===e||6===e?"ed":e>=7&&e<=10||12==e||15==e||18==e||20==e?"fed":11==e||13==e||14==e||16==e||17==e||19==e?"eg":e>=21&&e<=39?"ain":""},time_24hr:!0};k.l10ns.cy=S,k.l10ns;var L="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},D={weekdays:{shorthand:["søn","man","tir","ons","tors","fre","lør"],longhand:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},months:{shorthand:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],longhand:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"]},ordinal:function(){return"."},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"uge",time_24hr:!0};L.l10ns.da=D,L.l10ns;var M="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},T={weekdays:{shorthand:["So","Mo","Di","Mi","Do","Fr","Sa"],longhand:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},months:{shorthand:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],longhand:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},firstDayOfWeek:1,weekAbbreviation:"KW",rangeSeparator:" bis ",scrollTitle:"Zum Ändern scrollen",toggleTitle:"Zum Umschalten klicken",time_24hr:!0};M.l10ns.de=T,M.l10ns;var _={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},C="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},j={firstDayOfWeek:1,rangeSeparator:" ĝis ",weekAbbreviation:"Sem",scrollTitle:"Rulumu por pligrandigi la valoron",toggleTitle:"Klaku por ŝalti",weekdays:{shorthand:["Dim","Lun","Mar","Mer","Ĵaŭ","Ven","Sab"],longhand:["dimanĉo","lundo","mardo","merkredo","ĵaŭdo","vendredo","sabato"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aŭg","Sep","Okt","Nov","Dec"],longhand:["januaro","februaro","marto","aprilo","majo","junio","julio","aŭgusto","septembro","oktobro","novembro","decembro"]},ordinal:function(){return"-a"},time_24hr:!0};C.l10ns.eo=j,C.l10ns;var E="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},A={weekdays:{shorthand:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],longhand:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]},months:{shorthand:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],longhand:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]},ordinal:function(){return"º"},firstDayOfWeek:1,rangeSeparator:" a ",time_24hr:!0};E.l10ns.es=A,E.l10ns;var x="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},F={weekdays:{shorthand:["P","E","T","K","N","R","L"],longhand:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"]},months:{shorthand:["Jaan","Veebr","Märts","Apr","Mai","Juuni","Juuli","Aug","Sept","Okt","Nov","Dets"],longhand:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"]},firstDayOfWeek:1,ordinal:function(){return"."},weekAbbreviation:"Näd",rangeSeparator:" kuni ",scrollTitle:"Keri, et suurendada",toggleTitle:"Klõpsa, et vahetada",time_24hr:!0};x.l10ns.et=F,x.l10ns;var P="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},O={weekdays:{shorthand:["یک","دو","سه","چهار","پنج","جمعه","شنبه"],longhand:["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنچشنبه","جمعه","شنبه"]},months:{shorthand:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],longhand:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"]},firstDayOfWeek:6,ordinal:function(){return""}};P.l10ns.fa=O,P.l10ns;var R="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},I={firstDayOfWeek:1,weekdays:{shorthand:["su","ma","ti","ke","to","pe","la"],longhand:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},months:{shorthand:["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu"],longhand:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"]},ordinal:function(){return"."},time_24hr:!0};R.l10ns.fi=I,R.l10ns;var N="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},q={weekdays:{shorthand:["Sun","Mán","Týs","Mik","Hós","Frí","Ley"],longhand:["Sunnudagur","Mánadagur","Týsdagur","Mikudagur","Hósdagur","Fríggjadagur","Leygardagur"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],longhand:["Januar","Februar","Mars","Apríl","Mai","Juni","Juli","August","Septembur","Oktobur","Novembur","Desembur"]},ordinal:function(){return"."},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"vika",scrollTitle:"Rulla fyri at broyta",toggleTitle:"Trýst fyri at skifta",yearAriaLabel:"Ár",time_24hr:!0};N.l10ns.fo=q,N.l10ns;var Y="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},J={firstDayOfWeek:1,weekdays:{shorthand:["dim","lun","mar","mer","jeu","ven","sam"],longhand:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},months:{shorthand:["janv","févr","mars","avr","mai","juin","juil","août","sept","oct","nov","déc"],longhand:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},ordinal:function(e){return e>1?"":"er"},rangeSeparator:" au ",weekAbbreviation:"Sem",scrollTitle:"Défiler pour augmenter la valeur",toggleTitle:"Cliquer pour basculer",time_24hr:!0};Y.l10ns.fr=J,Y.l10ns;var B="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},H={weekdays:{shorthand:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],longhand:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},months:{shorthand:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],longhand:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},firstDayOfWeek:1,ordinal:function(){return""},weekAbbreviation:"Εβδ",rangeSeparator:" έως ",scrollTitle:"Μετακυλήστε για προσαύξηση",toggleTitle:"Κάντε κλικ για αλλαγή",amPM:["ΠΜ","ΜΜ"],yearAriaLabel:"χρόνος",monthAriaLabel:"μήνας",hourAriaLabel:"ώρα",minuteAriaLabel:"λεπτό"};B.l10ns.gr=H,B.l10ns;var W="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},U={weekdays:{shorthand:["א","ב","ג","ד","ה","ו","ש"],longhand:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"]},months:{shorthand:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"],longhand:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"]},rangeSeparator:" אל ",time_24hr:!0};W.l10ns.he=U,W.l10ns;var V="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},z={weekdays:{shorthand:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],longhand:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"]},months:{shorthand:["जन","फर","मार्च","अप्रेल","मई","जून","जूलाई","अग","सित","अक्ट","नव","दि"],longhand:["जनवरी ","फरवरी","मार्च","अप्रेल","मई","जून","जूलाई","अगस्त ","सितम्बर","अक्टूबर","नवम्बर","दिसम्बर"]}};V.l10ns.hi=z,V.l10ns;var K="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Q={firstDayOfWeek:1,weekdays:{shorthand:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],longhand:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},months:{shorthand:["Sij","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro"],longhand:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"]},time_24hr:!0};K.l10ns.hr=Q,K.l10ns;var G="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Z={firstDayOfWeek:1,weekdays:{shorthand:["V","H","K","Sz","Cs","P","Szo"],longhand:["Vasárnap","Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat"]},months:{shorthand:["Jan","Feb","Már","Ápr","Máj","Jún","Júl","Aug","Szep","Okt","Nov","Dec"],longhand:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"]},ordinal:function(){return"."},weekAbbreviation:"Hét",scrollTitle:"Görgessen",toggleTitle:"Kattintson a váltáshoz",rangeSeparator:" - ",time_24hr:!0};G.l10ns.hu=Z,G.l10ns;var X="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ee={weekdays:{shorthand:["Կիր","Երկ","Երք","Չրք","Հնգ","Ուրբ","Շբթ"],longhand:["Կիրակի","Եկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","Ուրբաթ","Շաբաթ"]},months:{shorthand:["Հնվ","Փտր","Մար","Ապր","Մայ","Հնս","Հլս","Օգս","Սեպ","Հոկ","Նմբ","Դեկ"],longhand:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"ՇԲՏ",scrollTitle:"Ոլորեք՝ մեծացնելու համար",toggleTitle:"Սեղմեք՝ փոխելու համար",amPM:["ՄԿ","ԿՀ"],yearAriaLabel:"Տարի",monthAriaLabel:"Ամիս",hourAriaLabel:"Ժամ",minuteAriaLabel:"Րոպե",time_24hr:!0};X.l10ns.hy=ee,X.l10ns;var te="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ne={weekdays:{shorthand:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],longhand:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"],longhand:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},firstDayOfWeek:1,ordinal:function(){return""},time_24hr:!0,rangeSeparator:" - "};te.l10ns.id=ne,te.l10ns;var ae="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},re={weekdays:{shorthand:["Sun","Mán","Þri","Mið","Fim","Fös","Lau"],longhand:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],longhand:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"]},ordinal:function(){return"."},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"vika",yearAriaLabel:"Ár",time_24hr:!0};ae.l10ns.is=re,ae.l10ns;var ie="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},oe={weekdays:{shorthand:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],longhand:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"]},months:{shorthand:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],longhand:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]},firstDayOfWeek:1,ordinal:function(){return"°"},rangeSeparator:" al ",weekAbbreviation:"Se",scrollTitle:"Scrolla per aumentare",toggleTitle:"Clicca per cambiare",time_24hr:!0};ie.l10ns.it=oe,ie.l10ns;var se="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},le={weekdays:{shorthand:["日","月","火","水","木","金","土"],longhand:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"]},months:{shorthand:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],longhand:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},time_24hr:!0,rangeSeparator:" から ",monthAriaLabel:"月",amPM:["午前","午後"],yearAriaLabel:"年",hourAriaLabel:"時間",minuteAriaLabel:"分"};se.l10ns.ja=le,se.l10ns;var de="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ce={weekdays:{shorthand:["კვ","ორ","სა","ოთ","ხუ","პა","შა"],longhand:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"]},months:{shorthand:["იან","თებ","მარ","აპრ","მაი","ივნ","ივლ","აგვ","სექ","ოქტ","ნოე","დეკ"],longhand:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"კვ.",scrollTitle:"დასქროლეთ გასადიდებლად",toggleTitle:"დააკლიკეთ გადართვისთვის",amPM:["AM","PM"],yearAriaLabel:"წელი",time_24hr:!0};de.l10ns.ka=ce,de.l10ns;var ue="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},he={weekdays:{shorthand:["일","월","화","수","목","금","토"],longhand:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},months:{shorthand:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],longhand:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},ordinal:function(){return"일"},rangeSeparator:" ~ ",amPM:["오전","오후"]};ue.l10ns.ko=he,ue.l10ns;var me="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},pe={weekdays:{shorthand:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស.","សុក្រ","សៅរ៍"],longhand:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស្បតិ៍","សុក្រ","សៅរ៍"]},months:{shorthand:["មករា","កុម្ភះ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],longhand:["មករា","កុម្ភះ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"]},ordinal:function(){return""},firstDayOfWeek:1,rangeSeparator:" ដល់ ",weekAbbreviation:"សប្តាហ៍",scrollTitle:"រំកិលដើម្បីបង្កើន",toggleTitle:"ចុចដើម្បីផ្លាស់ប្ដូរ",yearAriaLabel:"ឆ្នាំ",time_24hr:!0};me.l10ns.km=pe,me.l10ns;var ge="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},fe={weekdays:{shorthand:["Жс","Дс","Сc","Ср","Бс","Жм","Сб"],longhand:["Жексенбi","Дүйсенбi","Сейсенбi","Сәрсенбi","Бейсенбi","Жұма","Сенбi"]},months:{shorthand:["Қаң","Ақп","Нау","Сәу","Мам","Мау","Шiл","Там","Қыр","Қаз","Қар","Жел"],longhand:["Қаңтар","Ақпан","Наурыз","Сәуiр","Мамыр","Маусым","Шiлде","Тамыз","Қыркүйек","Қазан","Қараша","Желтоқсан"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Апта",scrollTitle:"Үлкейту үшін айналдырыңыз",toggleTitle:"Ауыстыру үшін басыңыз",amPM:["ТД","ТК"],yearAriaLabel:"Жыл"};ge.l10ns.kz=fe,ge.l10ns;var ve="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},we={weekdays:{shorthand:["S","Pr","A","T","K","Pn","Š"],longhand:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis"]},months:{shorthand:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd"],longhand:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"]},firstDayOfWeek:1,ordinal:function(){return"-a"},rangeSeparator:" iki ",weekAbbreviation:"Sav",scrollTitle:"Keisti laiką pelės rateliu",toggleTitle:"Perjungti laiko formatą",time_24hr:!0};ve.l10ns.lt=we,ve.l10ns;var be="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ye={firstDayOfWeek:1,weekdays:{shorthand:["Sv","Pr","Ot","Tr","Ce","Pk","Se"],longhand:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],longhand:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"]},rangeSeparator:" līdz ",time_24hr:!0};be.l10ns.lv=ye,be.l10ns;var $e="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ke={weekdays:{shorthand:["Не","По","Вт","Ср","Че","Пе","Са"],longhand:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"]},months:{shorthand:["Јан","Фев","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Ное","Дек"],longhand:["Јануари","Февруари","Март","Април","Мај","Јуни","Јули","Август","Септември","Октомври","Ноември","Декември"]},firstDayOfWeek:1,weekAbbreviation:"Нед.",rangeSeparator:" до ",time_24hr:!0};$e.l10ns.mk=ke,$e.l10ns;var Se="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Le={firstDayOfWeek:1,weekdays:{shorthand:["Да","Мя","Лх","Пү","Ба","Бя","Ня"],longhand:["Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба","Ням"]},months:{shorthand:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],longhand:["Нэгдүгээр сар","Хоёрдугаар сар","Гуравдугаар сар","Дөрөвдүгээр сар","Тавдугаар сар","Зургаадугаар сар","Долдугаар сар","Наймдугаар сар","Есдүгээр сар","Аравдугаар сар","Арваннэгдүгээр сар","Арванхоёрдугаар сар"]},rangeSeparator:"-с ",time_24hr:!0};Se.l10ns.mn=Le,Se.l10ns;var De="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Me={weekdays:{shorthand:["Aha","Isn","Sel","Rab","Kha","Jum","Sab"],longhand:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"]},months:{shorthand:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],longhand:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"]},firstDayOfWeek:1,ordinal:function(){return""}};De.l10ns;var Te="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},_e={weekdays:{shorthand:["နွေ","လာ","ဂါ","ဟူး","ကြာ","သော","နေ"],longhand:["တနင်္ဂနွေ","တနင်္လာ","အင်္ဂါ","ဗုဒ္ဓဟူး","ကြာသပတေး","သောကြာ","စနေ"]},months:{shorthand:["ဇန်","ဖေ","မတ်","ပြီ","မေ","ဇွန်","လိုင်","သြ","စက်","အောက်","နို","ဒီ"],longhand:["ဇန်နဝါရီ","ဖေဖော်ဝါရီ","မတ်","ဧပြီ","မေ","ဇွန်","ဇူလိုင်","သြဂုတ်","စက်တင်ဘာ","အောက်တိုဘာ","နိုဝင်ဘာ","ဒီဇင်ဘာ"]},firstDayOfWeek:1,ordinal:function(){return""},time_24hr:!0};Te.l10ns.my=_e,Te.l10ns;var Ce="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},je={weekdays:{shorthand:["zo","ma","di","wo","do","vr","za"],longhand:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},months:{shorthand:["jan","feb","mrt","apr","mei","jun","jul","aug","sept","okt","nov","dec"],longhand:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},firstDayOfWeek:1,weekAbbreviation:"wk",rangeSeparator:" t/m ",scrollTitle:"Scroll voor volgende / vorige",toggleTitle:"Klik om te wisselen",time_24hr:!0,ordinal:function(e){return 1===e||8===e||e>=20?"ste":"de"}};Ce.l10ns.nl=je,Ce.l10ns;var Ee="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Ae={weekdays:{shorthand:["Sø.","Må.","Ty.","On.","To.","Fr.","La."],longhand:["Søndag","Måndag","Tysdag","Onsdag","Torsdag","Fredag","Laurdag"]},months:{shorthand:["Jan","Feb","Mars","Apr","Mai","Juni","Juli","Aug","Sep","Okt","Nov","Des"],longhand:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"]},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"Veke",scrollTitle:"Scroll for å endre",toggleTitle:"Klikk for å veksle",time_24hr:!0,ordinal:function(){return"."}};Ee.l10ns.nn=Ae,Ee.l10ns;var xe="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Fe={weekdays:{shorthand:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],longhand:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],longhand:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"]},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"Uke",scrollTitle:"Scroll for å endre",toggleTitle:"Klikk for å veksle",time_24hr:!0,ordinal:function(){return"."}};xe.l10ns.no=Fe,xe.l10ns;var Pe="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Oe={weekdays:{shorthand:["ਐਤ","ਸੋਮ","ਮੰਗਲ","ਬੁੱਧ","ਵੀਰ","ਸ਼ੁੱਕਰ","ਸ਼ਨਿੱਚਰ"],longhand:["ਐਤਵਾਰ","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬੁੱਧਵਾਰ","ਵੀਰਵਾਰ","ਸ਼ੁੱਕਰਵਾਰ","ਸ਼ਨਿੱਚਰਵਾਰ"]},months:{shorthand:["ਜਨ","ਫ਼ਰ","ਮਾਰ","ਅਪ੍ਰੈ","ਮਈ","ਜੂਨ","ਜੁਲਾ","ਅਗ","ਸਤੰ","ਅਕ","ਨਵੰ","ਦਸੰ"],longhand:["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ"]},time_24hr:!0};Pe.l10ns.pa=Oe,Pe.l10ns;var Re="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Ie={weekdays:{shorthand:["Nd","Pn","Wt","Śr","Cz","Pt","So"],longhand:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"]},months:{shorthand:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],longhand:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"]},rangeSeparator:" do ",weekAbbreviation:"tydz.",scrollTitle:"Przewiń, aby zwiększyć",toggleTitle:"Kliknij, aby przełączyć",firstDayOfWeek:1,time_24hr:!0,ordinal:function(){return"."}};Re.l10ns.pl=Ie,Re.l10ns;var Ne="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},qe={weekdays:{shorthand:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],longhand:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"]},months:{shorthand:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],longhand:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]},rangeSeparator:" até ",time_24hr:!0};Ne.l10ns.pt=qe,Ne.l10ns;var Ye="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Je={weekdays:{shorthand:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm"],longhand:["Duminică","Luni","Marți","Miercuri","Joi","Vineri","Sâmbătă"]},months:{shorthand:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Noi","Dec"],longhand:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"]},firstDayOfWeek:1,time_24hr:!0,ordinal:function(){return""}};Ye.l10ns.ro=Je,Ye.l10ns;var Be="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},He={weekdays:{shorthand:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},months:{shorthand:["Янв","Фев","Март","Апр","Май","Июнь","Июль","Авг","Сен","Окт","Ноя","Дек"],longhand:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Нед.",scrollTitle:"Прокрутите для увеличения",toggleTitle:"Нажмите для переключения",amPM:["ДП","ПП"],yearAriaLabel:"Год",time_24hr:!0};Be.l10ns.ru=He,Be.l10ns;var We="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Ue={weekdays:{shorthand:["ඉ","ස","අ","බ","බ්ර","සි","සෙ"],longhand:["ඉරිදා","සඳුදා","අඟහරුවාදා","බදාදා","බ්රහස්පතින්දා","සිකුරාදා","සෙනසුරාදා"]},months:{shorthand:["ජන","පෙබ","මාර්","අප්රේ","මැයි","ජුනි","ජූලි","අගෝ","සැප්","ඔක්","නොවැ","දෙසැ"],longhand:["ජනවාරි","පෙබරවාරි","මාර්තු","අප්රේල්","මැයි","ජුනි","ජූලි","අගෝස්තු","සැප්තැම්බර්","ඔක්තෝබර්","නොවැම්බර්","දෙසැම්බර්"]},time_24hr:!0};We.l10ns.si=Ue,We.l10ns;var Ve="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ze={weekdays:{shorthand:["Ned","Pon","Ut","Str","Štv","Pia","Sob"],longhand:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Máj","Jún","Júl","Aug","Sep","Okt","Nov","Dec"],longhand:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"]},firstDayOfWeek:1,rangeSeparator:" do ",time_24hr:!0,ordinal:function(){return"."}};Ve.l10ns.sk=ze,Ve.l10ns;var Ke="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Qe={weekdays:{shorthand:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],longhand:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],longhand:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"]},firstDayOfWeek:1,rangeSeparator:" do ",time_24hr:!0,ordinal:function(){return"."}};Ke.l10ns.sl=Qe,Ke.l10ns;var Ge="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Ze={weekdays:{shorthand:["Di","Hë","Ma","Më","En","Pr","Sh"],longhand:["E Diel","E Hënë","E Martë","E Mërkurë","E Enjte","E Premte","E Shtunë"]},months:{shorthand:["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gus","Sht","Tet","Nën","Dhj"],longhand:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"]},firstDayOfWeek:1,rangeSeparator:" deri ",weekAbbreviation:"Java",yearAriaLabel:"Viti",monthAriaLabel:"Muaji",hourAriaLabel:"Ora",minuteAriaLabel:"Minuta",time_24hr:!0};Ge.l10ns.sq=Ze,Ge.l10ns;var Xe="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},et={weekdays:{shorthand:["Ned","Pon","Uto","Sre","Čet","Pet","Sub"],longhand:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],longhand:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"]},firstDayOfWeek:1,weekAbbreviation:"Ned.",rangeSeparator:" do ",time_24hr:!0};Xe.l10ns.sr=et,Xe.l10ns;var tt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},nt={firstDayOfWeek:1,weekAbbreviation:"v",weekdays:{shorthand:["sön","mån","tis","ons","tor","fre","lör"],longhand:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"]},months:{shorthand:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],longhand:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]},rangeSeparator:" till ",time_24hr:!0,ordinal:function(){return"."}};tt.l10ns.sv=nt,tt.l10ns;var at="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},rt={weekdays:{shorthand:["อา","จ","อ","พ","พฤ","ศ","ส"],longhand:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"]},months:{shorthand:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],longhand:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"]},firstDayOfWeek:1,rangeSeparator:" ถึง ",scrollTitle:"เลื่อนเพื่อเพิ่มหรือลด",toggleTitle:"คลิกเพื่อเปลี่ยน",time_24hr:!0,ordinal:function(){return""}};at.l10ns.th=rt,at.l10ns;var it="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ot={weekdays:{shorthand:["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],longhand:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},months:{shorthand:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],longhand:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"]},firstDayOfWeek:1,ordinal:function(){return"."},rangeSeparator:" - ",weekAbbreviation:"Hf",scrollTitle:"Artırmak için kaydırın",toggleTitle:"Aç/Kapa",amPM:["ÖÖ","ÖS"],time_24hr:!0};it.l10ns.tr=ot,it.l10ns;var st="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},lt={firstDayOfWeek:1,weekdays:{shorthand:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"]},months:{shorthand:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],longhand:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"]},time_24hr:!0};st.l10ns.uk=lt,st.l10ns;var dt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ct={weekdays:{shorthand:["Якш","Душ","Сеш","Чор","Пай","Жум","Шан"],longhand:["Якшанба","Душанба","Сешанба","Чоршанба","Пайшанба","Жума","Шанба"]},months:{shorthand:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],longhand:["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Ҳафта",scrollTitle:"Катталаштириш учун айлантиринг",toggleTitle:"Ўтиш учун босинг",amPM:["AM","PM"],yearAriaLabel:"Йил",time_24hr:!0};dt.l10ns.uz=ct,dt.l10ns;var ut="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ht={weekdays:{shorthand:["Ya","Du","Se","Cho","Pa","Ju","Sha"],longhand:["Yakshanba","Dushanba","Seshanba","Chorshanba","Payshanba","Juma","Shanba"]},months:{shorthand:["Yan","Fev","Mar","Apr","May","Iyun","Iyul","Avg","Sen","Okt","Noy","Dek"],longhand:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avgust","Sentabr","Oktabr","Noyabr","Dekabr"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Hafta",scrollTitle:"Kattalashtirish uchun aylantiring",toggleTitle:"O‘tish uchun bosing",amPM:["AM","PM"],yearAriaLabel:"Yil",time_24hr:!0};ut.l10ns.uz_latn=ht,ut.l10ns;var mt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},pt={weekdays:{shorthand:["CN","T2","T3","T4","T5","T6","T7"],longhand:["Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy"]},months:{shorthand:["Th1","Th2","Th3","Th4","Th5","Th6","Th7","Th8","Th9","Th10","Th11","Th12"],longhand:["Tháng một","Tháng hai","Tháng ba","Tháng tư","Tháng năm","Tháng sáu","Tháng bảy","Tháng tám","Tháng chín","Tháng mười","Tháng mười một","Tháng mười hai"]},firstDayOfWeek:1,rangeSeparator:" đến "};mt.l10ns.vn=pt,mt.l10ns;var gt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ft={weekdays:{shorthand:["周日","周一","周二","周三","周四","周五","周六"],longhand:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},months:{shorthand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],longhand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},rangeSeparator:" 至 ",weekAbbreviation:"周",scrollTitle:"滚动切换",toggleTitle:"点击切换 12/24 小时时制"};gt.l10ns.zh=ft,gt.l10ns;var vt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},wt={weekdays:{shorthand:["週日","週一","週二","週三","週四","週五","週六"],longhand:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},months:{shorthand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],longhand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},rangeSeparator:" 至 ",weekAbbreviation:"週",scrollTitle:"滾動切換",toggleTitle:"點擊切換 12/24 小時時制"};vt.l10ns.zh_tw=wt,vt.l10ns;var bt={ar:a,at:i,az:s,be:d,bg:m,bn:g,bs:u,ca:v,ckb:b,cat:v,cs:$,cy:S,da:D,de:T,default:t({},_),en:_,eo:j,es:A,et:F,fa:O,fi:I,fo:q,fr:J,gr:H,he:U,hi:z,hr:Q,hu:Z,hy:ee,id:ne,is:re,it:oe,ja:le,ka:ce,ko:he,km:pe,kz:fe,lt:we,lv:ye,mk:ke,mn:Le,ms:Me,my:_e,nl:je,nn:Ae,no:Fe,pa:Oe,pl:Ie,pt:qe,ro:Je,ru:He,si:Ue,sk:ze,sl:Qe,sq:Ze,sr:et,sv:nt,th:rt,tr:ot,uk:lt,vn:pt,zh:ft,zh_tw:wt,uz:ct,uz_latn:ht};e.default=bt,Object.defineProperty(e,"__esModule",{value:!0})}(t)},11:e=>{!function(t,n){var a=n.jQuery;e.exports=a?t(n,a):function(e){if(e&&!e.fn)throw"Provide jQuery or null";return t(n,e)}}((function(e,t){"use strict";var n=!1===t;t=t&&t.fn?t:e.jQuery;var a,r,i,o,s,l,d,c,u,h,m,p,g,f,v,w,b,y,$,k,S,L,D="v1.0.11",M="_ocp",T=/[ \t]*(\r\n|\n|\r)/g,_=/\\(['"\\])/g,C=/['"\\]/g,j=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,E=/^if\s/,A=/<(\w+)[>\s]/,x=/[\x00`><\"'&=]/,F=/^on[A-Z]|^convert(Back)?$/,P=/^\#\d+_`[\s\S]*\/\d+_`$/,O=/[\x00`><"'&=]/g,R=/[&<>]/g,I=/&(amp|gt|lt);/g,N=/\[['"]?|['"]?\]/g,q=0,Y={"&":"&","<":"<",">":">","\0":"�","'":"'",'"':""","`":"`","=":"="},J={amp:"&",gt:">",lt:"<"},B="html",H="object",W="data-jsv-tmpl",U="jsvTmpl",V="For #index in nested block use #getIndex().",z={},K={},Q=e.jsrender,G=Q&&t&&!t.render,Z={template:{compile:function e(n,a,r,i){function s(a){var o,s;if(""+a===a||a.nodeType>0&&(l=a)){if(!l)if(/^\.?\/[^\\:*?"<>]*$/.test(a))(s=c[n=n||a])?a=s:l=document.getElementById(a);else if("#"===a.charAt(0))l=document.getElementById(a.slice(1));else if(t.fn&&!p.rTmpl.test(a))try{l=t(a,document)[0]}catch(e){}l&&("SCRIPT"!==l.tagName&&ke(a+": Use script block, not "+l.tagName),i?a=l.innerHTML:((o=l.getAttribute(W))&&(o!==U?(a=c[o],delete c[o]):t.fn&&(a=t.data(l).jsvTmpl)),o&&a||(n=n||(t.fn?U:a),a=e(n,l.innerHTML,r,i)),a.tmplName=n=n||o,n!==U&&(c[n]=a),l.setAttribute(W,n),t.fn&&t.data(l,U,a))),l=void 0}else a.fn||(a=void 0);return a}var l,d,h=a=a||"";p._html=u.html,0===i&&(i=void 0,h=s(h));(i=i||(a.markup?a.bnds?ie({},a):a:{})).tmplName=i.tmplName||n||"unnamed",r&&(i._parentTmpl=r);!h&&a.markup&&(h=s(a.markup))&&h.fn&&(h=h.markup);if(void 0!==h)return h.render||a.render?h.tmpls&&(d=h):(a=fe(h,i),Le(h.replace(C,"\\$&"),a)),d||function(e){var t,n,a;for(t in Z)e[n=t+"s"]&&(a=e[n],e[n]={},o[n](a,e))}(d=ie((function(){return d.render.apply(d,arguments)}),a)),d}},tag:{compile:function(e,t,n){var a,r,i,o=new p._tg;function s(){var t=this;t._={unlinked:!0},t.inline=!0,t.tagName=e}l(t)?t={depends:t.depends,render:t}:""+t===t&&(t={template:t});if(r=t.baseTag)for(i in t.flow=!!t.flow,(r=""+r===r?n&&n.tags[r]||m[r]:r)||ke('baseTag: "'+t.baseTag+'" not found'),o=ie(o,r),t)o[i]=ee(r[i],t[i]);else o=ie(o,t);void 0!==(a=o.template)&&(o.template=""+a===a?c[a]||c(a):a);(s.prototype=o).constructor=o._ctr=s,n&&(o._parentTmpl=n);return o}},viewModel:{compile:function(e,n){var a,r,i,o=this,c=n.getters,u=n.extend,h=n.id,m=t.extend({_is:e||"unnamed",unmap:S,merge:k},u),p="",g="",f=c?c.length:0,v=t.observable,w={};function b(e){r.apply(this,e)}function y(){return new b(arguments)}function $(e,t){for(var n,a,r,i,s,l=0;l<f;l++)n=void 0,(r=c[l])+""!==r&&(r=(n=r).getter,s=n.parentRef),void 0===(i=e[r])&&n&&void 0!==(a=n.defaultVal)&&(i=pe(a,e)),t(i,n&&o[n.type],r,s)}function k(e,t,n){e=e+""===e?JSON.parse(e):e;var a,r,i,o,l,c,u,m,p,g,f=0,b=this;if(d(b)){for(u={},p=[],r=e.length,i=b.length;f<r;f++){for(m=e[f],c=!1,a=0;a<i&&!c;a++)u[a]||(l=b[a],h&&(u[a]=c=h+""===h?m[h]&&(w[h]?l[h]():l[h])===m[h]:h(l,m)));c?(l.merge(m),p.push(l)):(p.push(g=y.map(m)),n&&ge(g,n,t))}v?v(b).refresh(p,!0):b.splice.apply(b,[0,b.length].concat(p))}else for(o in $(e,(function(e,t,n,a){t?b[n]().merge(e,b,a):b[n]()!==e&&b[n](e)})),e)o===s||w[o]||(b[o]=e[o])}function S(){var e,t,n,a,r=0,i=this;function u(e){for(var t=[],n=0,a=e.length;n<a;n++)t.push(e[n].unmap());return t}if(d(i))return u(i);for(e={};r<f;r++)n=void 0,(t=c[r])+""!==t&&(t=(n=t).getter),a=i[t](),e[t]=n&&a&&o[n.type]?d(a)?u(a):a.unmap():a;for(t in i)!i.hasOwnProperty(t)||"_"===t.charAt(0)&&w[t.slice(1)]||t===s||l(i[t])||(e[t]=i[t]);return e}for(b.prototype=m,a=0;a<f;a++)!function(e){e=e.getter||e,w[e]=a+1;var t="_"+e;p+=(p?",":"")+e,g+="this."+t+" = "+e+";\n",m[e]=m[e]||function(n){if(!arguments.length)return this[t];v?v(this).setProperty(e,n):this[t]=n},v&&(m[e].set=m[e].set||function(e){this[t]=e})}(c[a]);return g=new Function(p,g),(r=function(){g.apply(this,arguments),(i=arguments[f+1])&&ge(this,arguments[f],i)}).prototype=m,m.constructor=r,y.map=function(t){t=t+""===t?JSON.parse(t):t;var n,a,r,i,o=0,l=t,u=[];if(d(t)){for(n=(t=t||[]).length;o<n;o++)u.push(this.map(t[o]));return u._is=e,u.unmap=S,u.merge=k,u}if(t){for($(t,(function(e,t){t&&(e=t.map(e)),u.push(e)})),l=this.apply(this,u),o=f;o--;)if(r=u[o],(i=c[o].parentRef)&&r&&r.unmap)if(d(r))for(n=r.length;n--;)ge(r[n],i,l);else ge(r,i,l);for(a in t)a===s||w[a]||(l[a]=t[a])}return l},y.getters=c,y.extend=u,y.id=h,y}},helper:{},converter:{}};function X(e,t){return function(){var n,a=this,r=a.base;return a.base=e,n=t.apply(a,arguments),a.base=r,n}}function ee(e,t){return l(t)&&((t=X(e?e._d?e:X(ae,e):ae,t))._d=(e&&e._d||0)+1),t}function te(e,t){var n,a=t.props;for(n in a)!F.test(n)||e[n]&&e[n].fix||(e[n]="convert"!==n?ee(e.constructor.prototype[n],a[n]):a[n])}function ne(e){return e}function ae(){return""}function re(e){this.name=(t.link?"JsViews":"JsRender")+" Error",this.message=e||this.name}function ie(e,t){if(e){for(var n in t)e[n]=t[n];return e}}function oe(){var e=this.get("item");return e?e.index:void 0}function se(){return this.index}function le(e,t,n,a){var r,i,o,s=0;if(1===n&&(a=1,n=void 0),t)for(o=(i=t.split(".")).length;e&&s<o;s++)r=e,e=i[s]?e[i[s]]:e;return n&&(n.lt=n.lt||s<o),void 0===e?a?ae:"":a?function(){return e.apply(r,arguments)}:e}function de(n,a,r){var i,o,s,d,c,u,m,g=this,f=!L&&arguments.length>1,v=g.ctx;if(n){if(g._||(c=g.index,g=g.tag),u=g,v&&v.hasOwnProperty(n)||(v=h).hasOwnProperty(n)){if(s=v[n],"tag"===n||"tagCtx"===n||"root"===n||"parentTags"===n)return s}else v=void 0;if((!L&&g.tagCtx||g.linked)&&(s&&s._cxp||(g=g.tagCtx||l(s)?g:!(g=g.scope||g).isTop&&g.ctx.tag||g,void 0!==s&&g.tagCtx&&(g=g.tagCtx.view.scope),v=g._ocps,(s=v&&v.hasOwnProperty(n)&&v[n]||s)&&s._cxp||!r&&!f||((v||(g._ocps=g._ocps||{}))[n]=s=[{_ocp:s,_vw:u,_key:n}],s._cxp={path:M,ind:0,updateValue:function(e,n){return t.observable(s[0]).setProperty(M,e),this}})),d=s&&s._cxp)){if(arguments.length>2)return(o=s[1]?p._ceo(s[1].deps):[M]).unshift(s[0]),o._cxp=d,o;if(c=d.tagElse,m=s[1]?d.tag&&d.tag.cvtArgs?d.tag.cvtArgs(c,1)[d.ind]:s[1](s[0].data,s[0],p):s[0]._ocp,f)return p._ucp(n,a,g,d),g;s=m}return s&&l(s)&&ie(i=function(){return s.apply(this&&this!==e?this:u,arguments)},s),i||s}}function ce(e,t){var n,a,r,i,o,s,l,c=this;if(c.tagName){if(!(c=((s=c).tagCtxs||[c])[e||0]))return}else s=c.tag;if(o=s.bindFrom,i=c.args,(l=s.convert)&&""+l===l&&(l="true"===l?void 0:c.view.getRsc("converters",l)||ke("Unknown converter: '"+l+"'")),l&&!t&&(i=i.slice()),o){for(r=[],n=o.length;n--;)a=o[n],r.unshift(ue(c,a));t&&(i=r)}if(l){if(void 0===(l=l.apply(s,r||i)))return i;if(n=(o=o||[0]).length,d(l)&&(!1===l.arg0||1!==n&&l.length===n&&!l.arg0)||(l=[l],o=[0],n=1),t)i=l;else for(;n--;)+(a=o[n])===a&&(i[a]=l[n])}return i}function ue(e,t){return(e=e[+t===t?"args":"props"])&&e[t]}function he(e){return this.cvtArgs(e,1)}function me(e,t,n,a,r,i,o,s){var l,d,c,u=this,h="array"===t;u.content=s,u.views=h?[]:{},u.data=a,u.tmpl=r,c=u._={key:0,useKey:h?0:1,id:""+q++,onRender:o,bnds:{}},u.linked=!!o,u.type=t||"top",t&&(u.cache={_ct:g._cchCt}),n&&"top"!==n.type||((u.ctx=e||{}).root=u.data),(u.parent=n)?(u.root=n.root||u,l=n.views,d=n._,u.isTop=d.scp,u.scope=(!e.tag||e.tag===n.ctx.tag)&&!u.isTop&&n.scope||u,d.useKey?(l[c.key="_"+d.useKey++]=u,u.index=V,u.getIndex=oe):l.length===(c.key=u.index=i)?l.push(u):l.splice(i,0,u),u.ctx=e||n.ctx):t&&(u.root=u)}function pe(e,t){return l(e)?e.call(t):e}function ge(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!0})}function fe(e,n){var a,r=f._wm||{},i={tmpls:[],links:{},bnds:[],_is:"template",render:ye};return n&&(i=ie(i,n)),i.markup=e,i.htmlTag||(a=A.exec(e),i.htmlTag=a?a[1].toLowerCase():""),(a=r[i.htmlTag])&&a!==r.div&&(i.markup=t.trim(i.markup)),i}function ve(e,t){var n=e+"s";o[n]=function a(r,i,s){var l,d,c,u=p.onStore[e];if(r&&typeof r===H&&!r.nodeType&&!r.markup&&!r.getTgt&&!("viewModel"===e&&r.getters||r.extend)){for(d in r)a(d,r[d],i);return i||o}return r&&""+r!==r&&(s=i,i=r,r=void 0),c=s?"viewModel"===e?s:s[n]=s[n]||{}:a,l=t.compile,void 0===i&&(i=l?r:c[r],r=void 0),null===i?r&&delete c[r]:(l&&((i=l.call(c,r,i,s,0)||{})._is=e),r&&(c[r]=i)),u&&u(r,i,s,l),i}}function we(e){v[e]=v[e]||function(t){return arguments.length?(g[e]=t,v):g[e]}}function be(e){function t(t,n){this.tgt=e.getTgt(t,n),n.map=this}return l(e)&&(e={getTgt:e}),e.baseMap&&(e=ie(ie({},e.baseMap),e)),e.map=function(e,n){return new t(e,n)},e}function ye(e,t,n,a,r,o){var s,c,u,h,m,g,v,w,b=a,y="";if(!0===t?(n=t,t=void 0):typeof t!==H&&(t=void 0),(u=this.tag)?(m=this,h=(b=b||m.view)._getTmpl(u.template||m.tmpl),arguments.length||(e=u.contentCtx&&l(u.contentCtx)?e=u.contentCtx(e):b)):h=this,h){if(!a&&e&&"view"===e._is&&(b=e),b&&e===b&&(e=b.data),g=!b,L=L||g,g&&((t=t||{}).root=e),!L||f.useViews||h.useViews||b&&b!==i)y=$e(h,e,t,n,b,r,o,u);else{if(b?(v=b.data,w=b.index,b.index=V):(v=(b=i).data,b.data=e,b.ctx=t),d(e)&&!n)for(s=0,c=e.length;s<c;s++)b.index=s,b.data=e[s],y+=h.fn(e[s],b,p);else b.data=e,y+=h.fn(e,b,p);b.data=v,b.index=w}g&&(L=void 0)}return y}function $e(e,t,n,a,r,i,o,s){var l,c,u,h,m,g,f,v,w,b,y,$,k,S="";if(s&&(w=s.tagName,$=s.tagCtx,n=n?Ce(n,s.ctx):s.ctx,e===r.content?f=e!==r.ctx._wrp?r.ctx._wrp:void 0:e!==$.content?e===s.template?(f=$.tmpl,n._wrp=$.content):f=$.content||r.content:f=r.content,!1===$.props.link&&((n=n||{}).link=!1)),r&&(o=o||r._.onRender,(k=n&&!1===n.link)&&r._.nl&&(o=void 0),n=Ce(n,r.ctx),$=!s&&r.tag?r.tag.tagCtxs[r.tagElse]:$),(b=$&&$.props.itemVar)&&("~"!==b[0]&&Se("Use itemVar='~myItem'"),b=b.slice(1)),!0===i&&(g=!0,i=0),o&&s&&s._.noVws&&(o=void 0),v=o,!0===o&&(v=void 0,o=r._.onRender),y=n=e.helpers?Ce(e.helpers,n):n,d(t)&&!a)for((u=g?r:void 0!==i&&r||new me(n,"array",r,t,e,i,o,f))._.nl=k,r&&r._.useKey&&(u._.bnd=!s||s._.bnd&&s,u.tag=s),l=0,c=t.length;l<c;l++)h=new me(y,"item",u,t[l],e,(i||0)+l,o,u.content),b&&((h.ctx=ie({},y))[b]=p._cp(t[l],"#data",h)),m=e.fn(t[l],h,p),S+=u._.onRender?u._.onRender(m,h):m;else u=g?r:new me(y,w||"data",r,t,e,i,o,f),b&&((u.ctx=ie({},y))[b]=p._cp(t,"#data",u)),u.tag=s,u._.nl=k,S+=e.fn(t,u,p);return s&&(u.tagElse=$.index,$.contentView=u),v?v(S,u):S}function ke(e){throw new p.Err(e)}function Se(e){ke("Syntax error\n"+e)}function Le(e,t,n,a,i){function o(t){(t-=f)&&k.push(e.substr(f,t).replace(T,"\\n"))}function s(t,n){t&&(t+="}}",Se((n?"{{"+n+"}} block has {{/"+t+" without {{"+t:"Unmatched or missing {{/"+t)+", in template:\n"+e))}var l,d,c,u,h,m=g.allowCode||t&&t.allowCode||!0===v.allowCode,p=[],f=0,b=[],k=p,S=[,,p];if(m&&t._is&&(t.allowCode=m),n&&(void 0!==a&&(e=e.slice(0,-a.length-2)+y),e=w+e+$),s(b[0]&&b[0][2].pop()[0]),e.replace(r,(function(r,l,d,h,p,g,v,w,y,$,L,D){(v&&l||y&&!d||w&&":"===w.slice(-1)||$)&&Se(r),g&&(p=":",h=B);var M,C,A,x=(l||n)&&[[]],P="",O="",R="",I="",N="",q="",Y="",J="",H=!(y=y||n&&!i)&&!p;d=d||(w=w||"#data",p),o(D),f=D+r.length,v?m&&k.push(["*","\n"+w.replace(/^:/,"ret+= ").replace(_,"$1")+";\n"]):d?("else"===d&&(E.test(w)&&Se('For "{{else if expr}}" use "{{else expr}}"'),x=S[9]&&[[]],S[10]=e.substring(S[10],D),C=S[11]||S[0]||Se("Mismatched: "+r),S=b.pop(),k=S[2],H=!0),w&&Te(w.replace(T," "),x,t,n).replace(j,(function(e,t,n,a,r,i,o,s){return"this:"===a&&(i="undefined"),s&&(A=A||"@"===s[0]),a="'"+r+"':",o?(O+=n+i+",",I+="'"+s+"',"):n?(R+=a+"j._cp("+i+',"'+s+'",view),',q+=a+"'"+s+"',"):t?Y+=i:("trigger"===r&&(J+=i),"lateRender"===r&&(M="false"!==s),P+=a+i+",",N+=a+"'"+s+"',",u=u||F.test(r)),""})).slice(0,-1),x&&x[0]&&x.pop(),c=[d,h||!!a||u||"",H&&[],Me(I||(":"===d?"'#data',":""),N,q),Me(O||(":"===d?"data,":""),P,R),Y,J,M,A,x||0],k.push(c),H&&(b.push(S),(S=c)[10]=f,S[11]=C)):L&&(s(L!==S[0]&&L!==S[11]&&L,S[0]),S[10]=e.substring(S[10],D),S=b.pop()),s(!S&&L),k=S[2]})),o(e.length),(f=p[p.length-1])&&s(""+f!==f&&+f[10]===f[10]&&f[0]),n){for(d=_e(p,e,n),h=[],l=p.length;l--;)h.unshift(p[l][9]);De(d,h)}else d=_e(p,t);return d}function De(e,t){var n,a,r=0,i=t.length;for(e.deps=[],e.paths=[];r<i;r++)for(n in e.paths.push(a=t[r]),a)"_jsvto"!==n&&a.hasOwnProperty(n)&&a[n].length&&!a[n].skp&&(e.deps=e.deps.concat(a[n]))}function Me(e,t,n){return[e.slice(0,-1),t.slice(0,-1),n.slice(0,-1)]}function Te(e,n,a,r){var i,o,s,l,d,c=n&&n[0],u={bd:c},h={0:u},m=0,g=0,v=0,w={},b=0,y={},$={},k={},S={0:0},L={0:""},D=0;return"@"===e[0]&&(e=e.replace(N,".")),s=(e+(a?" ":"")).replace(p.rPrm,(function(a,s,M,T,_,j,E,A,x,F,P,O,R,I,N,q,Y,J,B,H,W){T&&!A&&(_=T+_),j=j||"",R=R||"",M=M||s||R,_=_||x,F&&(F=!/\)|]/.test(W[H-1]))&&(_=_.slice(1).split(".").join("^")),P=P||J||"";var U,V,K,Q,G,Z,X,ee=H;if(!d&&!l){if(E&&Se(e),Y&&c){if(U=k[v-1],W.length-1>ee-(U||0)){if(U=t.trim(W.slice(U,ee+a.length)),V=o||h[v-1].bd,(K=V[V.length-1])&&K.prm){for(;K.sb&&K.sb.prm;)K=K.sb;Q=K.sb={path:K.sb,bnd:K.bnd}}else V.push(Q={path:V.pop()});K&&K.sb===Q&&(L[v]=L[v-1].slice(K._cpPthSt)+L[v],L[v-1]=L[v-1].slice(0,K._cpPthSt)),Q._cpPthSt=S[v-1],Q._cpKey=U,L[v]+=W.slice(D,H),D=H,Q._cpfn=z[U]=z[U]||new Function("data,view,j","//"+U+"\nvar v;\nreturn ((v="+L[v]+("]"===q?")]":q)+")!=null?v:null);"),L[v-1]+=$[g]&&f.cache?'view.getCache("'+U.replace(C,"\\$&")+'"':L[v],Q.prm=u.bd,Q.bnd=Q.bnd||Q.path&&Q.path.indexOf("^")>=0}L[v]=""}"["===P&&(P="[j._sq("),"["===M&&(M="[j._sq(")}return X=d?(d=!I)?a:R+'"':l?(l=!N)?a:R+'"':(M?(y[++g]=!0,w[g]=0,c&&(k[v++]=ee++,u=h[v]={bd:[]},L[v]="",S[v]=1),M):"")+(B?g?"":(m=W.slice(m,ee),(i?(i=o=!1,"\b"):"\b,")+m+(m=ee+a.length,c&&n.push(u.bd=[]),"\b")):A?(v&&Se(e),c&&n.pop(),i="_"+_,T,m=ee+a.length,c&&((c=u.bd=n[i]=[]).skp=!T),_+":"):_?_.split("^").join(".").replace(p.rPath,(function(e,t,a,s,l,d,h,m){if(G="."===a,a&&(_=_.slice(t.length),/^\.?constructor$/.test(m||_)&&Se(e),G||(e=(F?(r?"":"(ltOb.lt=ltOb.lt||")+"(ob=":"")+(s?'view.ctxPrm("'+s+'")':l?"view":"data")+(F?")===undefined"+(r?"":")")+'?"":view._getOb(ob,"':"")+(m?(d?"."+d:s||l?"":"."+a)+(h||""):(m=s?"":l?d||"":a,"")),e=t+("view.data"===(e+=m?"."+m:"").slice(0,9)?e.slice(5):e)+(F?(r?'"':'",ltOb')+(P?",1)":")"):"")),c)){if(V="_linkTo"===i?o=n._jsvto=n._jsvto||[]:u.bd,K=G&&V[V.length-1]){if(K._cpfn){for(;K.sb;)K=K.sb;K.prm&&(K.bnd&&(_="^"+_.slice(1)),K.sb=_,K.bnd=K.bnd||"^"===_[0])}}else V.push(_);P&&!G&&(k[v]=ee,S[v]=L[v].length)}return e}))+(P||j):j||(q?"]"===q?")]":")":O?($[g]||Se(e),","):s?"":(d=I,l=N,'"'))),d||l||q&&($[g]=!1,g--),c&&(d||l||(q&&(y[g+1]&&(u=h[--v],y[g+1]=!1),b=w[g+1]),P&&(w[g+1]=L[v].length+(M?1:0),(_||q)&&(u=h[++v]={bd:[]},y[g+1]=!0))),L[v]=(L[v]||"")+W.slice(D,H),D=H+a.length,d||l||((Z=M&&y[g+1])&&(L[v-1]+=M,S[v-1]++),"("===P&&G&&!Q&&(L[v]=L[v-1].slice(b)+L[v],L[v-1]=L[v-1].slice(0,b))),L[v]+=Z?X.slice(1):X),d||l||!P||(g++,_&&"("===P&&($[g]=!0)),d||l||!J||(c&&(L[v]+=P),X+=P),X})),c&&(s=L[0]),!g&&s||Se(e)}function _e(e,t,n){var a,r,i,o,s,l,d,c,u,h,p,v,w,b,y,$,k,S,L,D,M,C,j,E,A,x,F,P,O,R,I,N,q,Y,J=0,H=f.useViews||t.useViews||t.tags||t.templates||t.helpers||t.converters,W="",U={},V=e.length;for(""+t===t?(k=n?'data-link="'+t.replace(T," ").slice(1,-1)+'"':t,t=0):(k=t.tmplName||"unnamed",t.allowCode&&(U.allowCode=!0),t.debug&&(U.debug=!0),h=t.bnds,$=t.tmpls),a=0;a<V;a++)if(""+(r=e[a])===r)W+='+"'+r+'"';else if("*"===(i=r[0]))W+=";\n"+r[1]+"\nret=ret";else{if(o=r[1],D=!n&&r[2],q=r[3],Y=v=r[4],s="\n\tparams:{args:["+q[0]+"],\n\tprops:{"+q[1]+"}"+(q[2]?",\n\tctx:{"+q[2]+"}":"")+"},\n\targs:["+Y[0]+"],\n\tprops:{"+Y[1]+"}"+(Y[2]?",\n\tctx:{"+Y[2]+"}":""),O=r[6],R=r[7],r[8]?(I="\nvar ob,ltOb={},ctxs=",N=";\nctxs.lt=ltOb.lt;\nreturn ctxs;"):(I="\nreturn ",N=""),M=r[10]&&r[10].replace(_,"$1"),(E="else"===i)?p&&p.push(r[9]):(F=r[5]||!1!==g.debugMode&&"undefined",h&&(p=r[9])&&(p=[p],J=h.push(1))),H=H||v[1]||v[2]||p||/view.(?!index)/.test(v[0]),(A=":"===i)?o&&(i=o===B?">":o+i):(D&&((S=fe(M,U)).tmplName=k+"/"+i,S.useViews=S.useViews||H,_e(D,S),H=S.useViews,$.push(S)),E||(L=i,H=H||i&&(!m[i]||!m[i].flow),j=W,W=""),C=(C=e[a+1])&&"else"===C[0]),P=F?";\ntry{\nret+=":"\n+",w="",b="",A&&(p||O||o&&o!==B||R)){if((x=new Function("data,view,j","// "+k+" "+ ++J+" "+i+I+"{"+s+"};"+N))._er=F,x._tag=i,x._bd=!!p,x._lr=R,n)return x;De(x,p),u=!0,w=(y='c("'+o+'",view,')+J+",",b=")"}if(W+=A?(n?(F?"try{\n":"")+"return ":P)+(u?(u=void 0,H=c=!0,y+(x?(h[J-1]=x,J):"{"+s+"}")+")"):">"===i?(d=!0,"h("+v[0]+")"):(!0,"((v="+v[0]+")!=null?v:"+(n?"null)":'"")'))):(l=!0,"\n{view:view,content:false,tmpl:"+(D?$.length:"false")+","+s+"},"),L&&!C){if(W="["+W.slice(0,-1)+"]",y='t("'+L+'",view,this,',n||p){if((W=new Function("data,view,j"," // "+k+" "+J+" "+L+I+W+N))._er=F,W._tag=L,p&&De(h[J-1]=W,p),W._lr=R,n)return W;w=y+J+",undefined,",b=")"}W=j+P+y+(p&&J||W)+")",p=0,L=0}F&&!C&&(H=!0,W+=";\n}catch(e){ret"+(n?"urn ":"+=")+w+"j._err(e,view,"+F+")"+b+";}"+(n?"":"\nret=ret"))}W="// "+k+(U.debug?"\ndebugger;":"")+"\nvar v"+(l?",t=j._tag":"")+(c?",c=j._cnvt":"")+(d?",h=j._html":"")+(n?(r[8]?", ob":"")+";\n":',ret=""')+W+(n?"\n":";\nreturn ret;");try{W=new Function("data,view,j",W)}catch(e){Se("Compiled template code:\n\n"+W+'\n: "'+(e.message||e)+'"')}return t&&(t.fn=W,t.useViews=!!H),W}function Ce(e,t){return e&&e!==t?t?ie(ie({},t),e):e:t&&ie({},t)}function je(e,n){var a,r,i,o=n.tag,s=n.props,c=n.params.props,u=s.filter,h=s.sort,m=!0===h,p=parseInt(s.step),g=s.reverse?-1:1;if(!d(e))return e;if(m||h&&""+h===h?((a=e.map((function(e,t){return{i:t,v:""+(e=m?e:le(e,h))===e?e.toLowerCase():e}}))).sort((function(e,t){return e.v>t.v?g:e.v<t.v?-g:0})),e=a.map((function(t){return e[t.i]}))):(h||g<0)&&!o.dataMap&&(e=e.slice()),l(h)&&(e=e.sort((function(){return h.apply(n,arguments)}))),g<0&&(!h||l(h))&&(e=e.reverse()),e.filter&&u&&(e=e.filter(u,n),n.tag.onFilter&&n.tag.onFilter(n)),c.sorted&&(a=h||g<0?e:e.slice(),o.sorted?t.observable(o.sorted).refresh(a):n.map.sorted=a),r=s.start,i=s.end,(c.start&&void 0===r||c.end&&void 0===i)&&(r=i=0),isNaN(r)&&isNaN(i)||(r=+r||0,i=void 0===i||i>e.length?e.length:+i,e=e.slice(r,i)),p>1){for(r=0,i=e.length,a=[];r<i;r+=p)a.push(e[r]);e=a}return c.paged&&o.paged&&$observable(o.paged).refresh(e),e}function Ee(e,n,a){var r=this.jquery&&(this[0]||ke("Unknown template")),i=r.getAttribute(W);return ye.call(i&&t.data(r).jsvTmpl||c(r),e,n,a)}function Ae(e){return Y[e]||(Y[e]="&#"+e.charCodeAt(0)+";")}function xe(e,t){return J[t]||""}function Fe(e){return null!=e?x.test(e)&&(""+e).replace(O,Ae)||e:""}if(o={jsviews:D,sub:{rPath:/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,rPrm:/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|~(?![\w$])|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(?:(\()\s*)?\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,View:me,Err:re,tmplFn:Le,parse:Te,extend:ie,extendCtx:Ce,syntaxErr:Se,onStore:{template:function(e,t){null===t?delete K[e]:e&&(K[e]=t)}},addSetting:we,settings:{allowCode:!1},advSet:ae,_thp:te,_gm:ee,_tg:function(){},_cnvt:function(e,t,n,a){var r,i,o,s,l,d="number"==typeof n&&t.tmpl.bnds[n-1];void 0===a&&d&&d._lr&&(a="");void 0!==a?n=a={props:{},args:[a]}:d&&(n=d(t.data,t,p));if(d=d._bd&&d,e||d){if(i=t._lc,r=i&&i.tag,n.view=t,!r){if(r=ie(new p._tg,{_:{bnd:d,unlinked:!0,lt:n.lt},inline:!i,tagName:":",convert:e,onArrayChange:!0,flow:!0,tagCtx:n,tagCtxs:[n],_is:"tag"}),(s=n.args.length)>1)for(l=r.bindTo=[];s--;)l.unshift(s);i&&(i.tag=r,r.linkCtx=i),n.ctx=Ce(n.ctx,(i?i.view:t).ctx),te(r,n)}r._er=a&&o,r.ctx=n.ctx||r.ctx||{},n.ctx=void 0,o=r.cvtArgs()[0],r._er=a&&o}else o=n.args[0];return null!=(o=d&&t._.onRender?t._.onRender(o,t,r):o)?o:""},_tag:function(e,t,n,a,r,o){function s(e){var t=l[e];if(void 0!==t)for(t=d(t)?t:[t],v=t.length;v--;)O=t[v],isNaN(parseInt(O))||(t[v]=parseInt(O));return t||[0]}var l,c,h,m,g,f,v,w,b,y,$,k,S,L,D,M,T,_,C,j,E,A,x,F,O,R,I,N,q,Y=0,J="",H=(t=t||i)._lc||!1,W=t.ctx,U=n||t.tmpl,V="number"==typeof a&&t.tmpl.bnds[a-1];"tag"===e._is?(e=(l=e).tagName,a=l.tagCtxs,l.template):(c=t.getRsc("tags",e)||ke("Unknown tag: {{"+e+"}} "),c.template);void 0===o&&V&&(V._lr=c.lateRender&&!1!==V._lr||V._lr)&&(o="");void 0!==o?(J+=o,a=o=[{props:{},args:[],params:{props:{}}}]):V&&(a=V(t.data,t,p));for(f=a.length;Y<f;Y++)y=a[Y],M=y.tmpl,(!H||!H.tag||Y&&!H.tag.inline||l._er||M&&+M===M)&&(M&&U.tmpls&&(y.tmpl=y.content=U.tmpls[M-1]),y.index=Y,y.ctxPrm=de,y.render=ye,y.cvtArgs=ce,y.bndArgs=he,y.view=t,y.ctx=Ce(Ce(y.ctx,c&&c.ctx),W)),(n=y.props.tmpl)&&(y.tmpl=t._getTmpl(n),y.content=y.content||y.tmpl),l?H&&H.fn._lr&&(T=!!l.init):(l=new c._ctr,T=!!l.init,l.parent=g=W&&W.tag,l.tagCtxs=a,H&&(l.inline=!1,H.tag=l),l.linkCtx=H,(l._.bnd=V||H.fn)?(l._.ths=y.params.props.this,l._.lt=a.lt,l._.arrVws={}):l.dataBoundOnly&&ke(e+" must be data-bound:\n{^{"+e+"}}")),x=l.dataMap,y.tag=l,x&&a&&(y.map=a[Y].map),l.flow||($=y.ctx=y.ctx||{},h=l.parents=$.parentTags=W&&Ce($.parentTags,W.parentTags)||{},g&&(h[g.tagName]=g),h[l.tagName]=$.tag=l,$.tagCtx=y);if(!(l._er=o)){for(te(l,a[0]),l.rendering={rndr:l.rendering},Y=0;Y<f;Y++){if(y=l.tagCtx=a[Y],A=y.props,l.ctx=y.ctx,!Y){if(T&&(l.init(y,H,l.ctx),T=void 0),y.args.length||!1===y.argDefault||!1===l.argDefault||(y.args=j=[y.view.data],y.params.args=["#data"]),S=s("bindTo"),void 0!==l.bindTo&&(l.bindTo=S),void 0!==l.bindFrom?l.bindFrom=s("bindFrom"):l.bindTo&&(l.bindFrom=l.bindTo=S),L=l.bindFrom||S,I=S.length,R=L.length,l._.bnd&&(N=l.linkedElement)&&(l.linkedElement=N=d(N)?N:[N],I!==N.length&&ke("linkedElement not same length as bindTo")),(N=l.linkedCtxParam)&&(l.linkedCtxParam=N=d(N)?N:[N],R!==N.length&&ke("linkedCtxParam not same length as bindFrom/bindTo")),L)for(l._.fromIndex={},l._.toIndex={},w=R;w--;)for(O=L[w],v=I;v--;)O===S[v]&&(l._.fromIndex[v]=w,l._.toIndex[w]=v);H&&(H.attr=l.attr=H.attr||l.attr||H._dfAt),m=l.attr,l._.noVws=m&&m!==B}if(j=l.cvtArgs(Y),l.linkedCtxParam)for(E=l.cvtArgs(Y,1),v=R,q=l.constructor.prototype.ctx;v--;)(k=l.linkedCtxParam[v])&&(O=L[v],D=E[v],y.ctx[k]=p._cp(q&&void 0===D?q[k]:D,void 0!==D&&ue(y.params,O),y.view,l._.bnd&&{tag:l,cvt:l.convert,ind:v,tagElse:Y}));(_=A.dataMap||x)&&(j.length||A.dataMap)&&((C=y.map)&&C.src===j[0]&&!r||(C&&C.src&&C.unmap(),_.map(j[0],y,C,!l._.bnd),C=y.map),j=[C.tgt]),b=void 0,l.render&&(b=l.render.apply(l,j),t.linked&&b&&!P.test(b)&&((n={links:[]}).render=n.fn=function(){return b},b=$e(n,t.data,void 0,!0,t,void 0,void 0,l))),j.length||(j=[t]),void 0===b&&(F=j[0],l.contentCtx&&(F=!0===l.contentCtx?t:l.contentCtx(F)),b=y.render(F,!0)||(r?void 0:"")),J=J?J+(b||""):void 0!==b?""+b:void 0}l.rendering=l.rendering.rndr}l.tagCtx=a[0],l.ctx=l.tagCtx.ctx,l._.noVws&&l.inline&&(J="text"===m?u.html(J):"");return V&&t._.onRender?t._.onRender(J,t,l):J},_er:ke,_err:function(e,t,n){var a=void 0!==n?l(n)?n.call(t.data,e,t):n||"":"{Error: "+(e.message||e)+"}";g.onError&&void 0!==(n=g.onError.call(t.data,e,n&&a,t))&&(a=n);return t&&!t._lc?u.html(a):a},_cp:ne,_sq:function(e){return"constructor"===e&&Se(""),e}},settings:{delimiters:function e(t,n,a){if(!t)return g.delimiters;if(d(t))return e.apply(o,t);k=a?a[0]:k,/^(\W|_){5}$/.test(t+n+k)||ke("Invalid delimiters");return w=t[0],b=t[1],y=n[0],$=n[1],g.delimiters=[w+b,y+$,k],t="\\"+w+"(\\"+k+")?\\"+b,n="\\"+y+"\\"+$,r="(?:(\\w+(?=[\\/\\s\\"+y+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+y+"]|\\"+y+"(?!\\"+$+"))*?)",p.rTag="(?:"+r+")",r=new RegExp("(?:"+t+r+"(\\/)?|\\"+w+"(\\"+k+")?\\"+b+"(?:(?:\\/(\\w+))\\s*|!--[\\s\\S]*?--))"+n,"g"),p.rTmpl=new RegExp("^\\s|\\s$|<.*>|([^\\\\]|^)[{}]|"+t+".*"+n),v},advanced:function(e){return e?(ie(f,e),p.advSet(),v):f}},map:be},(re.prototype=new Error).constructor=re,oe.depends=function(){return[this.get("item"),"index"]},se.depends="index",me.prototype={get:function(e,t){t||!0===e||(t=e,e=void 0);var n,a,r,i,o=this,s="root"===t;if(e){if(!(i=t&&o.type===t&&o))if(n=o.views,o._.useKey){for(a in n)if(i=t?n[a].get(e,t):n[a])break}else for(a=0,r=n.length;!i&&a<r;a++)i=t?n[a].get(e,t):n[a]}else if(s)i=o.root;else if(t)for(;o&&!i;)i=o.type===t?o:void 0,o=o.parent;else i=o.parent;return i||void 0},getIndex:se,ctxPrm:de,getRsc:function(e,t){var n,a,r=this;if(""+t===t){for(;void 0===n&&r;)n=(a=r.tmpl&&r.tmpl[e])&&a[t],r=r.parent;return n||o[e][t]}},_getTmpl:function(e){return e&&(e.fn?e:this.getRsc("templates",e)||c(e))},_getOb:le,getCache:function(e){return g._cchCt>this.cache._ct&&(this.cache={_ct:g._cchCt}),void 0!==this.cache[e]?this.cache[e]:this.cache[e]=z[e](this.data,this,p)},_is:"view"},p=o.sub,v=o.settings,!(Q||t&&t.render)){for(a in Z)ve(a,Z[a]);if(u=o.converters,h=o.helpers,m=o.tags,p._tg.prototype={baseApply:function(e){return this.base.apply(this,e)},cvtArgs:ce,bndArgs:he,ctxPrm:de},i=p.topView=new me,t){if(t.fn.render=Ee,s=t.expando,t.observable){if(D!==(D=t.views.jsviews))throw"jquery.observable.js requires jsrender.js "+D;ie(p,t.views.sub),o.map=t.views.map}}else t={},n&&(e.jsrender=t),t.renderFile=t.__express=t.compile=function(){throw"Node.js: use npm jsrender, or jsrender-node.js"},t.isFunction=function(e){return"function"==typeof e},t.isArray=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},p._jq=function(e){e!==t&&(ie(e,t),(t=e).fn.render=Ee,delete t.jsrender,s=t.expando)},t.jsrender=D;for(S in(g=p.settings).allowCode=!1,l=t.isFunction,t.render=K,t.views=o,t.templates=c=o.templates,g)we(S);(v.debugMode=function(e){return void 0===e?g.debugMode:(g._clFns&&g._clFns(),g.debugMode=e,g.onError=e+""===e?function(){return e}:l(e)?e:void 0,v)})(!1),f=g.advanced={cache:!0,useViews:!1,_jsv:!1},m({if:{render:function(e){var t=this,n=t.tagCtx;return t.rendering.done||!e&&(n.args.length||!n.index)?"":(t.rendering.done=!0,void(t.selected=n.index))},contentCtx:!0,flow:!0},for:{sortDataMap:be(je),init:function(e,t){this.setDataMap(this.tagCtxs)},render:function(e){var t,n,a,r,i,o=this,s=o.tagCtx,l=!1===s.argDefault,c=s.props,u=l||s.args.length,h="",m=0;if(!o.rendering.done){if(t=u?e:s.view.data,l)for(l=c.reverse?"unshift":"push",r=+c.end,i=+c.step||1,t=[],a=+c.start||0;(r-a)*i>0;a+=i)t[l](a);void 0!==t&&(n=d(t),h+=s.render(t,!u||c.noIteration),m+=n?t.length:1),(o.rendering.done=m)&&(o.selected=s.index)}return h},setDataMap:function(e){for(var t,n,a,r=e.length;r--;)n=(t=e[r]).props,a=t.params.props,t.argDefault=void 0===n.end||t.args.length>0,n.dataMap=!1!==t.argDefault&&d(t.args[0])&&(a.sort||a.start||a.end||a.step||a.filter||a.reverse||n.sort||n.start||n.end||n.step||n.filter||n.reverse)&&this.sortDataMap},flow:!0},props:{baseTag:"for",dataMap:be((function(e,n){var a,r,i=n.map,o=i&&i.propsArr;if(!o){if(o=[],typeof e===H||l(e))for(a in e)r=e[a],a===s||!e.hasOwnProperty(a)||n.props.noFunctions&&t.isFunction(r)||o.push({key:a,prop:r});i&&(i.propsArr=i.options&&o)}return je(o,n)})),init:ae,flow:!0},include:{flow:!0},"*":{render:ne,flow:!0},":*":{render:ne,flow:!0},dbg:h.dbg=u.dbg=function(e){try{throw console.log("JsRender dbg breakpoint: "+e),"dbg breakpoint"}catch(e){}return this.base?this.baseApply(arguments):e}}),u({html:Fe,attr:Fe,encode:function(e){return""+e===e?e.replace(R,Ae):e},unencode:function(e){return""+e===e?e.replace(I,xe):e},url:function(e){return null!=e?encodeURI(""+e):null===e?e:""}})}return g=p.settings,d=(t||Q).isArray,v.delimiters("{{","}}","^"),G&&Q.views.sub._jq(t),t||Q}),window)}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";__webpack_require__(908)})(),(()=>{"use strict";var e={};__webpack_require__.r(e),__webpack_require__.d(e,{PageRenderer:()=>se,PageSnapshot:()=>B,clearCache:()=>ye,connectStreamSource:()=>ve,disconnectStreamSource:()=>we,navigator:()=>me,registerAdapter:()=>ge,renderStreamMessage:()=>be,session:()=>he,setConfirmMethod:()=>ke,setProgressBarDelay:()=>$e,start:()=>pe,visit:()=>fe}),function(){if(void 0===window.Reflect||void 0===window.customElements||window.customElements.polyfillWrapFlushCallback)return;const e=HTMLElement,t=function(){return Reflect.construct(e,[],this.constructor)};window.HTMLElement=t,HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}(),function(e){function t(e,t,n){throw new e("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+t+".",n)}"function"!=typeof e.requestSubmit&&(e.requestSubmit=function(e){e?(!function(e,n){e instanceof HTMLElement||t(TypeError,"parameter 1 is not of type 'HTMLElement'"),"submit"==e.type||t(TypeError,"The specified element is not a submit button"),e.form==n||t(DOMException,"The specified element is not owned by this form element","NotFoundError")}(e,this),e.click()):((e=document.createElement("input")).type="submit",e.hidden=!0,this.appendChild(e),e.click(),this.removeChild(e))})}(HTMLFormElement.prototype);const t=new WeakMap;function n(e){const n=function(e){const t=e instanceof Element?e:e instanceof Node?e.parentElement:null,n=t?t.closest("input, button"):null;return"submit"==(null==n?void 0:n.type)?n:null}(e.target);n&&n.form&&t.set(n.form,n)}var a,r,i,o,s,l;!function(){if("submitter"in Event.prototype)return;let e;if("SubmitEvent"in window&&/Apple Computer/.test(navigator.vendor))e=window.SubmitEvent.prototype;else{if("SubmitEvent"in window)return;e=window.Event.prototype}addEventListener("click",n,!0),Object.defineProperty(e,"submitter",{get(){if("submit"==this.type&&this.target instanceof HTMLFormElement)return t.get(this.target)}})}(),function(e){e.eager="eager",e.lazy="lazy"}(a||(a={}));class d extends HTMLElement{constructor(){super(),this.loaded=Promise.resolve(),this.delegate=new d.delegateConstructor(this)}static get observedAttributes(){return["disabled","loading","src"]}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){const{src:e}=this;this.src=null,this.src=e}attributeChangedCallback(e){"loading"==e?this.delegate.loadingStyleChanged():"src"==e?this.delegate.sourceURLChanged():this.delegate.disabledChanged()}get src(){return this.getAttribute("src")}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get loading(){return function(e){switch(e.toLowerCase()){case"lazy":return a.lazy;default:return a.eager}}(this.getAttribute("loading")||"")}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAttribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){var e,t;return null===(t=null===(e=this.ownerDocument)||void 0===e?void 0:e.documentElement)||void 0===t?void 0:t.hasAttribute("data-turbo-preview")}}function c(e){return new URL(e.toString(),document.baseURI)}function u(e){let t;return e.hash?e.hash.slice(1):(t=e.href.match(/#(.*)$/))?t[1]:void 0}function h(e,t){return c((null==t?void 0:t.getAttribute("formaction"))||e.getAttribute("action")||e.action)}function m(e){return(function(e){return function(e){return e.pathname.split("/").slice(1)}(e).slice(-1)[0]}(e).match(/\.[^.]*$/)||[])[0]||""}function p(e,t){const n=function(e){return t=e.origin+e.pathname,t.endsWith("/")?t:t+"/";var t}(t);return e.href===c(n).href||e.href.startsWith(n)}function g(e,t){return p(e,t)&&!!m(e).match(/^(?:|\.(?:htm|html|xhtml))$/)}function f(e){const t=u(e);return null!=t?e.href.slice(0,-(t.length+1)):e.href}function v(e){return f(e)}class w{constructor(e){this.response=e}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return this.statusCode>=400&&this.statusCode<=499}get serverError(){return this.statusCode>=500&&this.statusCode<=599}get redirected(){return this.response.redirected}get location(){return c(this.response.url)}get isHTML(){return this.contentType&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/)}get statusCode(){return this.response.status}get contentType(){return this.header("Content-Type")}get responseText(){return this.response.clone().text()}get responseHTML(){return this.isHTML?this.response.clone().text():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}}function b(e,{target:t,cancelable:n,detail:a}={}){const r=new CustomEvent(e,{cancelable:n,bubbles:!0,detail:a});return t&&t.isConnected?t.dispatchEvent(r):document.documentElement.dispatchEvent(r),r}function y(){return new Promise((e=>requestAnimationFrame((()=>e()))))}function $(e=""){return(new DOMParser).parseFromString(e,"text/html")}function k(e,...t){const n=function(e,t){return e.reduce(((e,n,a)=>e+n+(null==t[a]?"":t[a])),"")}(e,t).replace(/^\n/,"").split("\n"),a=n[0].match(/^\s+/),r=a?a[0].length:0;return n.map((e=>e.slice(r))).join("\n")}function S(){return Array.apply(null,{length:36}).map(((e,t)=>8==t||13==t||18==t||23==t?"-":14==t?"4":19==t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16))).join("")}function L(e,...t){for(const n of t.map((t=>null==t?void 0:t.getAttribute(e))))if("string"==typeof n)return n;return null}function D(...e){for(const t of e)"turbo-frame"==t.localName&&t.setAttribute("busy",""),t.setAttribute("aria-busy","true")}function M(...e){for(const t of e)"turbo-frame"==t.localName&&t.removeAttribute("busy"),t.removeAttribute("aria-busy")}!function(e){e[e.get=0]="get",e[e.post=1]="post",e[e.put=2]="put",e[e.patch=3]="patch",e[e.delete=4]="delete"}(r||(r={}));class T{constructor(e,t,n,a=new URLSearchParams,r=null){this.abortController=new AbortController,this.resolveRequestPromise=e=>{},this.delegate=e,this.method=t,this.headers=this.defaultHeaders,this.body=a,this.url=n,this.target=r}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}async perform(){var e,t;const{fetchOptions:n}=this;null===(t=(e=this.delegate).prepareHeadersForRequest)||void 0===t||t.call(e,this.headers,this),await this.allowRequestToBeIntercepted(n);try{this.delegate.requestStarted(this);const e=await fetch(this.url.href,n);return await this.receive(e)}catch(e){if("AbortError"!==e.name)throw this.delegate.requestErrored(this,e),e}finally{this.delegate.requestFinished(this)}}async receive(e){const t=new w(e);return b("turbo:before-fetch-response",{cancelable:!0,detail:{fetchResponse:t},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,t):t.succeeded?this.delegate.requestSucceededWithResponse(this,t):this.delegate.requestFailedWithResponse(this,t),t}get fetchOptions(){var e;return{method:r[this.method].toUpperCase(),credentials:"same-origin",headers:this.headers,redirect:"follow",body:this.isIdempotent?null:this.body,signal:this.abortSignal,referrer:null===(e=this.delegate.referrer)||void 0===e?void 0:e.href}}get defaultHeaders(){return{Accept:"text/html, application/xhtml+xml"}}get isIdempotent(){return this.method==r.get}get abortSignal(){return this.abortController.signal}async allowRequestToBeIntercepted(e){const t=new Promise((e=>this.resolveRequestPromise=e));b("turbo:before-fetch-request",{cancelable:!0,detail:{fetchOptions:e,url:this.url,resume:this.resolveRequestPromise},target:this.target}).defaultPrevented&&await t}}class _{constructor(e,t){this.started=!1,this.intersect=e=>{const t=e.slice(-1)[0];(null==t?void 0:t.isIntersecting)&&this.delegate.elementAppearedInViewport(this.element)},this.delegate=e,this.element=t,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}}class C{constructor(e){this.templateElement=document.createElement("template"),this.templateElement.innerHTML=e}static wrap(e){return"string"==typeof e?new this(e):e}get fragment(){const e=document.createDocumentFragment();for(const t of this.foreignElements)e.appendChild(document.importNode(t,!0));return e}get foreignElements(){return this.templateChildren.reduce(((e,t)=>"turbo-stream"==t.tagName.toLowerCase()?[...e,t]:e),[])}get templateChildren(){return Array.from(this.templateElement.content.children)}}C.contentType="text/vnd.turbo-stream.html",function(e){e[e.initialized=0]="initialized",e[e.requesting=1]="requesting",e[e.waiting=2]="waiting",e[e.receiving=3]="receiving",e[e.stopping=4]="stopping",e[e.stopped=5]="stopped"}(i||(i={})),function(e){e.urlEncoded="application/x-www-form-urlencoded",e.multipart="multipart/form-data",e.plain="text/plain"}(o||(o={}));class j{constructor(e,t,n,a=!1){this.state=i.initialized,this.delegate=e,this.formElement=t,this.submitter=n,this.formData=function(e,t){const n=new FormData(e),a=null==t?void 0:t.getAttribute("name"),r=null==t?void 0:t.getAttribute("value");a&&null!=r&&n.get(a)!=r&&n.append(a,r);return n}(t,n),this.location=c(this.action),this.method==r.get&&function(e,t){const n=new URLSearchParams;for(const[e,a]of t)a instanceof File||n.append(e,a);e.search=n.toString()}(this.location,[...this.body.entries()]),this.fetchRequest=new T(this,this.method,this.location,this.body,this.formElement),this.mustRedirect=a}static confirmMethod(e,t){return confirm(e)}get method(){var e;return function(e){switch(e.toLowerCase()){case"get":return r.get;case"post":return r.post;case"put":return r.put;case"patch":return r.patch;case"delete":return r.delete}}(((null===(e=this.submitter)||void 0===e?void 0:e.getAttribute("formmethod"))||this.formElement.getAttribute("method")||"").toLowerCase())||r.get}get action(){var e;const t="string"==typeof this.formElement.action?this.formElement.action:null;return(null===(e=this.submitter)||void 0===e?void 0:e.getAttribute("formaction"))||this.formElement.getAttribute("action")||t||""}get body(){return this.enctype==o.urlEncoded||this.method==r.get?new URLSearchParams(this.stringFormData):this.formData}get enctype(){var e;return function(e){switch(e.toLowerCase()){case o.multipart:return o.multipart;case o.plain:return o.plain;default:return o.urlEncoded}}((null===(e=this.submitter)||void 0===e?void 0:e.getAttribute("formenctype"))||this.formElement.enctype)}get isIdempotent(){return this.fetchRequest.isIdempotent}get stringFormData(){return[...this.formData].reduce(((e,[t,n])=>e.concat("string"==typeof n?[[t,n]]:[])),[])}get confirmationMessage(){return this.formElement.getAttribute("data-turbo-confirm")}get needsConfirmation(){return null!==this.confirmationMessage}async start(){const{initialized:e,requesting:t}=i;if(this.needsConfirmation){if(!j.confirmMethod(this.confirmationMessage,this.formElement))return}if(this.state==e)return this.state=t,this.fetchRequest.perform()}stop(){const{stopping:e,stopped:t}=i;if(this.state!=e&&this.state!=t)return this.state=e,this.fetchRequest.cancel(),!0}prepareHeadersForRequest(e,t){if(!t.isIdempotent){const t=function(e){if(null!=e){const t=(document.cookie?document.cookie.split("; "):[]).find((t=>t.startsWith(e)));if(t){const e=t.split("=").slice(1).join("=");return e?decodeURIComponent(e):void 0}}}(E("csrf-param"))||E("csrf-token");t&&(e["X-CSRF-Token"]=t),e.Accept=[C.contentType,e.Accept].join(", ")}}requestStarted(e){var t;this.state=i.waiting,null===(t=this.submitter)||void 0===t||t.setAttribute("disabled",""),b("turbo:submit-start",{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(e,t){this.result={success:t.succeeded,fetchResponse:t}}requestSucceededWithResponse(e,t){if(t.clientError||t.serverError)this.delegate.formSubmissionFailedWithResponse(this,t);else if(this.requestMustRedirect(e)&&function(e){return 200==e.statusCode&&!e.redirected}(t)){const e=new Error("Form responses must redirect to another location");this.delegate.formSubmissionErrored(this,e)}else this.state=i.receiving,this.result={success:!0,fetchResponse:t},this.delegate.formSubmissionSucceededWithResponse(this,t)}requestFailedWithResponse(e,t){this.result={success:!1,fetchResponse:t},this.delegate.formSubmissionFailedWithResponse(this,t)}requestErrored(e,t){this.result={success:!1,error:t},this.delegate.formSubmissionErrored(this,t)}requestFinished(e){var t;this.state=i.stopped,null===(t=this.submitter)||void 0===t||t.removeAttribute("disabled"),b("turbo:submit-end",{target:this.formElement,detail:Object.assign({formSubmission:this},this.result)}),this.delegate.formSubmissionFinished(this)}requestMustRedirect(e){return!e.isIdempotent&&this.mustRedirect}}function E(e){const t=document.querySelector(`meta[name="${e}"]`);return t&&t.content}class A{constructor(e){this.element=e}get children(){return[...this.element.children]}hasAnchor(e){return null!=this.getElementForAnchor(e)}getElementForAnchor(e){return e?this.element.querySelector(`[id='${e}'], a[name='${e}']`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){return this.element.querySelector("[autofocus]")}get permanentElements(){return[...this.element.querySelectorAll("[id][data-turbo-permanent]")]}getPermanentElementById(e){return this.element.querySelector(`#${e}[data-turbo-permanent]`)}getPermanentElementMapForSnapshot(e){const t={};for(const n of this.permanentElements){const{id:a}=n,r=e.getPermanentElementById(a);r&&(t[a]=[n,r])}return t}}class x{constructor(e,t){this.submitBubbled=e=>{const t=e.target;if(!e.defaultPrevented&&t instanceof HTMLFormElement&&t.closest("turbo-frame, html")==this.element){const n=e.submitter||void 0;"dialog"!=((null==n?void 0:n.getAttribute("formmethod"))||t.method)&&this.delegate.shouldInterceptFormSubmission(t,n)&&(e.preventDefault(),e.stopImmediatePropagation(),this.delegate.formSubmissionIntercepted(t,n))}},this.delegate=e,this.element=t}start(){this.element.addEventListener("submit",this.submitBubbled)}stop(){this.element.removeEventListener("submit",this.submitBubbled)}}class F{constructor(e,t){this.resolveRenderPromise=e=>{},this.resolveInterceptionPromise=e=>{},this.delegate=e,this.element=t}scrollToAnchor(e){const t=this.snapshot.getElementForAnchor(e);t?(this.scrollToElement(t),this.focusElement(t)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(e){this.scrollToAnchor(u(e))}scrollToElement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.hasAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:t}){this.scrollRoot.scrollTo(e,t)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}async render(e){const{isPreview:t,shouldRender:n,newSnapshot:a}=e;if(n)try{this.renderPromise=new Promise((e=>this.resolveRenderPromise=e)),this.renderer=e,this.prepareToRenderSnapshot(e);const n=new Promise((e=>this.resolveInterceptionPromise=e));this.delegate.allowsImmediateRender(a,this.resolveInterceptionPromise)||await n,await this.renderSnapshot(e),this.delegate.viewRenderedSnapshot(a,t),this.finishRenderingSnapshot(e)}finally{delete this.renderer,this.resolveRenderPromise(void 0),delete this.renderPromise}else this.invalidate()}invalidate(){this.delegate.viewInvalidated()}prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),e.prepareToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-preview",""):this.element.removeAttribute("data-turbo-preview")}async renderSnapshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}}class P extends F{invalidate(){this.element.innerHTML=""}get snapshot(){return new A(this.element)}}class O{constructor(e,t){this.clickBubbled=e=>{this.respondsToEventTarget(e.target)?this.clickEvent=e:delete this.clickEvent},this.linkClicked=e=>{this.clickEvent&&this.respondsToEventTarget(e.target)&&e.target instanceof Element&&this.delegate.shouldInterceptLinkClick(e.target,e.detail.url)&&(this.clickEvent.preventDefault(),e.preventDefault(),this.delegate.linkClickIntercepted(e.target,e.detail.url)),delete this.clickEvent},this.willVisit=()=>{delete this.clickEvent},this.delegate=e,this.element=t}start(){this.element.addEventListener("click",this.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),document.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.element.removeEventListener("click",this.clickBubbled),document.removeEventListener("turbo:click",this.linkClicked),document.removeEventListener("turbo:before-visit",this.willVisit)}respondsToEventTarget(e){const t=e instanceof Element?e:e instanceof Node?e.parentElement:null;return t&&t.closest("turbo-frame, html")==this.element}}class R{constructor(e,t,n,a=!0){this.currentSnapshot=e,this.newSnapshot=t,this.isPreview=n,this.willRender=a,this.promise=new Promise(((e,t)=>this.resolvingFunctions={resolve:e,reject:t}))}get shouldRender(){return!0}prepareToRender(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}createScriptElement(e){if("false"==e.getAttribute("data-turbo-eval"))return e;{const t=document.createElement("script");return this.cspNonce&&(t.nonce=this.cspNonce),t.textContent=e.textContent,t.async=!1,function(e,t){for(const{name:n,value:a}of[...t.attributes])e.setAttribute(n,a)}(t,e),t}}preservingPermanentElements(e){(class{constructor(e){this.permanentElementMap=e}static preservingPermanentElements(e,t){const n=new this(e);n.enter(),t(),n.leave()}enter(){for(const e in this.permanentElementMap){const[,t]=this.permanentElementMap[e];this.replaceNewPermanentElementWithPlaceholder(t)}}leave(){for(const e in this.permanentElementMap){const[t]=this.permanentElementMap[e];this.replaceCurrentPermanentElementWithClone(t),this.replacePlaceholderWithPermanentElement(t)}}replaceNewPermanentElementWithPlaceholder(e){const t=function(e){const t=document.createElement("meta");return t.setAttribute("name","turbo-permanent-placeholder"),t.setAttribute("content",e.id),t}(e);e.replaceWith(t)}replaceCurrentPermanentElementWithClone(e){const t=e.cloneNode(!0);e.replaceWith(t)}replacePlaceholderWithPermanentElement(e){const t=this.getPlaceholderById(e.id);null==t||t.replaceWith(e)}getPlaceholderById(e){return this.placeholders.find((t=>t.content==e))}get placeholders(){return[...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")]}}).preservingPermanentElements(this.permanentElementMap,e)}focusFirstAutofocusableElement(){const e=this.connectedSnapshot.firstAutofocusableElement;(function(e){return e&&"function"==typeof e.focus})(e)&&e.focus()}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}get cspNonce(){var e;return null===(e=document.head.querySelector('meta[name="csp-nonce"]'))||void 0===e?void 0:e.getAttribute("content")}}class I extends R{get shouldRender(){return!0}async render(){await y(),this.preservingPermanentElements((()=>{this.loadFrameElement()})),this.scrollFrameIntoView(),await y(),this.focusFirstAutofocusableElement(),await y(),this.activateScriptElements()}loadFrameElement(){var e;const t=document.createRange();t.selectNodeContents(this.currentElement),t.deleteContents();const n=this.newElement,a=null===(e=n.ownerDocument)||void 0===e?void 0:e.createRange();a&&(a.selectNodeContents(n),this.currentElement.appendChild(a.extractContents()))}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){const n=this.currentElement.firstElementChild,a=(e=this.currentElement.getAttribute("data-autoscroll-block"),t="end","end"==e||"start"==e||"center"==e||"nearest"==e?e:t);if(n)return n.scrollIntoView({block:a}),!0}var e,t;return!1}activateScriptElements(){for(const e of this.newScriptElements){const t=this.createScriptElement(e);e.replaceWith(t)}}get newScriptElements(){return this.currentElement.querySelectorAll("script")}}class N{constructor(){this.hiding=!1,this.value=0,this.visible=!1,this.trickle=()=>{this.setValue(this.value+Math.random()/100)},this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}static get defaultCSS(){return k` .turbo-progress-bar { position: fixed; display: block; top: 0; left: 0; height: 3px; background: #0076ff; z-index: 9999; transition: width ${N.animationDuration}ms ease-out, opacity ${N.animationDuration/2}ms ${N.animationDuration/2}ms ease-in; transform: translate3d(0, 0, 0); } `}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement((()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1})))}setValue(e){this.value=e,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity="0",setTimeout(e,1.5*N.animationDuration)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,N.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}refresh(){requestAnimationFrame((()=>{this.progressElement.style.width=10+90*this.value+"%"}))}createStylesheetElement(){const e=document.createElement("style");return e.type="text/css",e.textContent=N.defaultCSS,e}createProgressElement(){const e=document.createElement("div");return e.className="turbo-progress-bar",e}}N.animationDuration=300;class q extends A{constructor(){super(...arguments),this.detailsByOuterHTML=this.children.filter((e=>!function(e){return"noscript"==e.tagName.toLowerCase()}(e))).map((e=>function(e){e.hasAttribute("nonce")&&e.setAttribute("nonce","");return e}(e))).reduce(((e,t)=>{const{outerHTML:n}=t,a=n in e?e[n]:{type:Y(t),tracked:J(t),elements:[]};return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},a),{elements:[...a.elements,t]})})}),{})}get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter((e=>this.detailsByOuterHTML[e].tracked)).join("")}getScriptElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("script",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,t){return Object.keys(this.detailsByOuterHTML).filter((e=>!(e in t.detailsByOuterHTML))).map((e=>this.detailsByOuterHTML[e])).filter((({type:t})=>t==e)).map((({elements:[e]})=>e))}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce(((e,t)=>{const{type:n,tracked:a,elements:r}=this.detailsByOuterHTML[t];return null!=n||a?r.length>1?[...e,...r.slice(1)]:e:[...e,...r]}),[])}getMetaValue(e){const t=this.findMetaElementByName(e);return t?t.getAttribute("content"):null}findMetaElementByName(e){return Object.keys(this.detailsByOuterHTML).reduce(((t,n)=>{const{elements:[a]}=this.detailsByOuterHTML[n];return function(e,t){return"meta"==e.tagName.toLowerCase()&&e.getAttribute("name")==t}(a,e)?a:t}),void 0)}}function Y(e){return function(e){return"script"==e.tagName.toLowerCase()}(e)?"script":function(e){const t=e.tagName.toLowerCase();return"style"==t||"link"==t&&"stylesheet"==e.getAttribute("rel")}(e)?"stylesheet":void 0}function J(e){return"reload"==e.getAttribute("data-turbo-track")}class B extends A{constructor(e,t){super(e),this.headSnapshot=t}static fromHTMLString(e=""){return this.fromDocument($(e))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static fromDocument({head:e,body:t}){return new this(t,new q(e))}clone(){return new B(this.element.cloneNode(!0),this.headSnapshot)}get headElement(){return this.headSnapshot.element}get rootLocation(){var e;return c(null!==(e=this.getSetting("root"))&&void 0!==e?e:"/")}get cacheControlValue(){return this.getSetting("cache-control")}get isPreviewable(){return"no-preview"!=this.cacheControlValue}get isCacheable(){return"no-cache"!=this.cacheControlValue}get isVisitable(){return"reload"!=this.getSetting("visit-control")}getSetting(e){return this.headSnapshot.getMetaValue(`turbo-${e}`)}}!function(e){e.visitStart="visitStart",e.requestStart="requestStart",e.requestEnd="requestEnd",e.visitEnd="visitEnd"}(s||(s={})),function(e){e.initialized="initialized",e.started="started",e.canceled="canceled",e.failed="failed",e.completed="completed"}(l||(l={}));const H={action:"advance",historyChanged:!1,visitCachedSnapshot:()=>{},willRender:!0};var W,U;!function(e){e[e.networkFailure=0]="networkFailure",e[e.timeoutFailure=-1]="timeoutFailure",e[e.contentTypeMismatch=-2]="contentTypeMismatch"}(W||(W={}));class V{constructor(e,t,n,a={}){this.identifier=S(),this.timingMetrics={},this.followedRedirect=!1,this.historyChanged=!1,this.scrolled=!1,this.snapshotCached=!1,this.state=l.initialized,this.delegate=e,this.location=t,this.restorationIdentifier=n||S();const{action:r,historyChanged:i,referrer:o,snapshotHTML:s,response:d,visitCachedSnapshot:c,willRender:u}=Object.assign(Object.assign({},H),a);this.action=r,this.historyChanged=i,this.referrer=o,this.snapshotHTML=s,this.response=d,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action),this.visitCachedSnapshot=c,this.willRender=u,this.scrolled=!u}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}get silent(){return this.isSamePage}start(){this.state==l.initialized&&(this.recordTimingMetric(s.visitStart),this.state=l.started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==l.started&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=l.canceled)}complete(){this.state==l.started&&(this.recordTimingMetric(s.visitEnd),this.state=l.completed,this.adapter.visitCompleted(this),this.delegate.visitCompleted(this),this.followRedirect())}fail(){this.state==l.started&&(this.state=l.failed,this.adapter.visitFailed(this))}changeHistory(){var e;if(!this.historyChanged){const t=this.location.href===(null===(e=this.referrer)||void 0===e?void 0:e.href)?"replace":this.action,n=this.getHistoryMethodForAction(t);this.history.update(n,this.location,this.restorationIdentifier),this.historyChanged=!0}}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new T(this,r.get,this.location),this.request.perform())}simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(s.requestStart),this.adapter.visitRequestStarted(this)}recordResponse(e=this.response){if(this.response=e,e){const{statusCode:t}=e;z(t)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,t)}}finishRequest(){this.recordTimingMetric(s.requestEnd),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){const{statusCode:e,responseHTML:t}=this.response;this.render((async()=>{this.cacheSnapshot(),this.view.renderPromise&&await this.view.renderPromise,z(e)&&null!=t?(await this.view.renderPage(B.fromHTMLString(t),!1,this.willRender),this.adapter.visitRendered(this),this.complete()):(await this.view.renderError(B.fromHTMLString(t)),this.adapter.visitRendered(this),this.fail())}))}}getCachedSnapshot(){const e=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(e&&(!u(this.location)||e.hasAnchor(u(this.location)))&&("restore"==this.action||e.isPreviewable))return e}getPreloadedSnapshot(){if(this.snapshotHTML)return B.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return null!=this.getCachedSnapshot()}loadCachedSnapshot(){const e=this.getCachedSnapshot();if(e){const t=this.shouldIssueRequest();this.render((async()=>{this.cacheSnapshot(),this.isSamePage?this.adapter.visitRendered(this):(this.view.renderPromise&&await this.view.renderPromise,await this.view.renderPage(e,t,this.willRender),this.adapter.visitRendered(this),t||this.complete())}))}}followRedirect(){var e;this.redirectedToLocation&&!this.followedRedirect&&(null===(e=this.response)||void 0===e?void 0:e.redirected)&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:"replace",response:this.response}),this.followedRedirect=!0)}goToSamePageAnchor(){this.isSamePage&&this.render((async()=>{this.cacheSnapshot(),this.adapter.visitRendered(this)}))}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(e,t){}async requestSucceededWithResponse(e,t){const n=await t.responseHTML,{redirected:a,statusCode:r}=t;null==n?this.recordResponse({statusCode:W.contentTypeMismatch,redirected:a}):(this.redirectedToLocation=t.redirected?t.location:void 0,this.recordResponse({statusCode:r,responseHTML:n,redirected:a}))}async requestFailedWithResponse(e,t){const n=await t.responseHTML,{redirected:a,statusCode:r}=t;null==n?this.recordResponse({statusCode:W.contentTypeMismatch,redirected:a}):this.recordResponse({statusCode:r,responseHTML:n,redirected:a})}requestErrored(e,t){this.recordResponse({statusCode:W.networkFailure,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){this.scrolled||("restore"==this.action?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation,this.location),this.scrolled=!0)}scrollToRestoredPosition(){const{scrollPosition:e}=this.restorationData;if(e)return this.view.scrollToPosition(e),!0}scrollToAnchor(){const e=u(this.location);if(null!=e)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){this.timingMetrics[e]=(new Date).getTime()}getTimingMetrics(){return Object.assign({},this.timingMetrics)}getHistoryMethodForAction(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}hasPreloadedResponse(){return"object"==typeof this.response}shouldIssueRequest(){return!this.isSamePage&&("restore"==this.action?!this.hasCachedSnapshot():this.willRender)}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot().then((e=>e&&this.visitCachedSnapshot(e))),this.snapshotCached=!0)}async render(e){this.cancelRender(),await new Promise((e=>{this.frame=requestAnimationFrame((()=>e()))})),await e(),delete this.frame,this.performScroll()}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}}function z(e){return e>=200&&e<300}class K{constructor(e){this.progressBar=new N,this.showProgressBar=()=>{this.progressBar.show()},this.session=e}visitProposedToLocation(e,t){this.navigator.startVisit(e,S(),t)}visitStarted(e){e.loadCachedSnapshot(),e.issueRequest(),e.changeHistory(),e.goToSamePageAnchor()}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()||"restore"!=e.action?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(e){e.loadResponse()}visitRequestFailedWithStatusCode(e,t){switch(t){case W.networkFailure:case W.timeoutFailure:case W.contentTypeMismatch:return this.reload();default:return e.loadResponse()}}visitRequestFinished(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitCompleted(e){}pageInvalidated(){this.reload()}visitFailed(e){}visitRendered(e){}formSubmissionStarted(e){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),null!=this.visitProgressBarTimeout&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){null==this.formProgressBarTimeout&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),null!=this.formProgressBarTimeout&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}reload(){window.location.reload()}get navigator(){return this.session.navigator}}class Q{constructor(){this.started=!1}start(){this.started||(this.started=!0,addEventListener("turbo:before-cache",this.removeStaleElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-cache",this.removeStaleElements,!1))}removeStaleElements(){const e=[...document.querySelectorAll('[data-turbo-cache="false"]')];for(const t of e)t.remove()}}class G{constructor(e){this.started=!1,this.submitCaptured=()=>{removeEventListener("submit",this.submitBubbled,!1),addEventListener("submit",this.submitBubbled,!1)},this.submitBubbled=e=>{if(!e.defaultPrevented){const t=e.target instanceof HTMLFormElement?e.target:void 0,n=e.submitter||void 0;if(t){"dialog"!=((null==n?void 0:n.getAttribute("formmethod"))||t.getAttribute("method"))&&this.delegate.willSubmitForm(t,n)&&(e.preventDefault(),this.delegate.formSubmitted(t,n))}}},this.delegate=e}start(){this.started||(addEventListener("submit",this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(removeEventListener("submit",this.submitCaptured,!0),this.started=!1)}}class Z{constructor(e){this.element=e,this.linkInterceptor=new O(this,e),this.formInterceptor=new x(this,e)}start(){this.linkInterceptor.start(),this.formInterceptor.start()}stop(){this.linkInterceptor.stop(),this.formInterceptor.stop()}shouldInterceptLinkClick(e,t){return this.shouldRedirect(e)}linkClickIntercepted(e,t){const n=this.findFrameElement(e);n&&n.delegate.linkClickIntercepted(e,t)}shouldInterceptFormSubmission(e,t){return this.shouldSubmit(e,t)}formSubmissionIntercepted(e,t){const n=this.findFrameElement(e,t);n&&(n.removeAttribute("reloadable"),n.delegate.formSubmissionIntercepted(e,t))}shouldSubmit(e,t){var n;const a=h(e,t),r=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),i=c(null!==(n=null==r?void 0:r.content)&&void 0!==n?n:"/");return this.shouldRedirect(e,t)&&g(a,i)}shouldRedirect(e,t){const n=this.findFrameElement(e,t);return!!n&&n!=e.closest("turbo-frame")}findFrameElement(e,t){const n=(null==t?void 0:t.getAttribute("data-turbo-frame"))||e.getAttribute("data-turbo-frame");if(n&&"_top"!=n){const e=this.element.querySelector(`#${n}:not([disabled])`);if(e instanceof d)return e}}}class X{constructor(e){this.restorationIdentifier=S(),this.restorationData={},this.started=!1,this.pageLoaded=!1,this.onPopState=e=>{if(this.shouldHandlePopState()){const{turbo:t}=e.state||{};if(t){this.location=new URL(window.location.href);const{restorationIdentifier:e}=t;this.restorationIdentifier=e,this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location,e)}}},this.onPageLoad=async e=>{await Promise.resolve(),this.pageLoaded=!0},this.delegate=e}start(){this.started||(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1)}push(e,t){this.update(history.pushState,e,t)}replace(e,t){this.update(history.replaceState,e,t)}update(e,t,n=S()){const a={turbo:{restorationIdentifier:n}};e.call(history,a,"",t.href),this.location=t,this.restorationIdentifier=n}getRestorationDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationData(e){const{restorationIdentifier:t}=this,n=this.restorationData[t];this.restorationData[t]=Object.assign(Object.assign({},n),e)}assumeControlOfScrollRestoration(){var e;this.previousScrollRestoration||(this.previousScrollRestoration=null!==(e=history.scrollRestoration)&&void 0!==e?e:"auto",history.scrollRestoration="manual")}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}shouldHandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.pageLoaded||"complete"==document.readyState}}class ee{constructor(e){this.started=!1,this.clickCaptured=()=>{removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},this.clickBubbled=e=>{if(this.clickEventIsSignificant(e)){const t=e.composedPath&&e.composedPath()[0]||e.target,n=this.findLinkFromClickTarget(t);if(n){const t=this.getLocationForLink(n);this.delegate.willFollowLinkToLocation(n,t)&&(e.preventDefault(),this.delegate.followedLinkToLocation(n,t))}}},this.delegate=e}start(){this.started||(addEventListener("click",this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(removeEventListener("click",this.clickCaptured,!0),this.started=!1)}clickEventIsSignificant(e){return!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}findLinkFromClickTarget(e){if(e instanceof Element)return e.closest("a[href]:not([target^=_]):not([download])")}getLocationForLink(e){return c(e.getAttribute("href")||"")}}function te(e){return"advance"==e||"replace"==e||"restore"==e}class ne{constructor(e){this.delegate=e}proposeVisit(e,t={}){this.delegate.allowsVisitingLocationWithAction(e,t.action)&&(g(e,this.view.snapshot.rootLocation)?this.delegate.visitProposedToLocation(e,t):window.location.href=e.toString())}startVisit(e,t,n={}){this.stop(),this.currentVisit=new V(this,c(e),t,Object.assign({referrer:this.location},n)),this.currentVisit.start()}submitForm(e,t){this.stop(),this.formSubmission=new j(this,e,t,!0),this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}formSubmissionStarted(e){"function"==typeof this.adapter.formSubmissionStarted&&this.adapter.formSubmissionStarted(e)}async formSubmissionSucceededWithResponse(e,t){if(e==this.formSubmission){const n=await t.responseHTML;if(n){e.method!=r.get&&this.view.clearSnapshotCache();const{statusCode:a,redirected:i}=t,o={action:this.getActionForFormSubmission(e),response:{statusCode:a,responseHTML:n,redirected:i}};this.proposeVisit(t.location,o)}}}async formSubmissionFailedWithResponse(e,t){const n=await t.responseHTML;if(n){const e=B.fromHTMLString(n);t.serverError?await this.view.renderError(e):await this.view.renderPage(e),this.view.scrollToTop(),this.view.clearSnapshotCache()}}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished(e){"function"==typeof this.adapter.formSubmissionFinished&&this.adapter.formSubmissionFinished(e)}visitStarted(e){this.delegate.visitStarted(e)}visitCompleted(e){this.delegate.visitCompleted(e)}locationWithActionIsSamePage(e,t){const n=u(e),a=u(this.view.lastRenderedLocation),r="restore"===t&&void 0===n;return"replace"!==t&&f(e)===f(this.view.lastRenderedLocation)&&(r||null!=n&&n!==a)}visitScrolledToSamePageLocation(e,t){this.delegate.visitScrolledToSamePageLocation(e,t)}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}getActionForFormSubmission(e){const{formElement:t,submitter:n}=e,a=L("data-turbo-action",n,t);return te(a)?a:"advance"}}!function(e){e[e.initial=0]="initial",e[e.loading=1]="loading",e[e.interactive=2]="interactive",e[e.complete=3]="complete"}(U||(U={}));class ae{constructor(e){this.stage=U.initial,this.started=!1,this.interpretReadyState=()=>{const{readyState:e}=this;"interactive"==e?this.pageIsInteractive():"complete"==e&&this.pageIsComplete()},this.pageWillUnload=()=>{this.delegate.pageWillUnload()},this.delegate=e}start(){this.started||(this.stage==U.initial&&(this.stage=U.loading),document.addEventListener("readystatechange",this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener("readystatechange",this.interpretReadyState,!1),removeEventListener("pagehide",this.pageWillUnload,!1),this.started=!1)}pageIsInteractive(){this.stage==U.loading&&(this.stage=U.interactive,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==U.interactive&&(this.stage=U.complete,this.delegate.pageLoaded())}get readyState(){return document.readyState}}class re{constructor(e){this.started=!1,this.onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},this.delegate=e}start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener("scroll",this.onScroll,!1),this.started=!1)}updatePosition(e){this.delegate.scrollPositionChanged(e)}}class ie{constructor(e){this.sources=new Set,this.started=!1,this.inspectFetchResponse=e=>{const t=function(e){var t;const n=null===(t=e.detail)||void 0===t?void 0:t.fetchResponse;if(n instanceof w)return n}(e);t&&function(e){var t;return(null!==(t=e.contentType)&&void 0!==t?t:"").startsWith(C.contentType)}(t)&&(e.preventDefault(),this.receiveMessageResponse(t))},this.receiveMessageEvent=e=>{this.started&&"string"==typeof e.data&&this.receiveMessageHTML(e.data)},this.delegate=e}start(){this.started||(this.started=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConnected(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMessageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(this.sources.delete(e),e.removeEventListener("message",this.receiveMessageEvent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}async receiveMessageResponse(e){const t=await e.responseHTML;t&&this.receiveMessageHTML(t)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(new C(e))}}class oe extends R{async render(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAndBody(){const{documentElement:e,head:t,body:n}=document;e.replaceChild(this.newHead,t),e.replaceChild(this.newElement,n)}activateScriptElements(){for(const e of this.scriptElements){const t=e.parentNode;if(t){const n=this.createScriptElement(e);t.replaceChild(n,e)}}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return[...document.documentElement.querySelectorAll("script")]}}class se extends R{get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}prepareToRender(){this.mergeHead()}async render(){this.willRender&&this.replaceBody()}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}mergeHead(){this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()}replaceBody(){this.preservingPermanentElements((()=>{this.activateNewBody(),this.assignNewBody()}))}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}copyNewHeadStylesheetElements(){for(const e of this.newHeadStylesheetElements)document.head.appendChild(e)}copyNewHeadScriptElements(){for(const e of this.newHeadScriptElements)document.head.appendChild(this.createScriptElement(e))}removeCurrentHeadProvisionalElements(){for(const e of this.currentHeadProvisionalElements)document.head.removeChild(e)}copyNewHeadProvisionalElements(){for(const e of this.newHeadProvisionalElements)document.head.appendChild(e)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewBodyScriptElements()}activateNewBodyScriptElements(){for(const e of this.newBodyScriptElements){const t=this.createScriptElement(e);e.replaceWith(t)}}assignNewBody(){document.body&&this.newElement instanceof HTMLBodyElement?document.body.replaceWith(this.newElement):document.documentElement.appendChild(this.newElement)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll("script")}}class le{constructor(e){this.keys=[],this.snapshots={},this.size=e}has(e){return v(e)in this.snapshots}get(e){if(this.has(e)){const t=this.read(e);return this.touch(e),t}}put(e,t){return this.write(e,t),this.touch(e),t}clear(){this.snapshots={}}read(e){return this.snapshots[v(e)]}write(e,t){this.snapshots[v(e)]=t}touch(e){const t=v(e),n=this.keys.indexOf(t);n>-1&&this.keys.splice(n,1),this.keys.unshift(t),this.trim()}trim(){for(const e of this.keys.splice(this.size))delete this.snapshots[e]}}class de extends F{constructor(){super(...arguments),this.snapshotCache=new le(10),this.lastRenderedLocation=new URL(location.href)}renderPage(e,t=!1,n=!0){const a=new se(this.snapshot,e,t,n);return this.render(a)}renderError(e){const t=new oe(this.snapshot,e,!1);return this.render(t)}clearSnapshotCache(){this.snapshotCache.clear()}async cacheSnapshot(){if(this.shouldCacheSnapshot){this.delegate.viewWillCacheSnapshot();const{snapshot:e,lastRenderedLocation:t}=this;await new Promise((e=>setTimeout((()=>e()),0)));const n=e.clone();return this.snapshotCache.put(t,n),n}}getCachedSnapshotForLocation(e){return this.snapshotCache.get(e)}get snapshot(){return B.fromElement(this.element)}get shouldCacheSnapshot(){return this.snapshot.isCacheable}}function ce(e){Object.defineProperties(e,ue)}const ue={absoluteURL:{get(){return this.toString()}}},he=new class{constructor(){this.navigator=new ne(this),this.history=new X(this),this.view=new de(this,document.documentElement),this.adapter=new K(this),this.pageObserver=new ae(this),this.cacheObserver=new Q,this.linkClickObserver=new ee(this),this.formSubmitObserver=new G(this),this.scrollObserver=new re(this),this.streamObserver=new ie(this),this.frameRedirector=new Z(document.documentElement),this.drive=!0,this.enabled=!0,this.progressBarDelay=500,this.started=!1}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.started=!1)}registerAdapter(e){this.adapter=e}visit(e,t={}){this.navigator.proposeVisit(c(e),t)}connectStreamSource(e){this.streamObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObserver.disconnectStreamSource(e)}renderStreamMessage(e){document.documentElement.appendChild(C.wrap(e).fragment)}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(e){this.progressBarDelay=e}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}historyPoppedToLocationWithRestorationIdentifier(e,t){this.enabled?this.navigator.startVisit(e,t,{action:"restore",historyChanged:!0}):this.adapter.pageInvalidated()}scrollPositionChanged(e){this.history.updateRestorationData({scrollPosition:e})}willFollowLinkToLocation(e,t){return this.elementDriveEnabled(e)&&g(t,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(e,t)}followedLinkToLocation(e,t){const n=this.getActionForLink(e);this.convertLinkWithMethodClickToFormSubmission(e)||this.visit(t.href,{action:n})}convertLinkWithMethodClickToFormSubmission(e){const t=e.getAttribute("data-turbo-method");if(t){const n=document.createElement("form");n.method=t,n.action=e.getAttribute("href")||"undefined",n.hidden=!0,e.hasAttribute("data-turbo-confirm")&&n.setAttribute("data-turbo-confirm",e.getAttribute("data-turbo-confirm"));const a=this.getTargetFrameForLink(e);return a?(n.setAttribute("data-turbo-frame",a),n.addEventListener("turbo:submit-start",(()=>n.remove()))):n.addEventListener("submit",(()=>n.remove())),document.body.appendChild(n),b("submit",{cancelable:!0,target:n})}return!1}allowsVisitingLocationWithAction(e,t){return this.locationWithActionIsSamePage(e,t)||this.applicationAllowsVisitingLocation(e)}visitProposedToLocation(e,t){ce(e),this.adapter.visitProposedToLocation(e,t)}visitStarted(e){ce(e.location),e.silent||this.notifyApplicationAfterVisitingLocation(e.location,e.action)}visitCompleted(e){this.notifyApplicationAfterPageLoad(e.getTimingMetrics())}locationWithActionIsSamePage(e,t){return this.navigator.locationWithActionIsSamePage(e,t)}visitScrolledToSamePageLocation(e,t){this.notifyApplicationAfterVisitingSamePageLocation(e,t)}willSubmitForm(e,t){const n=h(e,t);return this.elementDriveEnabled(e)&&(!t||this.elementDriveEnabled(t))&&g(c(n),this.snapshot.rootLocation)}formSubmitted(e,t){this.navigator.submitForm(e,t)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMessage(e)}viewWillCacheSnapshot(){var e;(null===(e=this.navigator.currentVisit)||void 0===e?void 0:e.silent)||this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element:e},t){return!this.notifyApplicationBeforeRender(e,t).defaultPrevented}viewRenderedSnapshot(e,t){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender()}viewInvalidated(){this.adapter.pageInvalidated()}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRendered(e,t){this.notifyApplicationAfterFrameRender(e,t)}applicationAllowsFollowingLinkToLocation(e,t){return!this.notifyApplicationAfterClickingLinkToLocation(e,t).defaultPrevented}applicationAllowsVisitingLocation(e){return!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(e,t){return b("turbo:click",{target:e,detail:{url:t.href},cancelable:!0})}notifyApplicationBeforeVisitingLocation(e){return b("turbo:before-visit",{detail:{url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,t){return D(document.documentElement),b("turbo:visit",{detail:{url:e.href,action:t}})}notifyApplicationBeforeCachingSnapshot(){return b("turbo:before-cache")}notifyApplicationBeforeRender(e,t){return b("turbo:before-render",{detail:{newBody:e,resume:t},cancelable:!0})}notifyApplicationAfterRender(){return b("turbo:render")}notifyApplicationAfterPageLoad(e={}){return M(document.documentElement),b("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyApplicationAfterVisitingSamePageLocation(e,t){dispatchEvent(new HashChangeEvent("hashchange",{oldURL:e.toString(),newURL:t.toString()}))}notifyApplicationAfterFrameLoad(e){return b("turbo:frame-load",{target:e})}notifyApplicationAfterFrameRender(e,t){return b("turbo:frame-render",{detail:{fetchResponse:e},target:t,cancelable:!0})}elementDriveEnabled(e){const t=null==e?void 0:e.closest("[data-turbo]");return this.drive?!t||"false"!=t.getAttribute("data-turbo"):!!t&&"true"==t.getAttribute("data-turbo")}getActionForLink(e){const t=e.getAttribute("data-turbo-action");return te(t)?t:"advance"}getTargetFrameForLink(e){const t=e.getAttribute("data-turbo-frame");if(t)return t;{const t=e.closest("turbo-frame");if(t)return t.id}}get snapshot(){return this.view.snapshot}},{navigator:me}=he;function pe(){he.start()}function ge(e){he.registerAdapter(e)}function fe(e,t){he.visit(e,t)}function ve(e){he.connectStreamSource(e)}function we(e){he.disconnectStreamSource(e)}function be(e){he.renderStreamMessage(e)}function ye(){he.clearCache()}function $e(e){he.setProgressBarDelay(e)}function ke(e){j.confirmMethod=e}var Se=Object.freeze({__proto__:null,navigator:me,session:he,PageRenderer:se,PageSnapshot:B,start:pe,registerAdapter:ge,visit:fe,connectStreamSource:ve,disconnectStreamSource:we,renderStreamMessage:be,clearCache:ye,setProgressBarDelay:$e,setConfirmMethod:ke});class Le{constructor(e){this.visitCachedSnapshot=({element:e})=>{var t;const{id:n,clone:a}=this;null===(t=e.querySelector("#"+n))||void 0===t||t.replaceWith(a)},this.clone=e.cloneNode(!0),this.id=e.id}}function De(e){if(null!=e){const t=document.getElementById(e);if(t instanceof d)return t}}function Me(e,t){if(e){const a=e.getAttribute("src");if(null!=a&&null!=t&&(n=t,c(a).href==c(n).href))throw new Error(`Matching <turbo-frame id="${e.id}"> element has a source URL which references itself`);if(e.ownerDocument!==document&&(e=document.importNode(e,!0)),e instanceof d)return e.connectedCallback(),e.disconnectedCallback(),e}var n}const Te={after(){this.targetElements.forEach((e=>{var t;return null===(t=e.parentElement)||void 0===t?void 0:t.insertBefore(this.templateContent,e.nextSibling)}))},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach((e=>e.append(this.templateContent)))},before(){this.targetElements.forEach((e=>{var t;return null===(t=e.parentElement)||void 0===t?void 0:t.insertBefore(this.templateContent,e)}))},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach((e=>e.prepend(this.templateContent)))},remove(){this.targetElements.forEach((e=>e.remove()))},replace(){this.targetElements.forEach((e=>e.replaceWith(this.templateContent)))},update(){this.targetElements.forEach((e=>{e.innerHTML="",e.append(this.templateContent)}))}};class _e extends HTMLElement{async connectedCallback(){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect()}}async render(){var e;return null!==(e=this.renderPromise)&&void 0!==e?e:this.renderPromise=(async()=>{this.dispatchEvent(this.beforeRenderEvent)&&(await y(),this.performAction())})()}disconnect(){try{this.remove()}catch(e){}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach((e=>e.remove()))}get duplicateChildren(){var e;const t=this.targetElements.flatMap((e=>[...e.children])).filter((e=>!!e.id)),n=[...null===(e=this.templateContent)||void 0===e?void 0:e.children].filter((e=>!!e.id)).map((e=>e.id));return t.filter((e=>n.includes(e.id)))}get performAction(){if(this.action){const e=Te[this.action];if(e)return e;this.raise("unknown action")}this.raise("action attribute is missing")}get targetElements(){return this.target?this.targetElementsById:this.targets?this.targetElementsByQuery:void this.raise("target or targets attribute is missing")}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.raise("first child element must be a <template> element")}get action(){return this.getAttribute("action")}get target(){return this.getAttribute("target")}get targets(){return this.getAttribute("targets")}raise(e){throw new Error(`${this.description}: ${e}`)}get description(){var e,t;return null!==(t=(null!==(e=this.outerHTML.match(/<[^>]+>/))&&void 0!==e?e:[])[0])&&void 0!==t?t:"<turbo-stream>"}get beforeRenderEvent(){return new CustomEvent("turbo:before-stream-render",{bubbles:!0,cancelable:!0})}get targetElementsById(){var e;const t=null===(e=this.ownerDocument)||void 0===e?void 0:e.getElementById(this.target);return null!==t?[t]:[]}get targetElementsByQuery(){var e;const t=null===(e=this.ownerDocument)||void 0===e?void 0:e.querySelectorAll(this.targets);return 0!==t.length?Array.prototype.slice.call(t):[]}}d.delegateConstructor=class{constructor(e){this.fetchResponseLoaded=e=>{},this.currentFetchRequest=null,this.resolveVisitPromise=()=>{},this.connected=!1,this.hasBeenLoaded=!1,this.settingSourceURL=!1,this.element=e,this.view=new P(this,this.element),this.appearanceObserver=new _(this,this.element),this.linkInterceptor=new O(this,this.element),this.formInterceptor=new x(this,this.element)}connect(){this.connected||(this.connected=!0,this.reloadable=!1,this.loadingStyle==a.lazy&&this.appearanceObserver.start(),this.linkInterceptor.start(),this.formInterceptor.start(),this.sourceURLChanged())}disconnect(){this.connected&&(this.connected=!1,this.appearanceObserver.stop(),this.linkInterceptor.stop(),this.formInterceptor.stop())}disabledChanged(){this.loadingStyle==a.eager&&this.loadSourceURL()}sourceURLChanged(){(this.loadingStyle==a.eager||this.hasBeenLoaded)&&this.loadSourceURL()}loadingStyleChanged(){this.loadingStyle==a.lazy?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.loadSourceURL())}async loadSourceURL(){if(!this.settingSourceURL&&this.enabled&&this.isActive&&(this.reloadable||this.sourceURL!=this.currentURL)){const e=this.currentURL;if(this.currentURL=this.sourceURL,this.sourceURL)try{this.element.loaded=this.visit(c(this.sourceURL)),this.appearanceObserver.stop(),await this.element.loaded,this.hasBeenLoaded=!0}catch(t){throw this.currentURL=e,t}}}async loadResponse(e){(e.redirected||e.succeeded&&e.isHTML)&&(this.sourceURL=e.response.url);try{const t=await e.responseHTML;if(t){const{body:n}=$(t),a=new A(await this.extractForeignFrameElement(n)),r=new I(this.view.snapshot,a,!1,!1);this.view.renderPromise&&await this.view.renderPromise,await this.view.render(r),he.frameRendered(e,this.element),he.frameLoaded(this.element),this.fetchResponseLoaded(e)}}catch(e){console.error(e),this.view.invalidate()}finally{this.fetchResponseLoaded=()=>{}}}elementAppearedInViewport(e){this.loadSourceURL()}shouldInterceptLinkClick(e,t){return!e.hasAttribute("data-turbo-method")&&this.shouldInterceptNavigation(e)}linkClickIntercepted(e,t){this.reloadable=!0,this.navigateFrame(e,t)}shouldInterceptFormSubmission(e,t){return this.shouldInterceptNavigation(e,t)}formSubmissionIntercepted(e,t){this.formSubmission&&this.formSubmission.stop(),this.reloadable=!1,this.formSubmission=new j(this,e,t);const{fetchRequest:n}=this.formSubmission;this.prepareHeadersForRequest(n.headers,n),this.formSubmission.start()}prepareHeadersForRequest(e,t){e["Turbo-Frame"]=this.id}requestStarted(e){D(this.element)}requestPreventedHandlingResponse(e,t){this.resolveVisitPromise()}async requestSucceededWithResponse(e,t){await this.loadResponse(t),this.resolveVisitPromise()}requestFailedWithResponse(e,t){console.error(t),this.resolveVisitPromise()}requestErrored(e,t){console.error(t),this.resolveVisitPromise()}requestFinished(e){M(this.element)}formSubmissionStarted({formElement:e}){D(e,this.findFrameElement(e))}formSubmissionSucceededWithResponse(e,t){const n=this.findFrameElement(e.formElement,e.submitter);this.proposeVisitIfNavigatedWithAction(n,e.formElement,e.submitter),n.delegate.loadResponse(t)}formSubmissionFailedWithResponse(e,t){this.element.delegate.loadResponse(t)}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished({formElement:e}){M(e,this.findFrameElement(e))}allowsImmediateRender(e,t){return!0}viewRenderedSnapshot(e,t){}viewInvalidated(){}async visit(e){var t;const n=new T(this,r.get,e,new URLSearchParams,this.element);return null===(t=this.currentFetchRequest)||void 0===t||t.cancel(),this.currentFetchRequest=n,new Promise((e=>{this.resolveVisitPromise=()=>{this.resolveVisitPromise=()=>{},this.currentFetchRequest=null,e()},n.perform()}))}navigateFrame(e,t,n){const a=this.findFrameElement(e,n);this.proposeVisitIfNavigatedWithAction(a,e,n),a.setAttribute("reloadable",""),a.src=t}proposeVisitIfNavigatedWithAction(e,t,n){const a=L("data-turbo-action",n,t,e);if(te(a)){const{visitCachedSnapshot:t}=new Le(e);e.delegate.fetchResponseLoaded=n=>{if(e.src){const{statusCode:r,redirected:i}=n,o={statusCode:r,redirected:i,responseHTML:e.ownerDocument.documentElement.outerHTML};he.visit(e.src,{action:a,response:o,visitCachedSnapshot:t,willRender:!1})}}}}findFrameElement(e,t){var n;return null!==(n=De(L("data-turbo-frame",t,e)||this.element.getAttribute("target")))&&void 0!==n?n:this.element}async extractForeignFrameElement(e){let t;const n=CSS.escape(this.id);try{if(t=Me(e.querySelector(`turbo-frame#${n}`),this.currentURL))return t;if(t=Me(e.querySelector(`turbo-frame[src][recurse~=${n}]`),this.currentURL))return await t.loaded,await this.extractForeignFrameElement(t);console.error(`Response has no matching <turbo-frame id="${n}"> element`)}catch(e){console.error(e)}return new d}formActionIsVisitable(e,t){return g(c(h(e,t)),this.rootLocation)}shouldInterceptNavigation(e,t){const n=L("data-turbo-frame",t,e)||this.element.getAttribute("target");if(e instanceof HTMLFormElement&&!this.formActionIsVisitable(e,t))return!1;if(!this.enabled||"_top"==n)return!1;if(n){const e=De(n);if(e)return!e.disabled}return!!he.elementDriveEnabled(e)&&!(t&&!he.elementDriveEnabled(t))}get id(){return this.element.id}get enabled(){return!this.element.disabled}get sourceURL(){if(this.element.src)return this.element.src}get reloadable(){return this.findFrameElement(this.element).hasAttribute("reloadable")}set reloadable(e){const t=this.findFrameElement(this.element);e?t.setAttribute("reloadable",""):t.removeAttribute("reloadable")}set sourceURL(e){this.settingSourceURL=!0,this.element.src=null!=e?e:null,this.currentURL=this.element.src,this.settingSourceURL=!1}get loadingStyle(){return this.element.loading}get isLoading(){return void 0!==this.formSubmission||void 0!==this.resolveVisitPromise()}get isActive(){return this.element.isActive&&this.connected}get rootLocation(){var e;const t=this.element.ownerDocument.querySelector('meta[name="turbo-root"]');return c(null!==(e=null==t?void 0:t.content)&&void 0!==e?e:"/")}},customElements.define("turbo-frame",d),customElements.define("turbo-stream",_e),(()=>{let e=document.currentScript;if(e&&!e.hasAttribute("data-turbo-suppress-warning"))for(;e=e.parentElement;)if(e==document.body)return console.warn(k` You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do! Load your application’s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change. For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements —— Suppress this warning by adding a "data-turbo-suppress-warning" attribute to: %s `,e.outerHTML)})(),window.Turbo=Se,pe(),window.Turbo=e,pe()})(),window.listenWithoutTarget=function(e,t){$(document).on(e,t)},window.listen=function(e,t,n){$(document).on(e,t,n)},window.listenClick=function(e,t){$(document).on("click",e,t)},window.listenSubmit=function(e,t){$(document).on("submit",e,t)},window.listenHiddenBsModal=function(e,t){$(document).on("hidden.bs.modal",e,t)},window.listenShowBsModal=function(e,t){$(document).on("show.bs.modal",e,t)},window.listenChange=function(e,t){$(document).on("change",e,t)},window.listenKeyup=function(e,t){$(document).on("keyup",e,t)},(()=>{var source=null,jsrender=__webpack_require__(11);function initAllComponents(){refreshCsrfToken(),select2initialize(),modalInputFocus(),alertInitialize(),IOInitImageComponent(),IOInitSidebar(),togglePassword(),tooltip(),initToastr(),resizeWindow()}function togglePassword(){$('[data-toggle="password"]').each((function(){var e=$(this),t=$(this).parent().find(".input-icon");t.css("cursor","pointer").addClass("input-password-hide"),t.on("click",(function(){t.hasClass("input-password-hide")?(t.removeClass("input-password-hide").addClass("input-password-show"),t.find(".bi").removeClass("bi-eye-slash-fill").addClass("bi-eye-fill"),e.attr("type","text")):(t.removeClass("input-password-show").addClass("input-password-hide"),t.find(".bi").removeClass("bi-eye-fill").addClass("bi-eye-slash-fill"),e.attr("type","password"))}))}))}function alertInitialize(){$(".alert").delay(5e3).slideUp(300)}function select2initialize(){$('[data-control="select2"]').each((function(){$(this).select2()}))}function refreshCsrfToken(){$.ajaxSetup({headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")}})}document.addEventListener("turbo:load",initAllComponents),window.addEventListener("turbo:load",(function(e){$('input:text:not([readonly="readonly"]):not([name="search"]):not(.front-input):not([id="time_range"]):not(.removeFocus)').first().focus()}));var modalInputFocus=function(){$((function(){$(".modal").on("shown.bs.modal",(function(){$(this).find("input:text")[0]&&$(this).find("input:text")[0].focus()}))}))};function deleteItemAjax(url,header){var callFunction=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;$.ajax({url,type:"DELETE",dataType:"json",success:function success(obj){obj.success&&(Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable")),swal({icon:"success",title:Lang.get("js.deleted"),text:header+" "+Lang.get("js.has_been_deleted"),timer:2e3,button:Lang.get("js.ok")}),callFunction&&eval(callFunction)},error:function(e){swal({title:Lang.get("js.error"),icon:"error",text:e.responseJSON.message,type:"error",timer:4e3,button:Lang.get("js.ok")})}})}function tooltip(){[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(e){return new bootstrap.Tooltip(e)}))}function resizeWindow(){$(window).resize((function(){$(window).width()<768?($(".createInvoiceBtn").html('<i class="far fa-file-alt"></i>'),$(".fullScreenBtn").addClass("d-none")):($(".createInvoiceBtn").html(Lang.get("js.new_invoice")),$(".fullScreenBtn").removeClass("d-none"))})),$(window).trigger("resize")}window.ajaxCallInProgress=function(){ajaxCallIsRunning=!0},window.ajaxCallCompleted=function(){ajaxCallIsRunning=!1},toastr.options={closeButton:!0,debug:!1,newestOnTop:!1,progressBar:!0,positionClass:"toast-top-right",preventDuplicates:!1,onclick:null,showDuration:"300",hideDuration:"1000",timeOut:"5000",extendedTimeOut:"1000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut"},window.resetModalForm=function(e,t){if(null==$(e)[0])return!1;$(e)[0].reset(),$("select.select2Selector").each((function(e,t){var n="#"+$(this).attr("id");$(n).val(""),$(n).trigger("change")})),$(t).hide()},window.printErrorMessage=function(e,t){$(e).show().html(""),$(e).text(t.responseJSON.message)},window.manageAjaxErrors=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"editValidationErrorsBox";404==e.status?toastr.error(e.responseJSON.message):printErrorMessage("#"+t,e)},window.displaySuccessMessage=function(e){toastr.success(e)},window.displayErrorMessage=function(e){toastr.error(e)},window.deleteItem=function(e,t){var n=arguments,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(a){a=n.length>3&&void 0!==n[3]?n[3]:null;swal({title:Lang.get("js.delete")+" !",text:Lang.get("js.are_you_sure_delete")+' "'+t+'" ?',buttons:[Lang.get("js.no_cancel"),Lang.get("js.yes_delete")],icon:sweetAlertIcon}).then((function(n){n&&deleteItemAjax(e,t,a)}))}(a)},window.format=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DD-MMM-YYYY";return moment(e).format(t)},window.prepareTemplateRender=function(e,t){return jsrender.templates(e).render(t)},window.isValidFile=function(e,t){var n=$(e).val().split(".").pop().toLowerCase();return-1==$.inArray(n,["gif","png","jpg","jpeg"])?($(e).val(""),$(t).removeClass("d-none"),$(t).html("The image must be a file of type: jpeg, jpg, png.").show(),$(t).delay(5e3).slideUp(300),!1):($(t).hide(),!0)},window.removeCommas=function(e){return void 0===e?e:e.replace(/,/g,"")},window.DatetimepickerDefaults=function(e){return $.extend({},{sideBySide:!0,ignoreReadonly:!0,icons:{close:"fa fa-times",time:"fa fa-clock-o",date:"fa fa-calendar",up:"fa fa-arrow-up",down:"fa fa-arrow-down",previous:"fa fa-chevron-left",next:"fa fa-chevron-right",today:"fa fa-clock-o",clear:"fa fa-trash-o"}},e)},window.isEmpty=function(e){return null==e||""===e},window.screenLock=function(){$("#overlay-screen-lock").show(),$("body").css({"pointer-events":"none",opacity:"0.6"})},window.screenUnLock=function(){$("body").css({"pointer-events":"auto",opacity:"1"}),$("#overlay-screen-lock").hide()},window.processingBtn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=$(e).find(t);"loading"===n?a.button("loading"):a.button("reset")},window.setAdminBtnLoader=function(e){if(e.attr("data-loading-text"))return e.html(e.attr("data-loading-text")).prop("disabled",!0),void e.removeAttr("data-loading-text");e.attr("data-old-text",e.text()),e.html(e.attr("data-new-text")).prop("disabled",!1)},window.onload=function(){window.startLoader=function(){$(".infy-loader").show()},window.stopLoader=function(){$(".infy-loader").hide()},stopLoader()},$(document).ready((function(){$(document).find(".nav-item.dropdown ul li").hasClass("active")&&($(document).find(".nav-item.dropdown ul li.active").parent("ul").css("display","block"),$(document).find(".nav-item.dropdown ul li.active").parent("ul").parent("li").addClass("active")),$(document).on("click","#kt_aside_toggle",(function(){$(".sidebar-search-box").toggleClass("show")}))})),window.urlValidation=function(e,t){return!(""!=e&&!e.match(t))},listen("click",".languageSelection",(function(){var e=$(this).data("prefix-value");$.ajax({type:"POST",url:"/change-language",data:{languageName:e},success:function(){location.reload()}})})),$(window).width()>992&&$(document).on("click",".no-hover",(function(){$(this).toggleClass("open")})),listen("click","#register",(function(e){e.preventDefault(),$(".open #dropdownLanguage").trigger("click"),$(".open #dropdownLogin").trigger("click")})),listen("click","#language",(function(e){e.preventDefault(),$(".open #dropdownRegister").trigger("click"),$(".open #dropdownLogin").trigger("click")})),listen("click","#login",(function(e){e.preventDefault(),$(".open #dropdownRegister").trigger("click"),$(".open #dropdownLanguage").trigger("click")})),window.checkSummerNoteEmpty=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return $(e).summernote("isEmpty")&&1===n?(displayErrorMessage(t),$(document).find(".note-editable").html("<p><br></p>"),!1):!(!$(e).summernote("isEmpty")&&($(document).find(".note-editable").contents().each((function(){3===this.nodeType&&(this.textContent=this.textContent.replace(/\u00A0/g,""))})),0==$(document).find(".note-editable").text().trim().length&&($(document).find(".note-editable").html("<p><br></p>"),$(e).val(null),1===n)))||(displayErrorMessage(t),!1)},window.preparedTemplate=function(){var e=$("#actionTemplate").html();window.preparedTemplate=Handlebars.compile(e)},window.avoidSpace=function(e){if(32==(e?e.which:window.event.keyCode))return!1},window.addCommas=function(e){for(var t=(e+="").split("."),n=t[0],a=t.length>1?"."+t[1]:"",r=/(\d+)(\d{3})/;r.test(n);)n=n.replace(r,"$1,$2");return n+a},listen("click",".notification",(function(e){e.stopPropagation();var t=$(this).data("id"),n=$(this);$('[data-toggle="tooltip"]').tooltip("hide"),$.ajax({type:"get",url:"/notification/"+t+"/read",success:function(){n.remove();var e=document.getElementsByClassName("notification").length;displaySuccessMessage(Lang.get("js.notification_read_successfully")),$("#counter").text(e),0==e&&($(".empty-state").removeClass("d-none"),$("#counter").text(e),$(".notification-count").addClass("d-none"),$("#readAllNotification").parents("div").first().remove())},error:function(e){manageAjaxErrors(e)}})})),window.displayDocument=function(e,t,n){var a=!0;if(e.files&&e.files[0]){var r=new FileReader;r.onload=function(e){var r=new Image;-1==$.inArray(n,["pdf","doc","docx"])?r.src=e.target.result:"pdf"==n?($("#editPhoto").css("background-image",'url("'+pdfDocumentImageUrl+'")'),r.src=pdfDocumentImageUrl):r.src=docxDocumentImageUrl,r.onload=function(){$(t).attr("src",r.src),$(t).css("background-image",'url("'+r.src+'")'),a=!0}},a&&(r.readAsDataURL(e.files[0]),$(t).show())}},listen("click","#readAllNotification",(function(e){e.stopPropagation(),$.ajax({type:"post",url:route("read.all.notification"),success:function(){$(".notification").remove();var e=document.getElementsByClassName("notification").length;$("#counter").text(e),$(".empty-state").removeClass("d-none"),$(".notification-count").addClass("d-none"),$("#readAllNotification").parents("div").first().remove(),displaySuccessMessage(Lang.get("js.all_notification_read_successfully"))},error:function(e){manageAjaxErrors(e)}})})),window.defaultAvatarImagePreview=function(e){$(e).css("background-image",'url("'+$("#defaultAvatarImageUrl").val()+'")')},window.defaultImagePreview=function(e){$(e).css("background-image",'url("'+$("#defaultImageUrl").val()+'")')},window.wc_hex_is_light=function(e){var t=e.replace("#","");return(299*parseInt(t.substr(0,2),16)+587*parseInt(t.substr(2,2),16)+114*parseInt(t.substr(4,2),16))/1e3>240},window.number_format=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=decimalsSeparator,a=thousandsSeparator;e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var r=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,o=void 0===a?",":a,s=void 0===n?".":n,l="",d=function(e,t){var n=Math.pow(10,t);return""+Math.round(e*n)/n};return(l=(i?d(r,i):""+Math.round(r)).split("."))[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,o)),(l[1]||"").length<i&&(l[1]=l[1]||"",l[1]+=new Array(i-l[1].length+1).join("0")),l.join(s)},$(document).on("focus",".select2-selection.select2-selection--single",(function(e){$(this).closest(".select2-container").siblings("select:enabled").select2("open")})),$(document).on("select2:open",(function(){var e=document.querySelectorAll(".select2-container--open .select2-search__field");e[e.length-1].focus()})),window.blockSpecialChar=function(e){var t;return(t=document.all?e.keyCode:e.which)>64&&t<91||t>96&&t<123||8==t||32==t||t>=48&&t<=57},window.isDoubleClicked=function(e){return!!e.data("isclicked")||(e.data("isclicked",!0),setTimeout((function(){e.removeData("isclicked")}),1e3),!1)},window.fnc=function(e,t,n){return parseInt(e)<0||isNaN(e)?0:parseInt(e)>100?"Number is greater than 100":e},listen("click",".languageSelection",(function(e){var t=$(this).data("prefix-value");$.ajax({url:"/change-language",type:"post",data:{languageName:t},success:function(){location.reload()}})})),listen("click",".changeLanguage",(function(e){var t=$(this).data("prefix-value");$.ajax({url:route("change-language"),type:"post",data:{languageName:t},success:function(e){displaySuccessMessage(e.message),setTimeout((function(){location.reload()}),1e3)}})})),window.convertToMomentFormat=function(e){switch(e){case"d-m-Y":return"DD-MM-YYYY";case"m-d-Y":return"MM-DD-YYYY";case"Y-m-d":return"YYYY-MM-DD";case"m/d/Y":return"MM/DD/YYYY";case"d/m/Y":return"DD/MM/YYYY";case"Y/m/d":return"YYYY/MM/DD";case"m.d.Y":return"MM.DD.YYYY";case"d.m.Y":return"DD.MM.YYYY";case"Y.m.d":return"YYYY.MM.DD"}},window.copyToClipboard=function(e){var t=$("<input>");$("body").append(t),t.val(e).select(),document.execCommand("copy"),t.remove(),displaySuccessMessage("copied successfully")},listen("click",(function(e){$(e.target).closest(".dropdown-menu").length||($(".livewire-search-box .dropdown-menu").removeClass("show"),$(".livewire-search-box .fw-bolder").removeAttr("aria-expanded"))})),listenClick(".filter-popup",(function(e){e.preventDefault(),$(".livewire-search-box .dropdown-menu").addClass("show")})),window.addEventListener("keydown",(function(e){27==e.keyCode&&$(".livewire-search-box .dropdown-menu").removeClass("show")}),!0),window.select2NotExists=function(e){return!!$(e).length},window.removeSelect2Container=function(e){e.forEach((function(e){$(e).hasClass("select2-hidden-accessible")&&$(".select2-container").remove()}))},listenClick(".apply-dark-mode",(function(e){e.preventDefault(),$.ajax({url:route("update-dark-mode"),type:"get",success:function(e){e.success&&(displaySuccessMessage(e.message),setTimeout((function(){location.reload()}),500))},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),window.currencyAmount=function(e){return 1==$("#currency_position").val()?" "+number_format(e)+" "+$("#currency").val():" "+$("#currency").val()+" "+number_format(e)},listenChange(".image-upload",(function(e){e.preventDefault();var t=$(this).val().split(".").pop().toLowerCase();-1==$.inArray(t,["png","jpg","jpeg"])&&(displayErrorMessage("The image must be a file of type: jpg, png, jpeg"),$(this).val(""))})),$(document).on("click",".open-send-whatapp-invoice",(function(e){var t=$(this).attr("data-id");$("#sendWhatsAppModal").appendTo("body").modal("show"),$("#sendWhatsAppModal").find("#invoiceId").val(t)})),$(document).on("submit","#sendInvoiceOnWhatsApp",(function(e){e.preventDefault(),$.ajax({type:"POST",url:route("send.invoice.on.whatsapp"),data:$(this).serialize(),success:function(e){if(e.success){convertToMomentFormat(currentDateFormat);var t=e.data.invoice,n=e.data.appName,a=e.data.phoneNumber,r=e.data.invoicePdfLink,i=t.client.user.first_name,o=t.invoice_id,s=moment(t.invoice_date).format("DD/MM/YYYY"),l=moment(t.due_date).format("DD/MM/YYYY"),d=0,c=0;$.each(t.payments,(function(e,t){d+=parseFloat(t.amount)})),c=parseFloat(t.final_amount)-d;var u=t.final_amount.toFixed(2),h="https://api.whatsapp.com/send?phone=".concat(a,"&text=Hello *").concat(i,"*,%0a%0aThank you for doing business with *").concat(n,"*.%0aPlease find your invoice details below.%0a%0aInvoice No: ").concat(o,"%0aInvoice Date: ").concat(s,"%0aDue Date: ").concat(l,"%0aTotal Amount: ").concat(u,"%0aPaid Amount: ").concat(d.toFixed(2),"%0aDue Amount: ").concat(c.toFixed(2),"%0a%0aYou can view the invoice PDF here: ").concat(r);window.open(h,"_blank"),$("#sendWhatsAppModal").modal("hide")}},error:function(e){displayErrorMessage(e.message)}})}))})(),(()=>{function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var t,n,a;function r(e,t){a.val(e.format("DD/MM/YYYY")+" - "+t.format("DD/MM/YYYY"))}function i(e,t){$.ajax({type:"GET",url:route("yearly-income-chart"),dataType:"json",data:{start_date:e,end_date:t},cache:!1}).done(l)}function o(e){$("#payment-overview-container").html("");var t=e.data;if(0===t.total_records)return $("#payment-overview-container").empty(),$("#payment-overview-container").append('<div align="center" class="no-record">'+Lang.get("js.no_record_found")+"</div>"),!0;$("#payment-overview-container").html(""),$("#payment-overview-container").append('<canvas id="payment_overview"></canvas>');var n=document.getElementById("payment_overview").getContext("2d"),a={labels:t.labels,datasets:[{data:t.dataPoints,backgroundColor:["#47c363","#fc544b"]}]};window.myBar=new Chart(n,{type:"doughnut",data:a,options:{legend:{display:!0,position:"bottom",boxWidth:9},plugins:{tooltip:{callbacks:{label:function(e){return currencyAmount(e.formattedValue)}}}}}})}function s(e){$("#invoice-overview-container").html("");var t=e.data;if(0===t.total_paid_invoices&&0===t.total_unpaid_invoices)return $("#invoice-overview-container").empty(),$("#invoice-overview-container").append('<div align="center" class="no-record">'+Lang.get("js.no_record_found")+"</div>"),!0;$("#invoice-overview-container").html(""),$("#invoice-overview-container").append('<canvas id="invoice_overview"></canvas>');var n=document.getElementById("invoice_overview").getContext("2d"),a={labels:t.labels,datasets:[{data:t.dataPoints,backgroundColor:["#1100ff","#ff0000"]}]};window.myBar=new Chart(n,{type:"doughnut",data:a,options:{legend:{display:!0,position:"bottom",boxWidth:9},plugins:{tooltip:{callbacks:{label:function(e){return" "+e.formattedValue}}}}}})}function l(e){$("#yearly_income_overview-container").html("");var t=e.data;if(0===t.total_records)return $("#yearly_income_overview-container").empty(),$("#yearly_income_overview-container").append('<div align="center" class="no-record">'+Lang.get("js.no_record_found")+"</div>"),!0;$("#yearly_income_overview-container").html(""),$("#yearly_income_overview-container").append('<canvas id="yearly_income_chart_canvas" height="200"></canvas>');var n=document.getElementById("yearly_income_chart_canvas").getContext("2d");n.canvas.style.height="500px";new Chart(n,{type:"line",data:{labels:t.labels,datasets:[{label:t.month,data:t.yearly_income,fill:!1,borderColor:"#2196f3",backgroundColor:"#2196f3",borderWidth:2}]},options:{elements:{line:{tension:.5}},interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1,position:"top"},tooltip:{callbacks:{label:function(e){return currencyAmount(e.formattedValue)}}}},scales:{y:{beginAtZero:!0,grid:{display:!1},ticks:{min:0,callback:function(e){return currencyAmount(e)}}},x:{beginAtZero:!0,grid:{display:!1}}}}})}Livewire.hook("element.init",(function(l){"dashboard"==l.component.name&&function(){var l;if(!(a=$("#time_range")).length)return;t=moment().startOf("month"),n=moment().endOf("month"),r(t,n);var d=moment().startOf("month").subtract(1,"days");a.daterangepicker({startDate:t,endDate:n,opens:"left",showDropdowns:!0,autoUpdateInput:!1,locale:{customRangeLabel:Lang.get("js.custom"),applyLabel:Lang.get("js.apply"),cancelLabel:Lang.get("js.cancel"),fromLabel:Lang.get("js.from"),toLabel:Lang.get("js.to"),monthNames:[Lang.get("js.jan"),Lang.get("js.feb"),Lang.get("js.mar"),Lang.get("js.apr"),Lang.get("js.may"),Lang.get("js.jun"),Lang.get("js.jul"),Lang.get("js.aug"),Lang.get("js.sep"),Lang.get("js.oct"),Lang.get("js.nov"),Lang.get("js.dec")],daysOfWeek:[Lang.get("js.sun"),Lang.get("js.mon"),Lang.get("js.tue"),Lang.get("js.wed"),Lang.get("js.thu"),Lang.get("js.fri"),Lang.get("js.sat")]},ranges:(l={},e(l,Lang.get("js.today"),[moment(),moment()]),e(l,Lang.get("js.this_week"),[moment().startOf("week"),moment().endOf("week")]),e(l,Lang.get("js.last_week"),[moment().startOf("week").subtract(7,"days"),moment().startOf("week").subtract(1,"days")]),e(l,Lang.get("js.this_month"),[t,n]),e(l,Lang.get("js.last_month"),[d.clone().startOf("month"),d.clone().endOf("month")]),l)},r),"admin.dashboard"==currentRouteName&&($.ajax({type:"GET",url:route("payment-overview"),cache:!1}).done(o),i(t.format("YYYY-MM-D"),n.format("YYYY-MM-D")),$.ajax({type:"GET",url:route("invoices-overview"),cache:!1}).done(s));a.on("apply.daterangepicker",(function(e,a){!0,t=a.startDate.format("YYYY-MM-D"),n=a.endDate.format("YYYY-MM-D"),i(t,n)}))}()}))})(),listenClick(".user-delete-btn",(function(e){var t=$(e.currentTarget).data("id");deleteItem(route("users.destroy",t),Lang.get("js.admin"))})),listenClick(".addCategory",(function(e){e.preventDefault(),$("#addCategoryModal").appendTo("body").modal("show")})),listenClick(".category-edit-btn",(function(e){var t,n=$(e.currentTarget).attr("data-id");t=n,$.ajax({url:route("category.edit",t),type:"GET",beforeSend:function(){startLoader()},success:function(e){e.success&&($("#editCategoryName").val(e.data.name),$("#editModalCategoryId").val(e.data.id),$("#editCategoryModal").appendTo("body").modal("show"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader()}})})),listenSubmit("#addNewCategoryForm",(function(e){e.preventDefault(),$.ajax({url:route("category.store"),type:"POST",data:$(this).serialize(),beforeSend:function(){startLoader()},success:function(e){e.success&&($("#addCategoryModal").modal("hide"),displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader()}})})),listenHiddenBsModal("#addCategoryModal",(function(){resetModalForm("#addNewCategoryForm","#validationErrorsBox")})),listenSubmit("#editCategoryForm",(function(e){e.preventDefault();var t=$("#editModalCategoryId").val();$.ajax({url:route("category.update",{category:t}),type:"put",data:$(this).serialize(),beforeSend:function(){startLoader()},success:function(e){e.success&&(displaySuccessMessage(e.message),$("#editCategoryModal").modal("hide"),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader()}})})),listenClick(".category-delete-btn",(function(e){var t=$(e.currentTarget).attr("data-id");deleteItem(route("category.destroy",t),Lang.get("js.category"))})),document.addEventListener("turbo:load",(function(){if($("#phoneNumber").length){var e=document.querySelector("#phoneNumber"),t=document.querySelector("#error-msg"),n=document.querySelector("#valid-msg"),a=[Lang.get("js.invalid_number"),Lang.get("js.invalid_country_number"),Lang.get("js.too_short"),Lang.get("js.too_long"),Lang.get("js.invalid_number")],r=window.intlTelInput(e,{separateDialCode:!0,geoIpLookup:function(e,t){$.get("https://ipinfo.io",(function(){}),"jsonp").always((function(t){var n=t&&t.country?t.country:"";e(n)}))},utilsScript:"../../public/assets/js/inttel/js/utils.min.js"}),i=function(){e.classList.remove("error"),t.innerHTML="",t.classList.add("hide"),n.classList.add("hide")};if(e.addEventListener("blur",(function(){if(i(),e.value.trim())if(r.isValidNumber())n.classList.remove("hide");else{e.classList.add("error");var o=r.getValidationError();t.innerHTML=a[o],t.classList.remove("hide")}})),e.addEventListener("change",i),e.addEventListener("keyup",i),"undefined"!=typeof phoneNo&&""!==phoneNo&&setTimeout((function(){$("#phoneNumber").trigger("change")}),500),$("#phoneNumber").on("blur keyup change countrychange",(function(){"undefined"!=typeof phoneNo&&""!==phoneNo&&(r.setNumber("+"+phoneNo),phoneNo="");var e=r.selectedCountryData.dialCode;$("#prefix_code").val(e)})),$("#isEdit").val()){var o=r.selectedCountryData.dialCode;$("#prefix_code").val(o)}var s=$("#phoneNumber").val().replace(/\s/g,"");$("#phoneNumber").val(s)}})),listen("submit","#userCreateForm",(function(e){if(""!==$("#error-msg").text())return $("#phoneNumber").focus(),!1})),listen("submit","#userEditForm",(function(e){if(""!==$("#error-msg").text())return $("#phoneNumber").focus(),!1})),listen("submit","#createSetting",(function(e){if(""!==$("#error-msg").text())return $("#phoneNumber").focus(),!1})),(()=>{listenClick(".client-delete-btn",(function(event){var recordId=$(event.currentTarget).attr("data-id"),callFunction=arguments.length>3&&void 0!==arguments3?arguments3:null;header=Lang.get("js.client"),swal({title:Lang.get("js.delete")+" !",text:Lang.get("js.are_you_sure_delete")+' "'+header+'" ?',buttons:[Lang.get("js.no_cancel"),Lang.get("js.yes_delete")],icon:sweetAlertIcon}).then((function(willDelete){willDelete&&$.ajax({url:route("clients.destroy",recordId),type:"DELETE",dataType:"json",data:{clientWithInvoices:!0},success:function success(obj){obj.success&&(Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable")),swal({icon:"success",title:Lang.get("js.deleted"),text:header+" "+Lang.get("js.has_been_deleted"),timer:2e3,button:Lang.get("js.ok")}),callFunction&&eval(callFunction)},error:function error(data){swal({title:Lang.get("js.delete")+" !",text:Lang.get("js.are_sure_want_to_delete_this_client_related_all_invoices"),buttons:[Lang.get("js.no_cancel"),Lang.get("js.yes_delete")],icon:sweetAlertIcon}).then((function(willDelete){willDelete&&$.ajax({url:route("clients.destroy",recordId),type:"DELETE",dataType:"json",success:function success(obj){obj.success&&(Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable")),swal({icon:"success",title:Lang.get("js.deleted"),text:header+" "+Lang.get("js.has_been_deleted"),timer:2e3,button:Lang.get("js.ok")}),callFunction&&eval(callFunction)},error:function(e){}})}))}})}))}))})(),document.addEventListener("turbo:load",(function(){(function(){if(!$("#countryID").length)return!1;$("#countryID").hasClass("select2-hidden-accessible")&&$(".select2-container").remove(),$("#stateID").hasClass("select2-hidden-accessible")&&$(".select2-container").remove(),$("#countryID, #stateID").select2({width:"100%"})})(),$("#countryId").val()&&$("#countryId").val($("#countryId").val()).trigger("change")})),listenChange("#countryId",(function(e){e.preventDefault(),$.ajax({url:route("states-list"),type:"get",dataType:"json",data:{countryId:$(this).val()},success:function(e){$("#stateId").empty(),$("#cityId").empty(),$("#stateId").empty(),0!=e.data.length?$.each(e.data,(function(e,t){$("#stateId").append($("<option></option>").attr("value",e).text(t))})):$("#stateId").append($('<option value=""></option>').text("Select State")),$("#clientStateId").val()?($("#stateId").val($("#clientStateId").val()).trigger("change"),$("#clientStateId").val("")):$("#stateId").trigger("change")}})})),listenChange("#stateId",(function(e){e.preventDefault(),$.ajax({url:route("cities-list"),type:"get",dataType:"json",data:{stateId:$(this).val(),country:$("#countryId").val()},success:function(e){$("#cityId").empty(),0!=e.data.length?$.each(e.data,(function(e,t){$("#cityId").append($("<option></option>").attr("value",e).text(t))})):$("#cityId").append($('<option value=""></option>').text("Select City")),$("#clientCityId").val()?($("#cityId").val($("#clientCityId").val()).trigger("change"),$("#clientCityId").val("")):$("#cityId").trigger("change")}})})),listenClick(".remove-image",(function(){defaultAvatarImagePreview("#previewImage",1)})),listenSubmit("#clientForm, #editClientForm",(function(){if(""!==$("#error-msg").text())return $("#phoneNumber").focus(),!1})),listenClick(".product-delete-btn",(function(e){var t=$(e.currentTarget).data("id");deleteItem(route("products.destroy",t),Lang.get("js.product"))})),document.addEventListener("turbo:load",(function(){!function(){if(!$("#categoryId").length)return!1;$("#categoryId").hasClass("select2-hidden-accessible")&&$(".select2-container").remove(),$("#categoryId").select2({width:"100%"})}()})),listenClick(".remove-image",(function(){defaultAvatarImagePreview("#previewImage",1)})),listenKeyup("#code",(function(){return $("#code").val(this.value.toUpperCase())})),listenClick("#autoCode",(function(){var e=Math.random().toString(36).toUpperCase().substr(2,6);$("#code").val(e)})),(()=>{function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var t=null;function n(n){var a;if(!$(n).length)return!1;t=$(n),startDate=moment().subtract(100,"years"),endDate=moment(),i(startDate,endDate);var r=moment().startOf("month").subtract(1,"days");function i(e,n){t.val(e.format("DD/MM/YYYY")+" - "+n.format("DD/MM/YYYY"))}t.daterangepicker({startDate,endDate,opens:"left",showDropdowns:!0,autoUpdateInput:!1,locale:{customRangeLabel:Lang.get("js.custom"),applyLabel:Lang.get("js.apply"),cancelLabel:Lang.get("js.cancel"),fromLabel:Lang.get("js.from"),toLabel:Lang.get("js.to"),monthNames:[Lang.get("js.jan"),Lang.get("js.feb"),Lang.get("js.mar"),Lang.get("js.apr"),Lang.get("js.may"),Lang.get("js.jun"),Lang.get("js.jul"),Lang.get("js.aug"),Lang.get("js.sep"),Lang.get("js.oct"),Lang.get("js.nov"),Lang.get("js.dec")],daysOfWeek:[Lang.get("js.sun"),Lang.get("js.mon"),Lang.get("js.tue"),Lang.get("js.wed"),Lang.get("js.thu"),Lang.get("js.fri"),Lang.get("js.sat")]},ranges:(a={},e(a,Lang.get("js.all"),[moment().subtract(100,"years"),moment()]),e(a,Lang.get("js.today"),[moment(),moment()]),e(a,Lang.get("js.this_week"),[moment().startOf("week"),moment().endOf("week")]),e(a,Lang.get("js.last_week"),[moment().startOf("week").subtract(7,"days"),moment().startOf("week").subtract(1,"days")]),e(a,Lang.get("js.last_30_days"),[moment().subtract(29,"days"),moment()]),e(a,Lang.get("js.this_month"),[moment().startOf("month"),moment().endOf("month")]),e(a,Lang.get("js.last_month"),[r.clone().startOf("month"),r.clone().endOf("month")]),a)},i),t.on("apply.daterangepicker",(function(e,t){startDate=t.startDate.format("YYYY-MM-D"),endDate=t.endDate.format("YYYY-MM-D"),Livewire.dispatch("changeDateFilter",[startDate,endDate])}))}Livewire.hook("element.init",(function(e){var t=e.component;"invoice-table"==t.name&&0==t.canonical.dateRange.length&&(n("#invoiceDateRangePicker"),function(){if(!$("#invoiceStatus").length)return!1;if($("#invoiceStatus").select2(),!$("#recurringStatus").length)return!1;$("#recurringStatus").select2()}())})),listenClick(".invoice-delete-btn",(function(e){e.preventDefault();var t=$(e.currentTarget).attr("data-id");deleteItem(route("invoices.destroy",t),Lang.get("js.invoice"))})),listenClick("#resetInvoiceFilter",(function(){$("#invoiceStatus").val(7).trigger("change"),$("#recurringStatus").val("").trigger("change"),hideDropdownManually($("#invoiceFilterBtn"),$(".dropdown-menu"));var e=moment().subtract(100,"years"),t=moment();Livewire.dispatch("changeDateFilter",[e,t]),n("#invoiceDateRangePicker")})),listenClick(".reminder-btn",(function(e){e.preventDefault();var t=$(this).data("id");$.ajax({type:"POST",url:route("invoice.payment-reminder",t),beforeSend:function(){screenLock(),startLoader()},success:function(e){e.success&&displaySuccessMessage(e.message)},error:function(e){displayErrorMessage(e.message)},complete:function(){stopLoader(),screenUnLock()}})})),listenClick(".update-recurring",(function(e){e.preventDefault();var t=$(this).data("id");$.ajax({type:"POST",url:route("invoices.update-recurring",t),beforeSend:function(){screenLock(),startLoader()},success:function(e){e.success&&(displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"))},error:function(e){displayErrorMessage(e.message)},complete:function(){stopLoader(),screenUnLock()}})})),listenChange("#invoiceStatus",(function(){Livewire.dispatch("changeInvoiceStatusFilter",{status:$(this).val()}),Livewire.dispatch("changeRecurringStatusFilter",{recurringStatus:$("#recurringStatus").val()})})),listenChange("#recurringStatus",(function(){Livewire.dispatch("changeRecurringStatusFilter",{recurringStatus:$(this).val()}),Livewire.dispatch("changeInvoiceStatusFilter",{status:$("#invoiceStatus").val()})})),listenHiddenBsModal("#sendWhatsAppModal",(function(){$(".whatsapp-phone-number").val(""),$("#valid-msg").addClass("hide"),$("#error-msg").addClass("hide")}))})(),(()=>{var e=null,t="";function n(e){e?$(".recurring-cycle-content").show():$(".recurring-cycle-content").hide()}document.addEventListener("turbo:load",(function(){$('input:text:not([readonly="readonly"])').first().blur(),function(){if(!select2NotExists(".product"))return!1;removeSelect2Container([".product"]),$(".product").select2({tags:!0}),$(".tax").select2({placeholder:Lang.get("js.select_tax")}),$(".invoice-taxes").select2({placeholder:Lang.get("js.select_tax")}),$(".payment-qr-code").select2(),$("#client_id").focus()}(),function(){if(!$("#client_id").length&&!$("#discountType").length)return;$("#client_id,#status,#templateId").select2(),$(".discount-type").select2({width:"200px"})}(),void n($("#recurringStatusToggle").is(":checked")),currentDateFormat=$('meta[name="current-date-format"]').attr("content"),t=convertToMomentFormat(currentDateFormat),e=$("#due_date").flatpickr({defaultDate:moment().add(1,"days").toDate(),dateFormat:currentDateFormat,locale:getUserLanguages}),a=$("#editDueDate").flatpickr({dateFormat:currentDateFormat,defaultDate:moment($("#editDueDate").val()).format(t),locale:getUserLanguages}),$("#invoice_date").flatpickr({defaultDate:new Date,dateFormat:currentDateFormat,locale:getUserLanguages,onChange:function(n,a,r){var i=moment($("#invoice_date").val(),t).add(1,"days").format(t);void 0!==e&&e.set("minDate",i)},onReady:function(){var n=moment(new Date).add(1,"days").format(t);void 0!==e&&e.set("minDate",n)}}),void $("#editInvoiceDate").flatpickr({dateFormat:currentDateFormat,defaultDate:moment($("#editInvoiceDate").val()).format(t),locale:getUserLanguages,onChange:function(){var e=moment($("#editInvoiceDate").val(),t).add(1,"days").format(t);void 0!==a&&a.set("minDate",e)},onReady:function(){var e=moment($("#editInvoiceDate").val(),t).add(1,"days").format(t);void 0!==a&&a.set("minDate",e)}}),1==$("#invoiceNote").val()||1==$("#invoiceTerm").val()?($("#addNote").hide(),$("#removeNote").show(),$("#noteAdd").show(),$("#termRemove").show()):($("#removeNote").hide(),$("#noteAdd").hide(),$("#termRemove").hide());var e,a;1==$("#invoiceRecurring").val()?$(".recurring").show():$(".recurring").hide();$("#formData_recurring-1").prop("checked")&&$(".recurring").hide();0!=$("#discountType").val()?$("#discount").removeAttr("disabled"):$("#discount").attr("disabled","disabled");i()})),listenClick("#recurringStatusToggle",(function(){n($(this).is(":checked"))})),listenChange(".invoice-currency-type",(function(){var e=$(this).val();e.length>0&&$.ajax({url:route("invoices.get-currency",e),type:"get",dataType:"json",success:function(e){e.success&&$(".invoice-selected-currency").text(e.data)},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),listenKeyup("#invoiceId",(function(){return $("#invoiceId").val(this.value.toUpperCase())})),listenClick("#addNote",(function(){$("#addNote").hide(),$("#removeNote").show(),$("#noteAdd").show(),$("#termRemove").show()})),listenClick("#removeNote",(function(){$("#addNote").show(),$("#removeNote").hide(),$("#noteAdd").hide(),$("#termRemove").hide(),$("#note").val(""),$("#term").val("")})),listenClick("#formData_recurring-0",(function(){$("#formData_recurring-0").prop("checked")?$(".recurring").show():$(".recurring").hide()})),listenClick("#formData_recurring-1",(function(){$("#formData_recurring-1").prop("checked")&&$(".recurring").hide()})),listenChange("#discountType",(function(){if(e=$(this).val(),$("#discount").val(0),1==e||2==e){if($("#discount").removeAttr("disabled"),2==e){var t=$("#discount").val();$("#discount").val(t.substring(0,2))}}else $("#discount").attr("disabled","disabled"),$("#discount").val(0),$("#discountAmount").text("0");i()})),window.isNumberKey=function(e,t){var n=e.which?e.which:event.keyCode;return!((46!==n||-1!==$(t).val().indexOf("."))&&(n<48||n>57))},listenClick("#addItem",(function(){var e={products:JSON.parse($("#products").val()),taxes:JSON.parse($("#taxes").val())},t=prepareTemplateRender("#invoiceItemTemplate",e);$(".invoice-item-container").append(t),$(".taxId").select2({placeholder:"Select TAX",multiple:!0}),$(".productId").select2({placeholder:Lang.get("js.select_product_or_enter_free_text"),tags:!0}),a()}));var a=function(){var e=1;if($(".invoice-item-container>tr").each((function(){$(this).find(".item-number").text(e),e++})),e-1==0){var t={products:JSON.parse($("#products").val()),taxes:JSON.parse($("#taxes").val())},n=prepareTemplateRender("#invoiceItemTemplate",t);$(".invoice-item-container").append(n),$(".productId").select2(),$(".taxId").select2({placeholder:"Select TAX",multiple:!0})}i()};listenClick(".delete-invoice-item",(function(){$(this).parents("tr").remove(),a(),i()})),listenChange(".product",(function(){var e=$(this).val();isEmpty(e)&&(e=0);var t=$(this);$.ajax({url:route("invoices.get-product",e),type:"get",dataType:"json",success:function(n){if(n.success){var a="";$.each(n.data,(function(t,n){t===e&&(a=n)})),t.parent().parent().find("td .price").val(a),t.parent().parent().find("td .qty").val(1),$(".price").trigger("keyup")}},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),listenChange(".tax",(function(){i()})),listenKeyup(".qty",(function(){var e=$(this).val(),t=$(this).parent().siblings().find(".price").val();t=parseFloat(removeCommas(t));var n=r(e,t);$(this).parent().siblings(".item-total").text(addCommas(n.toFixed(2).toString())),i()})),listenKeyup(".price",(function(){var e=$(this).val();e=parseFloat(removeCommas(e));var t=$(this).parent().siblings().find(".qty").val(),n=r(t,e);$(this).parent().siblings(".item-total").text(addCommas(n.toFixed(2).toString())),i()}));var r=function(e,t){if(e>0&&t>0){var n=e*t;return isNaN(n)?0:n}return 0},i=function(){var t=[],n=0,a=0;$(".invoice-item-container>tr").each((function(){var e=$(this).find(".item-total").text();e=removeCommas(e),e=isEmpty($.trim(e))?0:parseFloat(e),n+=e,$(this).find(".tax").each((function(n,r){for(var i=r.selectedOptions,o=0,s=0;s<i.length;s++){var l=i[s].value;l>0&&(o+=parseFloat(l))}a+=parseFloat(o*e/100),t.push(a)}))}));var r=n;$("#total").text(number_format(r)),$("#finalAmount").text(number_format(r)),$("#total_amount").val(r.toFixed(2));var i=parseFloat(r)+parseFloat(a);$("#totalTax").empty(),$("#totalTax").text(number_format(a));var o=0;if($("option:selected",".invoice-taxes").each((function(e,t){o+=parseFloat(t.getAttribute("data-tax"))})),o>0){var s=i*parseFloat(o)/100,l=parseFloat(a)+parseFloat(s);$("#totalTax").text(number_format(l)),i+=parseFloat(s)}var d=$("#discount").val();e=$("#discountType").val(),(isEmpty(d)||isEmpty(r))&&(d=0);var c=0;1==e?i-=c=d:2==e&&(i-=c=i*d/100),$("#discountAmount").text(number_format(c)),$("#finalAmount").text(number_format(i)),$("#finalTotalAmt").val(i.toFixed(2))};listen("keyup","#discount",(function(){var t=$(this).val();if(2==e&&t>100)return displayErrorMessage("On Percentage you can only give maximum 100% discount"),$(this).val(t.slice(0,-1)),!1;i()})),listenChange(".invoice-taxes",(function(){i()})),listenClick("#saveAsDraft,#saveAndSend",(function(e){e.preventDefault();var t=[],n=0,a=[],r=0;$(".tax-tr").each((function(){var e=$(this).find(".tax option:selected").map((function(){return $(this).data("id")})).get();t[n++]=""!=e?e:0;var i=$(this).find(".tax option:selected").map((function(){return $(this).val()})).get();a[r++]=""!=i?i:0}));var i=$(this).data("status"),o=document.getElementById("invoiceForm"),s=new FormData(o);s.append("status",i),s.append("tax_id",JSON.stringify(t)),s.append("tax",JSON.stringify(a)),1==i?swal({title:Lang.get("js.send_invoice")+" !",text:Lang.get("js.are_you_sure_send"),icon:"warning",buttons:{confirm:Lang.get("js.yes_send"),cancel:Lang.get("js.no_cancel")}}).then((function(e){e&&(screenLock(),$.ajax({url:route("invoices.store"),type:"POST",dataType:"json",data:s,processData:!1,contentType:!1,beforeSend:function(){startLoader()},success:function(e){displaySuccessMessage(e.message),Turbo.visit(route("invoices.index"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader(),screenUnLock()}}))})):(screenLock(),$.ajax({url:route("invoices.store"),type:"POST",dataType:"json",data:s,processData:!1,contentType:!1,beforeSend:function(){startLoader()},success:function(e){displaySuccessMessage(e.message),Turbo.visit(route("invoices.index"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader(),screenUnLock()}}))})),listenClick("#editSaveAndSend,#editSave",(function(e){e.preventDefault();var t=$(this).data("status"),n=[],a=0,r=[],i=0;$(".tax-tr").each((function(){var e=$(this).find(".tax option:selected").map((function(){return $(this).data("id")})).get();n[a++]=""!=e?e:0;var t=$(this).find(".tax option:selected").map((function(){return $(this).val()})).get();r[i++]=""!=t?t:0}));var o=$("#invoiceEditForm").serialize()+"&invoiceStatus="+t+"&tax_id="+JSON.stringify(n)+"&tax="+JSON.stringify(r);1==t?swal({title:Lang.get("js.send_invoice")+" !",text:Lang.get("js.are_you_sure_send"),icon:"warning",buttons:[Lang.get("js.no_cancel"),Lang.get("js.yes_send")]}).then((function(e){e&&(screenLock(),$.ajax({url:$("#invoiceUpdateUrl").val(),type:"PUT",dataType:"json",data:o,beforeSend:function(){startLoader()},success:function(e){displaySuccessMessage(e.message),Turbo.visit(route("invoices.index"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader(),screenUnLock()}}))})):0==t&&(screenLock(),$.ajax({url:$("#invoiceUpdateUrl").val(),type:"PUT",dataType:"json",data:o,beforeSend:function(){startLoader()},success:function(e){displaySuccessMessage(e.message),Turbo.visit(route("invoices.index"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader(),screenUnLock()}}))}))})(),(()=>{function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var t=null;function n(n){var a;if(!$(n).length)return!1;t=$(n),startDate=moment().subtract(100,"years"),endDate=moment(),i(startDate,endDate);var r=moment().startOf("month").subtract(1,"days");function i(e,n){t.val(e.format("DD/MM/YYYY")+" - "+n.format("DD/MM/YYYY"))}t.daterangepicker({startDate,endDate,opens:"left",showDropdowns:!0,autoUpdateInput:!1,locale:{customRangeLabel:Lang.get("js.custom"),applyLabel:Lang.get("js.apply"),cancelLabel:Lang.get("js.cancel"),fromLabel:Lang.get("js.from"),toLabel:Lang.get("js.to"),monthNames:[Lang.get("js.jan"),Lang.get("js.feb"),Lang.get("js.mar"),Lang.get("js.apr"),Lang.get("js.may"),Lang.get("js.jun"),Lang.get("js.jul"),Lang.get("js.aug"),Lang.get("js.sep"),Lang.get("js.oct"),Lang.get("js.nov"),Lang.get("js.dec")],daysOfWeek:[Lang.get("js.sun"),Lang.get("js.mon"),Lang.get("js.tue"),Lang.get("js.wed"),Lang.get("js.thu"),Lang.get("js.fri"),Lang.get("js.sat")]},ranges:(a={},e(a,Lang.get("js.all"),[moment().subtract(100,"years"),moment()]),e(a,Lang.get("js.today"),[moment(),moment()]),e(a,Lang.get("js.this_week"),[moment().startOf("week"),moment().endOf("week")]),e(a,Lang.get("js.last_week"),[moment().startOf("week").subtract(7,"days"),moment().startOf("week").subtract(1,"days")]),e(a,Lang.get("js.last_30_days"),[moment().subtract(29,"days"),moment()]),e(a,Lang.get("js.this_month"),[moment().startOf("month"),moment().endOf("month")]),e(a,Lang.get("js.last_month"),[r.clone().startOf("month"),r.clone().endOf("month")]),a)},i),t.on("apply.daterangepicker",(function(e,t){startDate=t.startDate.format("YYYY-MM-D"),endDate=t.endDate.format("YYYY-MM-D"),Livewire.dispatch("changeDateRangeFilter",[startDate,endDate])}))}Livewire.hook("element.init",(function(e){var t=e.component;"quote-table"!=t.name&&"client-quote-table"!=t.name||0!=t.canonical.dateRange.length||(!function(){if(!$("#quoteStatus").length)return!1;$("#quoteStatus").select2()}(),n("#quoteDateRangePicker"))})),listenClick(".quote-delete-btn",(function(e){e.preventDefault();var t=$(this).attr("data-id");deleteItem(route("quotes.destroy",t),Lang.get("js.quote"))})),listenClick("#resetQuoteStatusFilter",(function(){$("#quoteStatus").val(2).trigger("change"),hideDropdownManually($("#quoteFilterBtn"),$(".dropdown-menu"));var e=moment().subtract(100,"years"),t=moment();Livewire.dispatch("changeDateRangeFilter",[e,t]),n("#quoteDateRangePicker")})),listenClick(".convert-to-invoice",(function(e){e.preventDefault();var t=$(this).data("id");$.ajax({url:route("quotes.convert-to-invoice"),type:"GET",data:{quoteId:t},success:function(e){e.success&&(displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"))},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),listenChange("#quoteStatus",(function(){Livewire.dispatch("changeQuoteStatusFilter",{status:$(this).val()})}))})(),(()=>{var e=null,t="";document.addEventListener("turbo:load",(function(){$('input:text:not([readonly="readonly"])').first().blur(),function(){if(!select2NotExists(".product-quote"))return!1;removeSelect2Container([".product-quote"]),$(".product-quote").select2({tags:!0}),$(".tax").select2({placeholder:"Select TAX"}),$("#client_id").focus();var e=moment(new Date).add(1,"days").format(convertToMomentFormat(currentDateFormat)),n=$("#quoteDueDate").flatpickr({defaultDate:e,dateFormat:currentDateFormat,locale:getUserLanguages}),a=$("#editQuoteDueDate").flatpickr({dateFormat:currentDateFormat,defaultDate:moment($("#editQuoteDueDate").val()).format(convertToMomentFormat(currentDateFormat)),locale:getUserLanguages});$("#quote_date").flatpickr({defaultDate:moment(new Date).format(convertToMomentFormat(currentDateFormat)),dateFormat:currentDateFormat,locale:getUserLanguages,onChange:function(){var e;e="d.m.Y"==currentDateFormat||"d/m/Y"==currentDateFormat||"d-m-Y"==currentDateFormat?moment($("#quote_date").val(),t).add(1,"days").format(t):moment($("#quote_date").val()).add(1,"days").format(convertToMomentFormat(currentDateFormat)),void 0!==n&&n.set("minDate",e)},onReady:function(){void 0!==n&&n.set("minDate",e)}}),$("#editQuoteDate").flatpickr({dateFormat:currentDateFormat,defaultDate:moment($("#editQuoteDateAdmin").val()).format(convertToMomentFormat(currentDateFormat)),locale:getUserLanguages,onChange:function(){var e;e="d.m.Y"==currentDateFormat||"d/m/Y"==currentDateFormat||"d-m-Y"==currentDateFormat?moment($("#editQuoteDate").val(),t).add(1,"days").format(t):moment($("#editQuoteDate").val()).add(1,"days").format(convertToMomentFormat(currentDateFormat)),void 0!==a&&a.set("minDate",e)},onReady:function(){var e;e="d.m.Y"==currentDateFormat||"d/m/Y"==currentDateFormat||"d-m-Y"==currentDateFormat?moment($("#editQuoteDateAdmin").val(),t).add(1,"days").format(convertToMomentFormat(currentDateFormat)):moment($("#editQuoteDateAdmin").val()).add(1,"days").format(convertToMomentFormat(currentDateFormat)),void 0!==a&&a.set("minDate",e)}})}(),function(){if(!$("#client_id").length&&!$("#discountType").length)return;$("#client_id,#discountType,#status,#templateId").select2()}(),t=convertToMomentFormat(currentDateFormat),1==$("#quoteNoteData").val()||1==$("#quoteTermData").val()?($("#quoteAddNote").hide(),$("#quoteRemoveNote").show(),$("#quoteNoteAdd").show(),$("#quoteTermRemove").show()):($("#quoteRemoveNote").hide(),$("#quoteNoteAdd").hide(),$("#quoteTermRemove").hide());1==$("#quoteRecurring").val()?$(".recurring").show():$(".recurring").hide();$("#formData_recurring-1").prop("checked")&&$(".recurring").hide();0!=$("#discountType").val()?$("#discount").removeAttr("disabled"):$("#discount").attr("disabled","disabled");r()})),listenKeyup("#quoteId",(function(){return $("#quoteId").val(this.value.toUpperCase())})),listenClick("#quoteAddNote",(function(){$("#quoteAddNote").hide(),$("#quoteRemoveNote").show(),$("#quoteNoteAdd").show(),$("#quoteTermRemove").show()})),listenClick("#quoteRemoveNote",(function(){$("#quoteAddNote").show(),$("#quoteRemoveNote").hide(),$("#quoteNoteAdd").hide(),$("#quoteTermRemove").hide(),$("#quoteNote").val(""),$("#quoteTerm").val(""),$("#quoteAddNote").show()})),listenClick("#formData_recurring-0",(function(){$("#formData_recurring-0").prop("checked")?$(".recurring").show():$(".recurring").hide()})),listenClick("#formData_recurring-1",(function(){$("#formData_recurring-1").prop("checked")&&$(".recurring").hide()})),listenChange("#discountType",(function(){if(e=$(this).val(),$("#discount").val(0),1==e||2==e){if($("#discount").removeAttr("disabled"),2==e){var t=$("#discount").val();$("#discount").val(t.substring(0,2))}}else $("#discount").attr("disabled","disabled"),$("#discount").val(0),$("#quoteDiscountAmount").text("0");i()})),window.isNumberKey=function(e,t){var n=e.which?e.which:event.keyCode;return!((46!==n||-1!==$(t).val().indexOf("."))&&(n<48||n>57))},listenClick("#addQuoteItem",(function(){var e={products:JSON.parse($("#products").val())},t=prepareTemplateRender("#quotesItemTemplate",e);$(".quote-item-container").append(t),$(".productId").select2({placeholder:Lang.get("js.select_product_or_enter_free_text"),tags:!0}),n()}));var n=function(){var e=1;if($(".quote-item-container>tr").each((function(){$(this).find(".item-number").text(e),e++})),e-1==0){var t={products:JSON.parse($("#products").val())},n=prepareTemplateRender("#quotesItemTemplate",t);$(".quote-item-container").append(n),$(".productId").select2()}};listenClick(".delete-quote-item",(function(){$(this).parents("tr").remove(),n(),r()})),listenChange(".product-quote",(function(){var e=$(this).val();isEmpty(e)&&(e=0);var t=$(this);$.ajax({url:route("quotes.get-product",e),type:"get",dataType:"json",success:function(n){if(n.success){var a="";$.each(n.data,(function(t,n){t===e&&(a=n)})),t.parent().parent().find("td .price-quote").val(a),t.parent().parent().find("td .qty-quote").val(1),$(".price-quote").trigger("keyup")}},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),listenKeyup(".qty-quote",(function(){var e=parseInt($(this).val()),t=$(this).parent().siblings().find(".price-quote").val();t=parseFloat(removeCommas(t));var n=a(e,t);$(this).parent().siblings(".quote-item-total").text(addCommas(n.toFixed(2).toString())),r()})),listenKeyup(".price-quote",(function(){var e=$(this).val();e=parseFloat(removeCommas(e));var t=parseInt($(this).parent().siblings().find(".qty-quote").val()),n=a(t,e);$(this).parent().siblings(".quote-item-total").text(addCommas(n.toFixed(2).toString())),r()}));var a=function(e,t){return e>0&&t>0?e*t:0},r=function(){var e=0;$(".quote-item-container>tr").each((function(){var t=$(this).find(".quote-item-total").text();t=removeCommas(t),t=isEmpty($.trim(t))?0:parseFloat(t),e+=t})),e=parseFloat(e),isNaN(e)&&(e=0),$("#quoteTotal").text(addCommas(e.toFixed(2))),$("#quoteTotalAmount").val(e),i()},i=function(){var t=$("#discount").val();e=$("#discountType").val();var n=[],a=0;$(".quote-item-total").each((function(){n[a++]=$.trim(removeCommas($(this).text()))})),$.sum=function(e){var t=0;return $.each(e,(function(e,n){t+=+n})),t};var r=$.sum(n);$("#quoteTotal").text(number_format(r)),(isEmpty(t)||isEmpty(r))&&(t=0);var i=0,o=r-i;1==e?o=r-(i=t):2==e&&(o=r-(i=r*t/100)),$("#quoteFinalAmount").text(number_format(o)),$("#quoteTotalAmount").val(o.toFixed(2)),$("#quoteDiscountAmount").text(number_format(i))};listen("keyup","#discount",(function(){var t=$(this).val();if(2==e&&t>100)return displayErrorMessage("On Percentage you can only give maximum 100% discount"),$(this).val(t.slice(0,-1)),!1;i()})),listenClick("#saveAsDraftQuote",(function(e){e.preventDefault();var t=$(this).data("status"),n=document.getElementById("quoteForm"),a=new FormData(n);a.append("status",t),screenLock(),$.ajax({url:route("quotes.store"),type:"POST",dataType:"json",data:a,processData:!1,contentType:!1,beforeSend:function(){startLoader()},success:function(e){displaySuccessMessage(e.message),Turbo.visit(route("quotes.index"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader(),screenUnLock()}})})),listenClick("#editSaveQuote",(function(e){e.preventDefault();var t=$(this).data("status"),n=$("#quoteEditForm").serialize()+""eStatus="+t;screenLock(),$.ajax({url:$("#quoteUpdateUrl").val(),type:"PUT",dataType:"json",data:n,beforeSend:function(){startLoader()},success:function(e){displaySuccessMessage(e.message),Turbo.visit(route("quotes.index"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader(),screenUnLock()}})}))})(),(()=>{function e(e,t){var n=$(e).val().split(".").pop().toLowerCase();return-1==$.inArray(n,["jpg","png","jpeg"])?($(e).val(""),$(t).removeClass("d-none"),$(t).html("The image must be a file of type: jpg, jpeg, png.").show(),!1):($(t).hide(),!0)}function t(e,t){var n=!0;if(e.files&&e.files[0]){var a=new FileReader;a.onload=function(e){var a=new Image;a.src=e.target.result,a.onload=function(){$(t).attr("src",e.target.result),n=!0}},n&&(a.readAsDataURL(e.files[0]),$(t).show())}}document.addEventListener("turbo:load",(function(){(function(){if(!$("#currencyType").length)return!1;["#currencyType","#timeZone","#dateFormat"].forEach((function(e){$(e).hasClass("select2-hidden-accessible")&&$(".select2-container").remove()})),$("#currencyType, #timeZone, #dateFormat").select2({width:"100%"})})(),function(){if(!$("#countryPhone").length)return!1;var e=document.querySelector("#countryPhone"),t=document.querySelector("#error-msg"),n=[Lang.get("js.invalid_number"),Lang.get("js.invalid_country_number"),Lang.get("js.too_short"),Lang.get("js.too_long"),Lang.get("js.invalid_number")],a=window.intlTelInput(e,{initialCountry:"IN",separateDialCode:!0,geoIpLookup:function(e,t){$.get("https://ipinfo.io",(function(){}),"jsonp").always((function(t){var n=t&&t.country?t.country:"";e(n)}))},utilsScript:"../../public/assets/js/inttel/js/utils.min.js"}),r=function(){e.classList.remove("error"),t.innerHTML=""};e.addEventListener("blur",(function(){if(r(),e.value.trim())if(a.isValidNumber())validMsg.classList.remove("d-none");else{e.classList.add("error");var i=a.getValidationError();t.innerHTML=n[i],t.classList.remove("d-none")}})),e.addEventListener("change",r),e.addEventListener("keyup",r),$(document).on("blur keyup change countrychange","#countryPhone",(function(){var e=a.selectedCountryData.dialCode;$("#countryCode").val(e)}));var i=$("#defaultCountryCode").val();a.setNumber(i),$("#countryCode").val(i).trigger("change")}()})),listenChange("input[type=radio][name=decimal_separator]",(function(){","===this.value?$('input[type=radio][name=thousand_separator][value="."]').prop("checked",!0):$('input[type=radio][name=thousand_separator][value=","]').prop("checked",!0)})),listenChange("input[type=radio][name=thousand_separator]",(function(){","===this.value?$('input[type=radio][name=decimal_separator][value="."]').prop("checked",!0):$('input[type=radio][name=decimal_separator][value=","]').prop("checked",!0)})),listenChange("#appLogo",(function(){$("#validationErrorsBox").addClass("d-none"),e($(this),"#validationErrorsBox")&&t(this,"#previewImage")})),listenChange("#companyLogo",(function(){$("#validationErrorsBox").addClass("d-none"),e($(this),"#validationErrorsBox")&&t(this,"#previewImage1")})),listenSubmit("#createSetting",(function(e){var t=$("#companyAddress").val(),n=$("#company_name").val(),a=$("#app_name").val();return $.trim(a)?$.trim(n)?$.trim(t)?void 0:(displayErrorMessage("Please enter company address"),!1):(displayErrorMessage("Company Name is required"),!1):(displayErrorMessage("App Name is required"),!1)}))})(),listenClick(".addTax",(function(){$("#addTaxModal").appendTo("body").modal("show")})),listenSubmit("#addTaxForm",(function(e){e.preventDefault(),isDoubleClicked($(this))||$.ajax({url:route("taxes.store"),type:"POST",data:$(this).serialize(),beforeSend:function(){startLoader()},success:function(e){e.success&&($("#addTaxModal").modal("hide"),displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"),$("#taxTbl").DataTable().ajax.reload(null,!1))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader()}})})),listenHiddenBsModal("#addTaxModal",(function(){resetModalForm("#addTaxForm","#validationErrorsBox")})),listenClick(".tax-edit-btn",(function(e){!function(e){$.ajax({url:route("taxes.edit",e),type:"GET",beforeSend:function(){startLoader()},success:function(e){e.success&&($("#editTaxName").val(e.data.name),$("#editTaxValue").val(e.data.value),1===e.data.is_default?$("input:radio[value='1'][name='is_default']").prop("checked",!0):$("input:radio[value='0'][name='is_default']").prop("checked",!0),$("#taxId").val(e.data.id),$("#editTaxModal").appendTo("body").modal("show"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader()}})}($(e.currentTarget).attr("data-id"))})),listenSubmit("#editTaxForm",(function(e){e.preventDefault();var t=$("#taxId").val();$.ajax({url:route("taxes.update",{tax:t}),type:"put",data:$(this).serialize(),beforeSend:function(){startLoader()},success:function(e){e.success&&(displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"),$("#editTaxModal").modal("hide"),$("#taxTbl").DataTable().ajax.reload(null,!1))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader()}})})),listenClick(".tax-delete-btn",(function(e){var t=$(e.currentTarget).attr("data-id");deleteItem(route("taxes.destroy",t),Lang.get("js.tax"))})),listenChange(".tax-status",(function(e){!function(e,t){$.ajax({url:route("taxes.default-status",e),method:"post",success:function(e){e.success&&(displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"),$(t).is(":checked")&&($(".tax-status").prop("checked",!1),$(t).prop("checked",!0)))}})}($(e.currentTarget).attr("data-id"),this)})),listenClick(".addQrCode",(function(){$("#addPaymentQrCodeForm")[0].reset(),$("#paymentQrCodeInputImage").css("background-image",'url("/assets/images/avatar.png")'),$("#addPaymentQrCodeModal").appendTo("body").modal("show")})),listenSubmit("#addPaymentQrCodeForm",(function(e){e.preventDefault(),isDoubleClicked($(this))||$.ajax({url:route("payment-qr-codes.store"),type:"POST",data:new FormData(this),contentType:!1,processData:!1,beforeSend:function(){startLoader()},success:function(e){e.success&&($("#addPaymentQrCodeModal").modal("hide"),displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader()}})})),listenClick(".qrcode-edit-btn",(function(e){!function(e){$.ajax({url:route("payment-qr-codes.edit",e),type:"GET",beforeSend:function(){startLoader()},success:function(e){e.success&&($("#editQrCodeTitle").val(e.data.title),$(".qr_code_image").css("background-image","url('"+e.data.qr_image+"')"),$("#paymentQrCodeId").val(e.data.id),$("#editPaymentQrCodeModal").appendTo("body").modal("show"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader()}})}($(e.currentTarget).attr("data-id"))})),listenSubmit("#editPaymentQrCodeForm",(function(e){e.preventDefault();var t=$("#paymentQrCodeId").val();$.ajax({url:route("payment-update",t),type:"post",data:new FormData(this),contentType:!1,processData:!1,beforeSend:function(){startLoader()},success:function(e){e.success&&(displaySuccessMessage(e.message),$("#editPaymentQrCodeModal").modal("hide"),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader()}})})),listenClick(".qrcode-delete-btn",(function(e){var t=$(e.currentTarget).attr("data-id");deleteItem(route("payment-qr-codes.destroy",t),Lang.get("js.payment_qr_code"))})),listenChange(".qr-status",(function(e){!function(e,t){$.ajax({url:route("payment-qr-codes.default-status",e),method:"post",cache:!1,success:function(e){e.success&&(displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"),$(t).is(":checked")&&($(".qr-status").prop("checked",!1),$(t).prop("checked",!0)))}})}($(e.currentTarget).attr("data-id"),this)})),listenClick(".addCurrency",(function(){$("#addCurrencyModal").appendTo("body").modal("show")})),listenSubmit("#addCurrencyForm",(function(e){e.preventDefault(),$.ajax({url:route("currencies.store"),type:"POST",data:$(this).serialize(),success:function(e){e.success&&($("#addCurrencyModal").modal("hide"),displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"))},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),listenHiddenBsModal("#addCurrencyModal",(function(){resetModalForm("#addCurrencyForm","#validationErrorsBox")})),listenClick(".currency-edit-btn",(function(e){!function(e){$.ajax({url:route("currencies.edit",e),type:"GET",success:function(e){e.success&&($("#editCurrencyName").val(e.data.name),$("#editCurrencyIcon").val(e.data.icon),$("#editCurrencyCode").val(e.data.code),$("#currencyId").val(e.data.id),$("#editCurrencyModal").appendTo("body").modal("show"))},error:function(e){displayErrorMessage(e.responseJSON.message)}})}($(e.currentTarget).attr("data-id"))})),listenSubmit("#editCurrencyForm",(function(e){e.preventDefault();var t=$("#currencyId").val();$.ajax({url:route("currencies.update",{currency:t}),type:"put",data:$(this).serialize(),success:function(e){e.success&&(displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"),$("#editCurrencyModal").modal("hide"))},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),listenClick(".currency-delete-btn",(function(e){var t=$(e.currentTarget).attr("data-id");deleteItem(route("currencies.destroy",t),Lang.get("js.currency"))})),document.addEventListener("turbo:load",(function(){$("#selectLanguage").length&&$("#selectLanguage").select2({width:"100%",dropdownParent:$("#changeLanguageModal")})})),listenClick("#changePassword",(function(){$(".pass-check-meter div.flex-grow-1").removeClass("active"),$("#changePasswordModal").modal("show").appendTo("body")})),listenClick("#passwordChangeBtn",(function(){$.ajax({url:changePasswordUrl,type:"PUT",data:$("#changePasswordForm").serialize(),success:function(e){$("#changePasswordModal").modal("hide"),displaySuccessMessage(e.message)},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),listenHiddenBsModal(["#changeLanguageModal","#changePasswordModal"],(function(e){e.preventDefault(),$("#changeLanguageForm").length&&$("#changeLanguageForm")[0].reset(),$("#changePasswordForm").length&&$("#changePasswordForm")[0].reset(),$("select.select2Selector").each((function(e,t){var n="#"+$(this).attr("id");$(n).val(getLoggedInUserLang),$(n).trigger("change")}))})),listenClick("#languageChangeBtn",(function(){$.ajax({url:route("change-language"),type:"POST",data:$("#changeLanguageForm").serialize(),success:function(e){e.success&&($("#changeLanguageModal").modal("hide"),displaySuccessMessage(Lang.get("js.language_updated_successfully")),setTimeout((function(){location.reload(!0),Turbo.visit(window.location.href)}),2e3))},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),listenClick("#changeLanguage",(function(){$("#changeLanguageModal").modal("show")})),window.printErrorMessage=function(e,t){$(e).show().html(""),$(e).text(t.responseJSON.message)},listenHiddenBsModal("#changePasswordModal",(function(){resetModalForm("#changePasswordForm","#validationErrorsBox")})),document.addEventListener("DOMContentLoaded",(function(){if(!$("#paymentHistory-tab").length)return!1;setTimeout((function(){var e=location.href,t=e.substring(e.indexOf("?active")+8);$('.nav-item button[data-bs-target="#'+t+'"]').click()}),100)})),listenChange("#clientInvoiceStatus",(function(){Livewire.dispatch("changeInvoiceStatusFilter",{status:$(this).val()})})),document.addEventListener("DOMContentLoaded",(function(){$("#client_payment_type").select2({placeholder:"Select Payment Type"}),$("#client_payment_mode").select2({placeholder:"Select Payment Method"}),$(".amount").hide();var e=window.location.toString();if(e.indexOf("?")>0){var t=e.substring(0,e.indexOf("?"));window.history.replaceState({},document.title,t)}$.ajaxSetup({headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")}})})),listenChange("#client_payment_mode",(function(){1==$(this).val()?$(".payment-attachment").removeClass("d-none"):$(".payment-attachment").addClass("d-none")})),listenChange("#client_payment_mode",(function(){1==$(this).val()?$("#transaction").show():$("#transaction").hide()})),listenChange("#client_payment_type",(function(){var e=$(this).val(),t=$("#payable_amount").val();"2"==e?($(".amount").hide(),$("#amount").val(t),$("#amount").prop("readonly",!0)):"3"==e?($(".amount").show(),$("#amount").val(""),$("#amount").prop("readonly",!1)):($(".amount").hide(),$("#amount").prop("readonly",!1))})),listenKeyup("#amount",(function(){var e=parseFloat($("#payable_amount").val()),t=parseFloat($("#amount").val()),n=parseInt($("#client_payment_type").val());3===n&&e<t||2===n&&e<t?($("#error-msg").text(Lang.get("js.amount_should_be_less_than_payable_amount")),$("#btnPay").addClass("disabled")):($("#error-msg").text(""),$("#btnPay").removeClass("disabled"))})),listenChange("#client_payment_mode",(function(){paymentMode=$(this).val(),parseInt(paymentMode)})),listenSubmit("#clientPaymentForm",(function(e){var t=this;if(e.preventDefault(),0==$("#amount").val())return displayErrorMessage("Amount should not be equal to zero"),!1;if(0==$("#payment_note").val().trim().length)return displayErrorMessage("Note field is Required"),!1;var n=$(this).find("#btnPay");setAdminBtnLoader(n);var a={amount:parseFloat($("#amount").val()),invoiceId:parseInt($("#client_invoice_id").val()),transactionNotes:$("#payment_note").val()};1==paymentMode?$.ajax({url:route("clients.payments.store"),type:"POST",data:new FormData(this),processData:!1,contentType:!1,success:function(e){e.success&&(Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"),window.location.href=e.data.redirectUrl)},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){setAdminBtnLoader(n)}}):2==paymentMode?$.post(invoiceStripePaymentUrl,a).done((function(e){var t=e.data.sessionId;stripe.redirectToCheckout({sessionId:t}).then((function(e){$(this).html("Make Payment").removeClass("disabled"),manageAjaxErrors(e)}))})).catch((function(e){$(t).html("Make Payment").removeClass("disabled"),manageAjaxErrors(e)})):3==paymentMode?$.ajax({type:"GET",url:route("paypal.init"),data:{amount:a.amount,invoiceId:a.invoiceId,transactionNotes:a.transactionNotes},success:function(e){if("CREATED"==e.status){var t="";$.each(e.links,(function(e,n){"approve"==n.rel&&(t=n.href)})),location.href=t}else location.href=e.url},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){setAdminBtnLoader(n)}}):5==paymentMode?$.ajax({type:"GET",url:route("razorpay.init"),data:$(this).serialize(),success:function(e){if(e.success){$("#clientPaymentModal").modal("hide");var t=e.data,n=t.id,a=t.amount,r=t.name,i=t.email,o=t.invoiceId,s=(t.invoice_id,t.description);options.description=s,options.order_id=n,options.amount=a,options.prefill.name=r,options.prefill.email=i,options.prefill.invoiceId=o;var l=new Razorpay(options);l.open(),l.on("payment.failed")}},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){setAdminBtnLoader(n)}}):6==paymentMode&&window.location.replace(route("client.paystack.init",{invoiceId:a.invoiceId,amount:a.amount,note:a.transactionNotes}))})),(()=>{function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var t=null;function n(n){var a;if(!$(n).length)return!1;t=$(n),startDate=moment().subtract(100,"years"),endDate=moment(),i(startDate,endDate);var r=moment().startOf("month").subtract(1,"days");function i(e,n){t.val(e.format("DD/MM/YYYY")+" - "+n.format("DD/MM/YYYY"))}t.daterangepicker({startDate,endDate,opens:"left",showDropdowns:!0,autoUpdateInput:!1,locale:{customRangeLabel:Lang.get("js.custom"),applyLabel:Lang.get("js.apply"),cancelLabel:Lang.get("js.cancel"),fromLabel:Lang.get("js.from"),toLabel:Lang.get("js.to"),monthNames:[Lang.get("js.jan"),Lang.get("js.feb"),Lang.get("js.mar"),Lang.get("js.apr"),Lang.get("js.may"),Lang.get("js.jun"),Lang.get("js.jul"),Lang.get("js.aug"),Lang.get("js.sep"),Lang.get("js.oct"),Lang.get("js.nov"),Lang.get("js.dec")],daysOfWeek:[Lang.get("js.sun"),Lang.get("js.mon"),Lang.get("js.tue"),Lang.get("js.wed"),Lang.get("js.thu"),Lang.get("js.fri"),Lang.get("js.sat")]},ranges:(a={},e(a,Lang.get("js.all"),[moment().subtract(100,"years"),moment()]),e(a,Lang.get("js.today"),[moment(),moment()]),e(a,Lang.get("js.this_week"),[moment().startOf("week"),moment().endOf("week")]),e(a,Lang.get("js.last_week"),[moment().startOf("week").subtract(7,"days"),moment().startOf("week").subtract(1,"days")]),e(a,Lang.get("js.last_30_days"),[moment().subtract(29,"days"),moment()]),e(a,Lang.get("js.this_month"),[moment().startOf("month"),moment().endOf("month")]),e(a,Lang.get("js.last_month"),[r.clone().startOf("month"),r.clone().endOf("month")]),a)},i),t.on("apply.daterangepicker",(function(e,t){startDate=t.startDate.format("YYYY-MM-D"),endDate=t.endDate.format("YYYY-MM-D"),Livewire.dispatch("changeDateRangeFilter",[startDate,endDate])}))}Livewire.hook("element.init",(function(e){var t=e.component;"transaction-table"!=t.name&&"client-transaction-table"!=t.name||(!function(){if(!$(".payment-mode-filter").length)return!1;if($(".payment-mode-filter").select2(),!$(".payment-status-filter").length)return!1;$(".payment-status-filter").select2()}(),n("#transactionDateRangePicker"))})),listenClick("#resetFilter",(function(){$("#paymentModeFilter").select2({placeholder:"Select Payment Method",allowClear:!1}),$("#paymentModeFilter").val(0).trigger("change");var e=moment().subtract(100,"years"),t=moment();Livewire.dispatch("changeDateRangeFilter",[e,t]),n("#transactionDateRangePicker")})),listenClick(".show-payment-notes",(function(){!function(e){$.ajax({url:route("payment-notes.show",e),type:"GET",success:function(e){if(e.success){var t=isEmpty(e.data)?"N/A":e.data;$("#showClientNotesId").text(t),$("#paymentNotesModal").appendTo("body").modal("show")}},error:function(e){displayErrorMessage(e.responseJSON.message)}})}($(this).attr("data-id"))})),window.hideDropdownManually=function(e,t){e.removeClass("show"),t.removeClass("show")},listenChange(".payment-mode-filter",(function(){Livewire.dispatch("changePaymentModeFilter",{paymentMode:$(this).val()}),Livewire.dispatch("changePaymentStatusFilter",{status:$(".payment-status-filter").val()})})),listenChange(".payment-status-filter",(function(){Livewire.dispatch("changePaymentStatusFilter",{status:$(this).val()}),Livewire.dispatch("changePaymentModeFilter",{paymentMode:$(".payment-mode-filter").val()})})),listen("click","#transactionResetFilter",(function(){$(".payment-mode-filter").val(0).trigger("change"),$(".payment-status-filter").val(3).trigger("change"),hideDropdownManually($("#transactionFilterBtn"),$(".dropdown-menu"))}))})(),document.addEventListener("turbo:load",(function(){!function(){if(!select2NotExists("#paymentModeFilter"))return!1;removeSelect2Container(["#paymentModeFilter"])}()})),listenClick("#resetFilter",(function(){$("#paymentModeFilter").select2({placeholder:"Select Payment Method",allowClear:!1}),$("#paymentModeFilter").val(0).trigger("change")})),(()=>{document.addEventListener("turbo:load",(function(){if(function(){if(!$("#invoiceTemplateId").length)return;$("#invoiceTemplateId").select2({width:"100%"})}(),function(){if(!$(".color-wrapper").length)return;(e=Pickr.create({el:".color-wrapper",theme:"nano",closeWithKey:"Enter",autoReposition:!0,defaultRepresentation:"HEX",swatches:["rgba(244, 67, 54, 1)","rgba(233, 30, 99, 1)","rgba(156, 39, 176, 1)","rgba(103, 58, 183, 1)","rgba(63, 81, 181, 1)","rgba(33, 150, 243, 1)","rgba(3, 169, 244, 1)","rgba(0, 188, 212, 1)","rgba(0, 150, 136, 1)","rgba(76, 175, 80, 1)","rgba(139, 195, 74, 1)","rgba(205, 220, 57, 1)","rgba(255, 235, 59, 1)","rgba(255, 193, 7, 1)"],components:{preview:!0,hue:!0,interaction:{input:!0,clear:!1,save:!1}}})).on("change",(function(){var t=e.getColor().toHEXA().toString();if(wc_hex_is_light(t))return $("#validationErrorsBox").text(""),$("#validationErrorsBox").show().html(""),$("#validationErrorsBox").text("Pick a different color"),setTimeout((function(){$("#validationErrorsBox").slideUp()}),5e3),void $(':input[id="btnSave"]').prop("disabled",!0);$(':input[id="btnSave"]').prop("disabled",!1),e.setColor(t),$("#invoiceColor").val(t);var n=$("#invoiceTemplateId").val(),a=[{invColor:t,companyName:$("#companyName").val(),companyAddress:$("#companyAddress").val(),companyPhone:$("#companyPhoneNumber").val(),gstNo:$("#gstNo").val()}],r=prepareTemplateRender("#"+n,a);$("#editorContent").html(r)}))}(),null!==e){var n=$("#invoiceColor").val();if(null!=n){e.setColor(n);var a=$("#invoiceTemplateId").val(),r=[{invColor:n,companyName:$("#companyName").val(),companyAddress:$("#companyAddress").val(),companyPhone:$("#companyPhoneNumber").val(),gstNo:$("#gstNo").val()}],i=prepareTemplateRender("#"+a,r);$("#editorContent").html(i)}}if($("#invoiceTemplateId").length){var o=$("#invoiceTemplateId").val(),s=$("#invoiceTemplateId").select2().find(":selected").data("color");t(o,s)}}));var e=null;function t(t,n){var a=[{invColor:n,companyName:$("#companyName").val(),companyAddress:$("#companyAddress").val(),companyPhone:$("#companyPhoneNumber").val(),gstNo:$("#gstNo").val()}],r=prepareTemplateRender("#"+t,a);$("#invoiceColor").val(n),$("#editorContent").html(r),setTimeout((function(){e.setColor(n)}),200)}listenChange("#invoiceTemplateId",(function(){t($(this).val(),$(this).select2().find(":selected").data("color"))}))})(),(()=>{function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var t=null;function n(n){var a;if(!$(n).length)return!1;t=$(n),startDate=moment().subtract(100,"years"),endDate=moment(),i(startDate,endDate);var r=moment().startOf("month").subtract(1,"days");function i(e,n){t.val(e.format("DD/MM/YYYY")+" - "+n.format("DD/MM/YYYY"))}t.daterangepicker({startDate,endDate,opens:"left",showDropdowns:!0,autoUpdateInput:!1,locale:{customRangeLabel:Lang.get("js.custom"),applyLabel:Lang.get("js.apply"),cancelLabel:Lang.get("js.cancel"),fromLabel:Lang.get("js.from"),toLabel:Lang.get("js.to"),monthNames:[Lang.get("js.jan"),Lang.get("js.feb"),Lang.get("js.mar"),Lang.get("js.apr"),Lang.get("js.may"),Lang.get("js.jun"),Lang.get("js.jul"),Lang.get("js.aug"),Lang.get("js.sep"),Lang.get("js.oct"),Lang.get("js.nov"),Lang.get("js.dec")],daysOfWeek:[Lang.get("js.sun"),Lang.get("js.mon"),Lang.get("js.tue"),Lang.get("js.wed"),Lang.get("js.thu"),Lang.get("js.fri"),Lang.get("js.sat")]},ranges:(a={},e(a,Lang.get("js.all"),[moment().subtract(100,"years"),moment()]),e(a,Lang.get("js.today"),[moment(),moment()]),e(a,Lang.get("js.this_week"),[moment().startOf("week"),moment().endOf("week")]),e(a,Lang.get("js.last_week"),[moment().startOf("week").subtract(7,"days"),moment().startOf("week").subtract(1,"days")]),e(a,Lang.get("js.last_30_days"),[moment().subtract(29,"days"),moment()]),e(a,Lang.get("js.this_month"),[moment().startOf("month"),moment().endOf("month")]),e(a,Lang.get("js.last_month"),[r.clone().startOf("month"),r.clone().endOf("month")]),a)},i),t.on("apply.daterangepicker",(function(e,t){startDate=t.startDate.format("YYYY-MM-D"),endDate=t.endDate.format("YYYY-MM-D"),Livewire.dispatch("changeDateRangeFilter",[startDate,endDate])}))}Livewire.hook("element.init",(function(e){var t=e.component;if("client-invoice-table"==t.name&&0==t.canonical.dateRange.length){if(n("#dateRangePickerForClient"),function(){if(!$("#clientInvoiceStatus").length)return!1;$("#clientInvoiceStatus").select2()}(),!$("#invoices-tab").length)return!1;var a=$("#clientActiveTab").val();$('.nav-item button[data-bs-target="#'+a+'"]').click()}})),listenClick("#resetClientInvoiceFilter",(function(){$("#clientInvoiceStatus").val(7).trigger("change"),hideDropdownManually($("#clientInvoiceFilterBtn"),$(".dropdown-menu")),n("#dateRangePickerForClient");var e=moment().subtract(100,"years"),t=moment();Livewire.dispatch("changeDateRangeFilter",[e,t])}))})(),listenClick(".send-btn",(function(e){e.preventDefault();var t=$(e.currentTarget).data("id");swal({title:Lang.get("js.send_invoice")+" !",text:Lang.get("js.are_you_sure_send"),icon:"warning",buttons:[Lang.get("js.no_cancel"),Lang.get("js.yes_send")]}).then((function(e){e&&function(e,t){$.ajax({url:route("send-invoice",{invoice:e,status:t}),type:"post",dataType:"json",success:function(e){e.success&&window.location.reload(),swal.fire({icon:"success",title:"Send!",confirmButtonColor:"#009ef7",text:header+" has been sent.",timer:2e3})},error:function(e){swal.fire({title:"",text:e.responseJSON.message,confirmButtonColor:"#009ef7",icon:"error",timer:5e3})}})}(t,1)}))})),(()=>{function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Livewire.hook("element.init",(function(e){"admin-payment-table"==e.component.name&&(!function(){if(!select2NotExists("#invoice_id"))return!1;$("#invoice_id").hasClass("select2-hidden-accessible")&&$("#invoice_id .select2-container").remove();$("#invoice_id").select2({dropdownParent:$("#paymentModal")})}(),paymentDateFilter())})),listenClick(".payment-delete-btn",(function(e){var t=$(e.currentTarget).attr("data-id");deleteItem(route("payments.destroy",t),Lang.get("js.payment"))})),listenClick(".addPayment",(function(){currentDateFormat;$.ajax({url:route("get-current-date-format"),type:"get",success:function(e){e,$("#payment_date").flatpickr({defaultDate:new Date,dateFormat:e,maxDate:new Date,locale:getUserLanguages}),$("#paymentModal").appendTo("body").modal("show")},error:function(e){displayErrorMessage(e.responseJSON.message)}}),setTimeout((function(){$("#invoice_id").select2({dropdownParent:$("#paymentModal")})}),200)})),listenHiddenBsModal("#paymentModal",(function(){$("#adminPaymentInvoiceId").val(null).trigger("change"),resetModalForm("#paymentForm")})),listenSubmit("#paymentForm",(function(e){if(e.preventDefault(),0==$("#payment_note").val().trim().length)return displayErrorMessage("Note field is Required"),!1;var t=$(this).find("#btnPay");setAdminBtnLoader(t),$.ajax({url:route("payments.store"),type:"POST",data:$(this).serialize(),success:function(e){e.success&&($("#paymentModal").modal("hide"),displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){setAdminBtnLoader(t)}})})),listenChange(".invoice",(function(){var e=$(this).val();if(isEmpty(e))return $("#due_amount").val(0),$("#paid_amount").val(0),!1;$.ajax({url:route("payments.get-invoiceAmount",e),type:"get",dataType:"json",success:function(e){e.success&&($(".invoice-currency-code").text(e.data.currencyCode),$("#due_amount").val(number_format(e.data.totalDueAmount)),$("#paid_amount").val(number_format(e.data.totalPaidAmount)))},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),listenClick(".payment-edit-btn",(function(e){!function(e){$.ajax({url:route("payments.edit",e),type:"GET",beforeSend:function(){startLoader()},success:function(e){e.success&&($("#edit_invoice_id").val(e.data.invoice.invoice_id),$("#edit_amount").val(e.data.amount),$("#edit_payment_date").flatpickr({defaultDate:e.data.payment_date,dateFormat:currentDateFormat,maxDate:new Date,locale:getUserLanguages}),$(".edit-invoice-currency-code").text(e.data.currencyCode),$("#edit_payment_note").val(e.data.notes),$("#paymentId").val(e.data.id),$("#transactionId").val(e.data.payment_id),$("#invoice").val(e.data.invoice_id),$("#totalDue_amount").val(number_format(e.data.DueAmount.original.data.totalDueAmount)),$("#totalPaid_amount").val(number_format(e.data.DueAmount.original.data.totalPaidAmount)),$("#editPaymentModal").appendTo("body").modal("show"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader()}})}($(e.currentTarget).attr("data-id"))})),listenSubmit("#editPaymentForm",(function(e){if(e.preventDefault(),0==$("#edit_payment_note").val().trim().length)return displayErrorMessage("Note field is Required"),!1;var t=$("#paymentId").val();$.ajax({url:route("payments.update",{payment:t}),type:"put",data:$(this).serialize(),beforeSend:function(){startLoader()},success:function(e){e.success&&(displaySuccessMessage(e.message),Livewire.dispatch("refreshDatatable"),Livewire.dispatch("resetPageTable"),$("#editPaymentModal").modal("hide"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader()}})})),listenChange(".transaction-approve",(function(){var e=$(this).attr("data-id"),t=$(this).val();$.ajax({url:route("change-transaction-status",e),type:"GET",data:{id:e,status:t},success:function(e){displaySuccessMessage(e.message),setTimeout((function(){Turbo.visit(route("transactions.index"))}),1500)},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),window.paymentDateFilter=function(){var t,n=moment().startOf("month"),a=moment().endOf("month");if($("#paymentDateFilter").length){var r=$("#paymentDateFilter");r.daterangepicker({startDate:n,endDate:a,showDropdowns:!0,locale:{customRangeLabel:Lang.get("js.custom"),applyLabel:Lang.get("js.apply"),cancelLabel:Lang.get("js.cancel"),fromLabel:Lang.get("js.from"),toLabel:Lang.get("js.to"),monthNames:[Lang.get("js.jan"),Lang.get("js.feb"),Lang.get("js.mar"),Lang.get("js.apr"),Lang.get("js.may"),Lang.get("js.jun"),Lang.get("js.jul"),Lang.get("js.aug"),Lang.get("js.sep"),Lang.get("js.oct"),Lang.get("js.nov"),Lang.get("js.dec")],daysOfWeek:[Lang.get("js.sun"),Lang.get("js.mon"),Lang.get("js.tue"),Lang.get("js.wed"),Lang.get("js.thu"),Lang.get("js.fri"),Lang.get("js.sat")]},ranges:(t={},e(t,Lang.get("js.today"),[moment(),moment()]),e(t,Lang.get("js.yesterday"),[moment().subtract(1,"days"),moment().subtract(1,"days")]),e(t,Lang.get("js.last_7_days"),[moment().subtract(6,"days"),moment()]),e(t,Lang.get("js.last_30_days"),[moment().subtract(29,"days"),moment()]),e(t,Lang.get("js.this_month"),[moment().startOf("month"),moment().endOf("month")]),e(t,Lang.get("js.last_month"),[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")]),t)},i),i(n,a),r.on("apply.daterangepicker",(function(e,t){isPickerApply=!0,startDate=t.startDate.format("YYYY-MM-DD"),endDate=t.endDate.format("YYYY-MM-DD"),Livewire.dispatch("dateFilter",[startDate,endDate])}))}function i(e,t){Livewire.dispatch("dateFilter",[e.format("MM/DD/YYYY"),t.format("MM/DD/YYYY")]),$("#paymentDateFilter").val(e.format("MM/DD/YYYY")+" - "+t.format("MM/DD/YYYY"))}},listenClick("#adminPaymentExcelExport",(function(e){e.preventDefault(),$.ajax({url:route("admin.paymentsExcel"),type:"GET",data:{date:$("#paymentDateFilter").val()},xhrFields:{responseType:"blob"},success:function(e){var t=new Blob([e]),n=document.createElement("a");n.href=window.URL.createObjectURL(t),n.download="Payment-Excel.xlsx",n.click()},error:function(e){console.log(e)}})})),listenClick("#adminPaymentPdfExport",(function(e){e.preventDefault(),$.ajax({url:route("admin.payments.pdf"),type:"GET",data:{date:$("#paymentDateFilter").val()},xhrFields:{responseType:"blob"},success:function(e){var t=new Blob([e]),n=document.createElement("a");n.href=window.URL.createObjectURL(t),n.download="payments.pdf",n.click()},error:function(e){console.log(e)}})}))})(),document.addEventListener("turbo:load",(function(){var e=document.getElementById("gotoFullScreen");e&&e.addEventListener("click",(function(){window.innerHeight==screen.height&&document.exitFullscreen(),document.body.requestFullscreen(),$("body").attr({style:"height: 100%; overflow: auto;"})}),!1)})),listenClick(".client-quote-delete-btn",(function(e){e.preventDefault();var t=$(this).attr("data-id");deleteItem(route("client.quotes.destroy",t),Lang.get("js.quote"))})),(()=>{var e=null,t="";document.addEventListener("turbo:load",(function(){$('input:text:not([readonly="readonly"])').first().blur(),function(){if(!select2NotExists(".client-product-quote"))return!1;removeSelect2Container([".client-product-quote"]),$(".client-product-quote").select2({tags:!0}),$(".tax").select2({placeholder:"Select TAX"}),$("#client_id").focus();var e=moment(new Date).add(1,"days").format(convertToMomentFormat(currentDateFormat)),n=$("#clientQuoteDueDate").flatpickr({defaultDate:e,dateFormat:currentDateFormat,locale:getUserLanguages}),a=$("#clientEditQuoteDueDate").flatpickr({dateFormat:currentDateFormat,defaultDate:moment($("#clientEditQuoteDueDate").val()).format(convertToMomentFormat(currentDateFormat)),locale:getUserLanguages});$("#client_quote_date").flatpickr({defaultDate:moment(new Date).format(convertToMomentFormat(currentDateFormat)),dateFormat:currentDateFormat,locale:getUserLanguages,onChange:function(){var e;e="d.m.Y"==currentDateFormat||"d/m/Y"==currentDateFormat||"d-m-Y"==currentDateFormat?moment($("#client_quote_date").val(),t).add(1,"days").format(t):moment($("#client_quote_date").val()).add(1,"days").format(convertToMomentFormat(currentDateFormat)),void 0!==n&&n.set("minDate",e)},onReady:function(){void 0!==n&&n.set("minDate",e)}}),$("#clientEditQuoteDate").flatpickr({dateFormat:currentDateFormat,defaultDate:moment($("#clientEditQuoteDate").val()).format(convertToMomentFormat(currentDateFormat)),locale:getUserLanguages,onChange:function(){var e;e="d.m.Y"==currentDateFormat||"d/m/Y"==currentDateFormat||"d-m-Y"==currentDateFormat?moment($("#clientEditQuoteDate").val(),t).add(1,"days").format(t):moment($("#clientEditQuoteDate").val()).add(1,"days").format(convertToMomentFormat(currentDateFormat)),void 0!==a&&a.set("minDate",e)},onReady:function(){var e;e="d.m.Y"==currentDateFormat||"d/m/Y"==currentDateFormat||"d-m-Y"==currentDateFormat?moment($("#clientEditQuoteDate").val(),convertToMomentFormat(currentDateFormat)).add(1,"days").format(convertToMomentFormat(currentDateFormat)):moment($("#clientEditQuoteDate").val()).add(1,"days").format(convertToMomentFormat(currentDateFormat)),void 0!==a&&a.set("minDate",e)}})}(),function(){if(!$("#discountType").length)return;$("#discountType,#status,#templateId").select2()}(),t=convertToMomentFormat(currentDateFormat),1==$("#quoteNoteData").val()||1==$("#quoteTermData").val()?($("#quoteAddNote").hide(),$("#quoteRemoveNote").show(),$("#quoteNoteAdd").show(),$("#quoteTermRemove").show()):($("#quoteRemoveNote").hide(),$("#quoteNoteAdd").hide(),$("#quoteTermRemove").hide());1==$("#quoteRecurring").val()?$(".recurring").show():$(".recurring").hide();$("#formData_recurring-1").prop("checked")&&$(".recurring").hide();0!=$("#discountType").val()?$("#discount").removeAttr("disabled"):$("#discount").attr("disabled","disabled");r()})),listenKeyup("#quoteId",(function(){return $("#quoteId").val(this.value.toUpperCase())})),listenClick("#quoteAddNote",(function(){$("#quoteAddNote").hide(),$("#quoteRemoveNote").show(),$("#quoteNoteAdd").show(),$("#quoteTermRemove").show()})),listenClick("#quoteRemoveNote",(function(){$("#quoteAddNote").show(),$("#quoteRemoveNote").hide(),$("#quoteNoteAdd").hide(),$("#quoteTermRemove").hide(),$("#quoteNote").val(""),$("#quoteTerm").val(""),$("#quoteAddNote").show()})),listenClick("#formData_recurring-0",(function(){$("#formData_recurring-0").prop("checked")?$(".recurring").show():$(".recurring").hide()})),listenClick("#formData_recurring-1",(function(){$("#formData_recurring-1").prop("checked")&&$(".recurring").hide()})),listenChange("#discountType",(function(){if(e=$(this).val(),$("#discount").val(0),1==e||2==e){if($("#discount").removeAttr("disabled"),2==e){var t=$("#discount").val();$("#discount").val(t.substring(0,2))}}else $("#discount").attr("disabled","disabled"),$("#discount").val(0),$("#quoteDiscountAmount").text("0");i()})),window.isNumberKey=function(e,t){var n=e.which?e.which:event.keyCode;return!((46!==n||-1!==$(t).val().indexOf("."))&&(n<48||n>57))},listenClick("#addClientQuoteItem",(function(){var e={products:JSON.parse($("#products").val())},t=prepareTemplateRender("#quotesItemTemplate",e);$(".quote-item-container").append(t),$(".productId").select2({placeholder:Lang.get("js.select_product_or_enter_free_text"),tags:!0}),n()}));var n=function(){var e=1;if($(".quote-item-container>tr").each((function(){$(this).find(".item-number").text(e),e++})),e-1==0){var t={products:JSON.parse($("#products").val())},n=prepareTemplateRender("#quotesItemTemplate",t);$(".quote-item-container").append(n),$(".productId").select2()}};listenClick(".delete-quote-item",(function(){$(this).parents("tr").remove(),n(),r()})),listenChange(".client-product-quote",(function(){var e=$(this).val();isEmpty(e)&&(e=0);var t=$(this);$.ajax({url:route("quotes.get-product",e),type:"get",dataType:"json",success:function(n){if(n.success){var a="";$.each(n.data,(function(t,n){t===e&&(a=n)})),t.parent().parent().find("td .price-quote").val(a),t.parent().parent().find("td .qty-quote").val(1),$(".price-quote").trigger("keyup")}},error:function(e){displayErrorMessage(e.responseJSON.message)}})})),listenKeyup(".qty-quote",(function(){var e=parseInt($(this).val()),t=$(this).parent().siblings().find(".price-quote").val();t=parseFloat(removeCommas(t));var n=a(e,t);$(this).parent().siblings(".quote-item-total").text(addCommas(n.toFixed(2).toString())),r()})),listenKeyup(".price-quote",(function(){var e=$(this).val();e=parseFloat(removeCommas(e));var t=parseInt($(this).parent().siblings().find(".qty-quote").val()),n=a(t,e);$(this).parent().siblings(".quote-item-total").text(addCommas(n.toFixed(2).toString())),r()}));var a=function(e,t){return e>0&&t>0?e*t:0},r=function(){var e=0;$(".quote-item-container>tr").each((function(){var t=$(this).find(".quote-item-total").text();t=removeCommas(t),t=isEmpty($.trim(t))?0:parseFloat(t),e+=t})),e=parseFloat(e),isNaN(e)&&(e=0),$("#quoteTotal").text(addCommas(e.toFixed(2))),$("#quoteTotalAmount").val(e),i()},i=function(){var t=$("#discount").val();e=$("#discountType").val();var n=[],a=0;$(".quote-item-total").each((function(){n[a++]=$.trim(removeCommas($(this).text()))})),$.sum=function(e){var t=0;return $.each(e,(function(e,n){t+=+n})),t};var r=$.sum(n);$("#quoteTotal").text(number_format(r)),(isEmpty(t)||isEmpty(r))&&(t=0);var i=0,o=r-i;1==e?o=r-(i=t):2==e&&(o=r-(i=r*t/100)),$("#quoteFinalAmount").text(number_format(o)),$("#quoteTotalAmount").val(o.toFixed(2)),$("#quoteDiscountAmount").text(number_format(i))};listen("keyup","#discount",(function(){var t=$(this).val();if(2==e&&t>100)return displayErrorMessage("On Percentage you can only give maximum 100% discount"),$(this).val(t.slice(0,-1)),!1;i()})),listenClick("#saveAsDraftClientQuote",(function(e){e.preventDefault();var t=$(this).data("status"),n=document.getElementById("clientQuoteForm"),a=new FormData(n);a.append("status",t),screenLock(),$.ajax({url:route("client.quotes.store"),type:"POST",dataType:"json",data:a,processData:!1,contentType:!1,beforeSend:function(){startLoader()},success:function(e){displaySuccessMessage(e.message),Turbo.visit(route("client.quotes.index"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader(),screenUnLock()}})})),listenClick("#editSaveClientQuote",(function(e){e.preventDefault();var t=$(this).data("status"),n=$("#clientQuoteEditForm").serialize()+""eStatus="+t;screenLock(),$.ajax({url:$("#clientQuoteUpdateUrl").val(),type:"PUT",dataType:"json",data:n,beforeSend:function(){startLoader()},success:function(e){displaySuccessMessage(e.message),Turbo.visit(route("client.quotes.index"))},error:function(e){displayErrorMessage(e.responseJSON.message)},complete:function(){stopLoader(),screenUnLock()}})}))})()})();