From d4bb3d8665bb95c0a7d17432c1d9b608570d2f8b Mon Sep 17 00:00:00 2001 From: Akhil Gupta Date: Sat, 20 Mar 2021 13:38:46 +0530 Subject: [PATCH] commiting before crash --- .vscode/launch.json | 7 +- client/episodes.html | 24 +- client/episodes_new.html | 684 ++++++++++++++++++++++++++++++ client/scripts.html | 2 +- controllers/pages.go | 93 ++-- controllers/podcast.go | 31 +- db/dbfunctions.go | 60 +++ model/queryModels.go | 58 +++ webassets/luxon.min.js | 1 + webassets/vue-multiselect.min.css | 402 ++++++++++++++++++ webassets/vue-multiselect.min.js | 1 + 11 files changed, 1273 insertions(+), 90 deletions(-) create mode 100644 client/episodes_new.html create mode 100644 model/queryModels.go create mode 100644 webassets/luxon.min.js create mode 100644 webassets/vue-multiselect.min.css create mode 100644 webassets/vue-multiselect.min.js diff --git a/.vscode/launch.json b/.vscode/launch.json index 5c7247b..41e94ce 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,5 +3,10 @@ // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", - "configurations": [] + "configurations": [{ + "program": "${workspaceRoot}/main.go", + "type": "go", + "mode": "auto" + } + ] } \ No newline at end of file diff --git a/client/episodes.html b/client/episodes.html index 79da232..bbbc277 100644 --- a/client/episodes.html +++ b/client/episodes.html @@ -188,41 +188,41 @@
- {{if .previousPage }} + {{if .filter.PreviousPage }} NewestFirst {{end}} - {{if .previousPage }} + {{if .filter.PreviousPage }} NewerLast {{end}} - {{if .nextPage }} + {{if .filter.NextPage }} OlderNext {{end}} - {{if gt .totalPages .page }} + {{if gt .filter.TotalPages .page }} OldestLast {{end}}
diff --git a/client/episodes_new.html b/client/episodes_new.html new file mode 100644 index 0000000..c429e2a --- /dev/null +++ b/client/episodes_new.html @@ -0,0 +1,684 @@ + + + + + + {{.title}} - PodGrab + {{template "commoncss" .}} + + + + + +
+ {{template "navbar" .}} + +
{{$setting := .setting}} + +
+ + +
+
+ +
+
+
+
+ +
+ + +
+ + +
+
+ + + + + + +
+
+
+
+
+
+
+ + + +

Nothing to see here! Maybe try changing the filter criteria.

+ + + +
+
+ + First + + Previous + + + + + Next + + + Last +
+
+ +
+ + {{template "scripts"}} + + + + + + + + + + diff --git a/client/scripts.html b/client/scripts.html index f058153..4398f74 100644 --- a/client/scripts.html +++ b/client/scripts.html @@ -1,5 +1,5 @@ {{define "scripts"}} - + diff --git a/controllers/pages.go b/controllers/pages.go index a1750e6..e1df86f 100644 --- a/controllers/pages.go +++ b/controllers/pages.go @@ -11,6 +11,7 @@ import ( "time" "github.com/akhilrex/podgrab/db" + "github.com/akhilrex/podgrab/model" "github.com/akhilrex/podgrab/service" "github.com/gin-gonic/gin" ) @@ -55,7 +56,7 @@ func PodcastPage(c *gin.Context) { var podcast db.Podcast if err := db.GetPodcastById(searchByIdQuery.Id, &podcast); err == nil { - var pagination Pagination + var pagination model.Pagination if c.ShouldBindQuery(&pagination) == nil { var page, count int if page = pagination.Page; page == 0 { @@ -94,7 +95,7 @@ func PodcastPage(c *gin.Context) { "podcastId": searchByIdQuery.Id, }) } else { - c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid request"}) + c.JSON(http.StatusBadRequest, err) } } else { c.JSON(http.StatusBadRequest, err) @@ -224,73 +225,41 @@ func BackupsPage(c *gin.Context) { } } -func AllEpisodesPage(c *gin.Context) { - var pagination Pagination - var page, count int - c.ShouldBindQuery(&pagination) - if page = pagination.Page; page == 0 { - page = 1 - } - if count = pagination.Count; count == 0 { - count = 10 - } - var filter EpisodesFilter - c.ShouldBindQuery(&filter) - - var podcastItems []db.PodcastItem - var totalCount int64 - //fmt.Printf("%+v\n", filter) - fromDate := time.Time{} - if filter.FromDate != "" { - parsedDate, err := time.Parse("2006-01-02", strings.Trim(filter.FromDate, "\"")) - if err != nil { - fromDate = time.Time{} - } else { - fromDate = parsedDate - } +func getSortOptions() interface{} { + return []struct { + Label, Value string + }{ + {"Release (asc)", "release_asc"}, + {"Release (desc)", "release_desc"}, + {"Duration (asc)", "duration_asc"}, + {"Duration (desc)", "duration_desc"}, } - - if err := db.GetPaginatedPodcastItems(page, count, - nil, filter.PlayedOnly, fromDate, - &podcastItems, &totalCount); err == nil { - - setting := c.MustGet("setting").(*db.Setting) - totalPages := int(math.Ceil(float64(totalCount) / float64(count))) - nextPage, previousPage := 0, 0 - if page < totalPages { - nextPage = page + 1 - } - if page > 1 { - previousPage = page - 1 - } - downloadedOnly := false - if filter.DownloadedOnly != nil { - downloadedOnly = *filter.DownloadedOnly - fmt.Println(downloadedOnly) - } - toReturn := gin.H{ - "title": "All Episodes", - "podcastItems": podcastItems, - "setting": setting, - "page": page, - "count": count, - "totalCount": totalCount, - "totalPages": totalPages, - "nextPage": nextPage, - "previousPage": previousPage, - "downloadedOnly": downloadedOnly, - } - fmt.Printf("%+v\n", totalCount) - c.HTML(http.StatusOK, "episodes.html", toReturn) - } else { - c.JSON(http.StatusBadRequest, err) +} +func AllEpisodesPage(c *gin.Context) { + var filter model.EpisodesFilter + c.ShouldBindQuery(&filter) + filter.VerifyPaginationValues() + setting := c.MustGet("setting").(*db.Setting) + podcasts := service.GetAllPodcasts("") + tags, _ := db.GetAllTags("") + toReturn := gin.H{ + "title": "All Episodes", + "podcastItems": []db.PodcastItem{}, + "setting": setting, + "page": filter.Page, + "count": filter.Count, + "filter": filter, + "podcasts": podcasts, + "tags": tags, + "sortOptions": getSortOptions(), } + c.HTML(http.StatusOK, "episodes_new.html", toReturn) } func AllTagsPage(c *gin.Context) { - var pagination Pagination + var pagination model.Pagination var page, count int c.ShouldBindQuery(&pagination) if page = pagination.Page; page == 0 { diff --git a/controllers/podcast.go b/controllers/podcast.go index b53bbb3..5dba90a 100644 --- a/controllers/podcast.go +++ b/controllers/podcast.go @@ -45,17 +45,6 @@ type AddRemoveTagQuery struct { TagId string `binding:"required" uri:"tagId" json:"tagId" form:"tagId"` } -type Pagination struct { - Page int `uri:"page" query:"page" json:"page" form:"page"` - Count int `uri:"count" query:"count" json:"count" form:"count"` -} - -type EpisodesFilter struct { - DownloadedOnly *bool `uri:"downloadedOnly" query:"downloadedOnly" json:"downloadedOnly" form:"downloadedOnly"` - PlayedOnly *bool `uri:"playedOnly" query:"playedOnly" json:"playedOnly" form:"playedOnly"` - FromDate string `uri:"fromDate" query:"fromDate" json:"fromDate" form:"fromDate"` -} - type PatchPodcastItem struct { IsPlayed bool `json:"isPlayed" form:"isPlayed" query:"isPlayed"` Title string `form:"title" json:"title" query:"title"` @@ -182,9 +171,23 @@ func DownloadAllEpisodesByPodcastId(c *gin.Context) { } func GetAllPodcastItems(c *gin.Context) { - var podcasts []db.PodcastItem - db.GetAllPodcastItems(&podcasts) - c.JSON(200, podcasts) + var filter model.EpisodesFilter + err := c.ShouldBindQuery(&filter) + if err != nil { + fmt.Println(err.Error()) + } + filter.VerifyPaginationValues() + if podcastItems, totalCount, err := db.GetPaginatedPodcastItemsNew(filter); err == nil { + filter.SetCounts(totalCount) + toReturn := gin.H{ + "podcastItems": podcastItems, + "filter": &filter, + } + c.JSON(http.StatusOK, toReturn) + } else { + c.JSON(http.StatusBadRequest, err) + } + } func GetPodcastItemById(c *gin.Context) { diff --git a/db/dbfunctions.go b/db/dbfunctions.go index b47c5cb..2e673e5 100644 --- a/db/dbfunctions.go +++ b/db/dbfunctions.go @@ -4,8 +4,11 @@ import ( "database/sql" "errors" "fmt" + "strconv" + "strings" "time" + "github.com/akhilrex/podgrab/model" "gorm.io/gorm" "gorm.io/gorm/clause" ) @@ -35,6 +38,63 @@ func GetAllPodcastItemsWithoutSize() (*[]PodcastItem, error) { result := DB.Where("file_size<=?", 0).Order("pub_date desc").Find(&podcasts) return &podcasts, result.Error } + +func getSortOrder(sorting model.EpisodeSort) string { + switch sorting { + case model.RELEASE_ASC: + return "pub_date asc" + case model.RELEASE_DESC: + return "pub_date desc" + case model.DURATION_ASC: + return "duration asc" + case model.DURATION_DESC: + return "duration desc" + default: + return "pub_date desc" + } +} + +func GetPaginatedPodcastItemsNew(queryModel model.EpisodesFilter) (*[]PodcastItem, int64, error) { + var podcasts []PodcastItem + var total int64 + query := DB.Debug().Preload("Podcast") + if queryModel.IsDownloaded != nil { + isDownloaded, err := strconv.ParseBool(*queryModel.IsDownloaded) + if err == nil && isDownloaded { + query = query.Where("download_status=?", Downloaded) + } else { + query = query.Where("download_status!=?", Downloaded) + } + } + if queryModel.IsPlayed != nil { + isPlayed, err := strconv.ParseBool(*queryModel.IsPlayed) + + if err == nil && isPlayed { + query = query.Where("is_played=?", 1) + } else { + query = query.Where("is_played=?", 0) + } + } + + if queryModel.Q != "" { + query = query.Where("UPPER(title) like ?", "%"+strings.TrimSpace(strings.ToUpper(queryModel.Q))+"%") + } + + if len(queryModel.TagIds) > 0 { + query = query.Where("podcast_id in (select podcast_id from podcast_tags where tag_id in ?)", queryModel.TagIds) + } + + if len(queryModel.PodcastIds) > 0 { + query = query.Where("podcast_id in ?", queryModel.PodcastIds) + } + + totalsQuery := query.Order(getSortOrder(queryModel.Sorting)).Find(&podcasts) + totalsQuery.Count(&total) + + result := query.Limit(queryModel.Count).Offset((queryModel.Page - 1) * queryModel.Count).Order("pub_date desc").Find(&podcasts) + return &podcasts, total, result.Error +} + func GetPaginatedPodcastItems(page int, count int, downloadedOnly *bool, playedOnly *bool, fromDate time.Time, podcasts *[]PodcastItem, total *int64) error { query := DB.Preload("Podcast") if downloadedOnly != nil { diff --git a/model/queryModels.go b/model/queryModels.go new file mode 100644 index 0000000..dcc6e5f --- /dev/null +++ b/model/queryModels.go @@ -0,0 +1,58 @@ +package model + +import "math" + +type Pagination struct { + Page int `uri:"page" query:"page" json:"page" form:"page" default:1` + Count int `uri:"count" query:"count" json:"count" form:"count" default:20` + NextPage int `uri:"nextPage" query:"nextPage" json:"nextPage" form:"nextPage"` + PreviousPage int `uri:"previousPage" query:"previousPage" json:"previousPage" form:"previousPage"` + TotalCount int `uri:"totalCount" query:"totalCount" json:"totalCount" form:"totalCount"` + TotalPages int `uri:"totalPages" query:"totalPages" json:"totalPages" form:"totalPages"` +} + +type EpisodeSort string + +const ( + RELEASE_ASC EpisodeSort = "release_asc" + RELEASE_DESC EpisodeSort = "release_desc" + DURATION_ASC EpisodeSort = "duration_asc" + DURATION_DESC EpisodeSort = "duration_desc" +) + +type EpisodesFilter struct { + Pagination + IsDownloaded *string `uri:"isDownloaded" query:"isDownloaded" json:"isDownloaded" form:"isDownloaded"` + IsPlayed *string `uri:"isPlayed" query:"isPlayed" json:"isPlayed" form:"isPlayed"` + Sorting EpisodeSort `uri:"sorting" query:"sorting" json:"sorting" form:"sorting"` + Q string `uri:"q" query:"q" json:"q" form:"q"` + TagIds []string `uri:"tagIds" query:"tagIds[]" json:"tagIds" form:"tagIds[]"` + PodcastIds []string `uri:"podcastIds" query:"podcastIds[]" json:"podcastIds" form:"podcastIds[]"` +} + +func (filter *EpisodesFilter) VerifyPaginationValues() { + if filter.Count == 0 { + filter.Count = 20 + } + if filter.Page == 0 { + filter.Page = 1 + } + if filter.Sorting == "" { + filter.Sorting = RELEASE_DESC + } +} + +func (filter *EpisodesFilter) SetCounts(totalCount int64) { + totalPages := int(math.Ceil(float64(totalCount) / float64(filter.Count))) + nextPage, previousPage := 0, 0 + if filter.Page < totalPages { + nextPage = filter.Page + 1 + } + if filter.Page > 1 { + previousPage = filter.Page - 1 + } + filter.NextPage = nextPage + filter.PreviousPage = previousPage + filter.TotalCount = int(totalCount) + filter.TotalPages = totalPages +} diff --git a/webassets/luxon.min.js b/webassets/luxon.min.js new file mode 100644 index 0000000..2a8d834 --- /dev/null +++ b/webassets/luxon.min.js @@ -0,0 +1 @@ +var luxon=function(e){"use strict";function t(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}var l=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(u(Error)),f=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return r(t,e),t}(l),d=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return r(t,e),t}(l),h=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return r(t,e),t}(l),m=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(l),y=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return r(t,e),t}(l),v=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(l),g=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return r(t,e),t}(l),p="numeric",w="short",k="long",b={year:p,month:p,day:p},S={year:p,month:w,day:p},O={year:p,month:w,day:p,weekday:w},T={year:p,month:k,day:p},M={year:p,month:k,day:p,weekday:k},N={hour:p,minute:p},E={hour:p,minute:p,second:p},D={hour:p,minute:p,second:p,timeZoneName:w},I={hour:p,minute:p,second:p,timeZoneName:k},V={hour:p,minute:p,hour12:!1},L={hour:p,minute:p,second:p,hour12:!1},x={hour:p,minute:p,second:p,hour12:!1,timeZoneName:w},F={hour:p,minute:p,second:p,hour12:!1,timeZoneName:k},C={year:p,month:p,day:p,hour:p,minute:p},Z={year:p,month:p,day:p,hour:p,minute:p,second:p},j={year:p,month:w,day:p,hour:p,minute:p},A={year:p,month:w,day:p,hour:p,minute:p,second:p},z={year:p,month:w,day:p,weekday:w,hour:p,minute:p},_={year:p,month:k,day:p,hour:p,minute:p,timeZoneName:w},q={year:p,month:k,day:p,hour:p,minute:p,second:p,timeZoneName:w},H={year:p,month:k,day:p,weekday:k,hour:p,minute:p,timeZoneName:k},U={year:p,month:k,day:p,weekday:k,hour:p,minute:p,second:p,timeZoneName:k};function R(e){return void 0===e}function P(e){return"number"==typeof e}function W(e){return"number"==typeof e&&e%1==0}function J(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function Y(){return!R(Intl.DateTimeFormat.prototype.formatToParts)}function G(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function $(e,t,n){if(0!==e.length)return e.reduce(function(e,r){var i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function B(e,t){return t.reduce(function(t,n){return t[n]=e[n],t},{})}function Q(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function K(e,t,n){return W(e)&&e>=t&&e<=n}function X(e,t){void 0===t&&(t=2);var n=e<0?"-":"",r=n?-1*e:e;return""+n+(r.toString().length=0&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function ue(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===r?53:52}function se(e){return e>99?e:e>60?1900+e:2e3+e}function ce(e,t,n,r){void 0===r&&(r=null);var i=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);var a=Object.assign({timeZoneName:t},o),u=J();if(u&&Y()){var s=new Intl.DateTimeFormat(n,a).formatToParts(i).find(function(e){return"timezonename"===e.type.toLowerCase()});return s?s.value:null}if(u){var c=new Intl.DateTimeFormat(n,o).format(i);return new Intl.DateTimeFormat(n,a).format(i).substring(c.length).replace(/^[, \u200e]+/,"")}return null}function le(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function fe(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new v("Invalid unit value "+e);return t}function de(e,t,n){var r={};for(var i in e)if(Q(e,i)){if(n.indexOf(i)>=0)continue;var o=e[i];if(void 0===o||null===o)continue;r[t(i)]=fe(o)}return r}function he(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return""+i+X(n,2)+":"+X(r,2);case"narrow":return""+i+n+(r>0?":"+r:"");case"techie":return""+i+X(n,2)+X(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function me(e){return B(e,["hour","minute","second","millisecond"])}var ye=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function ve(e){return JSON.stringify(e,Object.keys(e).sort())}var ge=["January","February","March","April","May","June","July","August","September","October","November","December"],pe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],we=["J","F","M","A","M","J","J","A","S","O","N","D"];function ke(e){switch(e){case"narrow":return we;case"short":return pe;case"long":return ge;case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var be=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Se=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Oe=["M","T","W","T","F","S","S"];function Te(e){switch(e){case"narrow":return Oe;case"short":return Se;case"long":return be;case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Me=["AM","PM"],Ne=["Before Christ","Anno Domini"],Ee=["BC","AD"],De=["B","A"];function Ie(e){switch(e){case"narrow":return De;case"short":return Ee;case"long":return Ne;default:return null}}function Ve(e,t){for(var n,r="",i=c(e);!(n=i()).done;){var o=n.value;o.literal?r+=o.val:r+=t(o.val)}return r}var Le={D:b,DD:S,DDD:T,DDDD:M,t:N,tt:E,ttt:D,tttt:I,T:V,TT:L,TTT:x,TTTT:F,f:C,ff:j,fff:_,ffff:H,F:Z,FF:A,FFF:q,FFFF:U},xe=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],o=0;o0&&i.push({literal:r,val:n}),t=null,n="",r=!r):r?n+=a:a===t?n+=a:(n.length>0&&i.push({literal:!1,val:n}),n=a,t=a)}return n.length>0&&i.push({literal:r,val:n}),i},e.macroTokenToFormatOpts=function(e){return Le[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return X(e,t);var n=Object.assign({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var r=this,i="en"===this.loc.listingMode(),o=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&Y(),a=function(e,n){return r.loc.extract(t,e,n)},u=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},s=function(){return i?function(e){return Me[e.hour<12?0:1]}(t):a({hour:"numeric",hour12:!0},"dayperiod")},c=function(e,n){return i?function(e,t){return ke(t)[e.month-1]}(t,e):a(n?{month:e}:{month:e,day:"numeric"},"month")},l=function(e,n){return i?function(e,t){return Te(t)[e.weekday-1]}(t,e):a(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},f=function(e){return i?function(e,t){return Ie(t)[e.year<0?0:1]}(t,e):a({era:e},"era")};return Ve(e.parseFormat(n),function(n){switch(n){case"S":return r.num(t.millisecond);case"u":case"SSS":return r.num(t.millisecond,3);case"s":return r.num(t.second);case"ss":return r.num(t.second,2);case"m":return r.num(t.minute);case"mm":return r.num(t.minute,2);case"h":return r.num(t.hour%12==0?12:t.hour%12);case"hh":return r.num(t.hour%12==0?12:t.hour%12,2);case"H":return r.num(t.hour);case"HH":return r.num(t.hour,2);case"Z":return u({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return u({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return u({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:r.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return o?a({day:"numeric"},"day"):r.num(t.day);case"dd":return o?a({day:"2-digit"},"day"):r.num(t.day,2);case"c":return r.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return r.num(t.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return o?a({month:"numeric",day:"numeric"},"month"):r.num(t.month);case"LL":return o?a({month:"2-digit",day:"numeric"},"month"):r.num(t.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return o?a({month:"numeric"},"month"):r.num(t.month);case"MM":return o?a({month:"2-digit"},"month"):r.num(t.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return o?a({year:"numeric"},"year"):r.num(t.year);case"yy":return o?a({year:"2-digit"},"year"):r.num(t.year.toString().slice(-2),2);case"yyyy":return o?a({year:"numeric"},"year"):r.num(t.year,4);case"yyyyyy":return o?a({year:"numeric"},"year"):r.num(t.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return r.num(t.weekYear.toString().slice(-2),2);case"kkkk":return r.num(t.weekYear,4);case"W":return r.num(t.weekNumber);case"WW":return r.num(t.weekNumber,2);case"o":return r.num(t.ordinal);case"ooo":return r.num(t.ordinal,3);case"q":return r.num(t.quarter);case"qq":return r.num(t.quarter,2);case"X":return r.num(Math.floor(t.ts/1e3));case"x":return r.num(t.ts);default:return function(n){var i=e.macroTokenToFormatOpts(n);return i?r.formatWithSystemDefault(t,i):n}(n)}})},t.formatDurationFromString=function(t,n){var r,i=this,o=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},a=e.parseFormat(n),u=a.reduce(function(e,t){var n=t.literal,r=t.val;return n?e:e.concat(r)},[]),s=t.shiftTo.apply(t,u.map(o).filter(function(e){return e}));return Ve(a,(r=s,function(e){var t=o(e);return t?i.num(r.get(t),e.length):e}))},e}(),Fe=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Ce=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new g},t.formatOffset=function(e,t){throw new g},t.offset=function(e){throw new g},t.equals=function(e){throw new g},n(e,[{key:"type",get:function(){throw new g}},{key:"name",get:function(){throw new g}},{key:"universal",get:function(){throw new g}},{key:"isValid",get:function(){throw new g}}]),e}(),Ze=null,je=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var i=t.prototype;return i.offsetName=function(e,t){return ce(e,t.format,t.locale)},i.formatOffset=function(e,t){return he(this.offset(e),t)},i.offset=function(e){return-new Date(e).getTimezoneOffset()},i.equals=function(e){return"local"===e.type},n(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return J()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Ze&&(Ze=new t),Ze}}]),t}(Ce),Ae=RegExp("^"+ye.source+"$"),ze={};var _e={year:0,month:1,day:2,hour:3,minute:4,second:5};var qe={},He=function(e){function t(n){var r;return(r=e.call(this)||this).zoneName=n,r.valid=t.isValidZone(n),r}r(t,e),t.create=function(e){return qe[e]||(qe[e]=new t(e)),qe[e]},t.resetCache=function(){qe={},ze={}},t.isValidSpecifier=function(e){return!(!e||!e.match(Ae))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var i=t.prototype;return i.offsetName=function(e,t){return ce(e,t.format,t.locale,this.name)},i.formatOffset=function(e,t){return he(this.offset(e),t)},i.offset=function(e){var t,n=new Date(e),r=(t=this.name,ze[t]||(ze[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),ze[t]),i=r.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=[],i=0;i=0?d:1e3+d))/6e4},i.equals=function(e){return"iana"===e.type&&e.name===this.name},n(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Ce),Ue=null,Re=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}r(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(le(n[1],n[2]))}return null},n(t,null,[{key:"utcInstance",get:function(){return null===Ue&&(Ue=new t(0)),Ue}}]);var i=t.prototype;return i.offsetName=function(){return this.name},i.formatOffset=function(e,t){return he(this.fixed,t)},i.offset=function(){return this.fixed},i.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},n(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+he(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Ce),Pe=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}r(t,e);var i=t.prototype;return i.offsetName=function(){return null},i.formatOffset=function(){return""},i.offset=function(){return NaN},i.equals=function(){return!1},n(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Ce);function We(e,t){var n;if(R(e)||null===e)return t;if(e instanceof Ce)return e;if("string"==typeof e){var r=e.toLowerCase();return"local"===r?t:"utc"===r||"gmt"===r?Re.utcInstance:null!=(n=He.parseGMTOffset(e))?Re.instance(n):He.isValidSpecifier(r)?He.create(e):Re.parseSpecifier(r)||new Pe(e)}return P(e)?Re.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Pe(e)}var Je=function(){return Date.now()},Ye=null,Ge=null,$e=null,Be=null,Qe=!1,Ke=function(){function e(){}return e.resetCaches=function(){ct.resetCache(),He.resetCache()},n(e,null,[{key:"now",get:function(){return Je},set:function(e){Je=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){Ye=e?We(e):null}},{key:"defaultZone",get:function(){return Ye||je.instance}},{key:"defaultLocale",get:function(){return Ge},set:function(e){Ge=e}},{key:"defaultNumberingSystem",get:function(){return $e},set:function(e){$e=e}},{key:"defaultOutputCalendar",get:function(){return Be},set:function(e){Be=e}},{key:"throwOnInvalid",get:function(){return Qe},set:function(e){Qe=e}}]),e}(),Xe={};function et(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=Xe[n];return r||(r=new Intl.DateTimeFormat(e,t),Xe[n]=r),r}var tt={};var nt={};function rt(e,t){void 0===t&&(t={});var n=t,r=(n.base,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(n,["base"])),i=JSON.stringify([e,r]),o=nt[i];return o||(o=new Intl.RelativeTimeFormat(e,t),nt[i]=o),o}var it=null;function ot(e,t,n,r,i){var o=e.listingMode(n);return"error"===o?null:"en"===o?r(t):i(t)}var at=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&J()){var r={useGrouping:!1};n.padTo>0&&(r.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=tt[n];return r||(r=new Intl.NumberFormat(e,t),tt[n]=r),r}(e,r)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return X(this.floor?Math.floor(e):ne(e,3),this.padTo)},e}(),ut=function(){function e(e,t,n){var r;if(this.opts=n,this.hasIntl=J(),e.zone.universal&&this.hasIntl){var i=e.offset/60*-1;i>=-14&&i<=12&&i%1==0?(r=i>=0?"Etc/GMT+"+i:"Etc/GMT"+i,this.dt=e):(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:sr.fromMillis(e.ts+60*e.offset*1e3))}else"local"===e.zone.type?this.dt=e:(this.dt=e,r=e.zone.name);if(this.hasIntl){var o=Object.assign({},this.opts);r&&(o.timeZone=r),this.dtf=et(t,o)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){switch(ve(B(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case ve(b):return"M/d/yyyy";case ve(S):return"LLL d, yyyy";case ve(O):return"EEE, LLL d, yyyy";case ve(T):return"LLLL d, yyyy";case ve(M):return"EEEE, LLLL d, yyyy";case ve(N):return"h:mm a";case ve(E):return"h:mm:ss a";case ve(D):case ve(I):return"h:mm a";case ve(V):return"HH:mm";case ve(L):return"HH:mm:ss";case ve(x):case ve(F):return"HH:mm";case ve(C):return"M/d/yyyy, h:mm a";case ve(j):return"LLL d, yyyy, h:mm a";case ve(_):return"LLLL d, yyyy, h:mm a";case ve(H):return"EEEE, LLLL d, yyyy, h:mm a";case ve(Z):return"M/d/yyyy, h:mm:ss a";case ve(A):return"LLL d, yyyy, h:mm:ss a";case ve(z):return"EEE, d LLL yyyy, h:mm a";case ve(q):return"LLLL d, yyyy, h:mm:ss a";case ve(U):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return"EEEE, LLLL d, yyyy, h:mm a"}}(this.opts),t=ct.create("en-US");return xe.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&Y()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),st=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&G()&&(this.rtf=rt(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var a="days"===e;switch(t){case 1:return a?"tomorrow":"next "+i[e][0];case-1:return a?"yesterday":"last "+i[e][0];case 0:return a?"today":"this "+i[e][0]}}var u=Object.is(t,-0)||t<0,s=Math.abs(t),c=1===s,l=i[e],f=r?c?l[1]:l[2]||l[1]:c?i[e][0]:e;return u?s+" "+f+" ago":"in "+s+" "+f}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),ct=function(){function e(e,t,n,r){var i=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,r=e.substring(0,t);try{n=et(e).resolvedOptions()}catch(e){n=et(r).resolvedOptions()}var i=n;return[r,i.numberingSystem,i.calendar]}(e),o=i[0],a=i[1],u=i[2];this.locale=o,this.numberingSystem=t||a||null,this.outputCalendar=n||u||null,this.intl=function(e,t,n){return J()?n||t?(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t),e):e:[]}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,n,r,i){void 0===i&&(i=!1);var o=t||Ke.defaultLocale;return new e(o||(i?"en-US":function(){if(it)return it;if(J()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return it=e&&"und"!==e?e:"en-US"}return it="en-US"}()),n||Ke.defaultNumberingSystem,r||Ke.defaultOutputCalendar,o)},e.resetCache=function(){it=null,Xe={},tt={},nt={}},e.fromObject=function(t){var n=void 0===t?{}:t,r=n.locale,i=n.numberingSystem,o=n.outputCalendar;return e.create(r,i,o)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=J()&&Y(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var r=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ot(this,e,n,ke,function(){var n=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return r.monthsCache[i][e]||(r.monthsCache[i][e]=function(e){for(var t=[],n=1;n<=12;n++){var r=sr.utc(2016,n,1);t.push(e(r))}return t}(function(e){return r.extract(e,n,"month")})),r.monthsCache[i][e]})},t.weekdays=function(e,t,n){var r=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ot(this,e,n,Te,function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return r.weekdaysCache[i][e]||(r.weekdaysCache[i][e]=function(e){for(var t=[],n=1;n<=7;n++){var r=sr.utc(2016,11,13+n);t.push(e(r))}return t}(function(e){return r.extract(e,n,"weekday")})),r.weekdaysCache[i][e]})},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),ot(this,void 0,e,function(){return Me},function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[sr.utc(2016,11,13,9),sr.utc(2016,11,13,19)].map(function(n){return t.extract(n,e,"dayperiod")})}return t.meridiemCache})},t.eras=function(e,t){var n=this;return void 0===t&&(t=!0),ot(this,e,t,Ie,function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[sr.utc(-40,1,1),sr.utc(2017,1,1)].map(function(e){return n.extract(e,t,"era")})),n.eraCache[e]})},t.extract=function(e,t,n){var r=this.dtFormatter(e,t).formatToParts().find(function(e){return e.type.toLowerCase()===n});return r?r.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new at(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new ut(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new st(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||J()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},n(e,[{key:"fastNumbers",get:function(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||J()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}();function lt(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r3?be.indexOf(e)+1:Se.indexOf(e)+1),u}var xt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ft(e){var t,n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],u=e[6],s=e[7],c=e[8],l=e[9],f=e[10],d=e[11],h=Lt(n,o,i,r,a,u,s);return t=c?Vt[c]:l?0:le(f,d),[h,new Re(t)]}var Ct=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Zt=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,jt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function At(e){var t=e[1],n=e[2],r=e[3];return[Lt(t,e[4],r,n,e[5],e[6],e[7]),Re.utcInstance]}function zt(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6];return[Lt(t,e[7],n,r,i,o,a),Re.utcInstance]}var _t=lt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,gt),qt=lt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,gt),Ht=lt(/(\d{4})-?(\d{3})/,gt),Ut=lt(vt),Rt=ft(Ot,Tt,Mt),Pt=ft(pt,Tt,Mt),Wt=ft(wt,Tt),Jt=ft(Tt,Mt);var Yt=ft(Tt);var Gt=lt(/(\d{4})-(\d\d)-(\d\d)/,bt),$t=lt(kt),Bt=ft(Ot,Tt,Mt,Nt),Qt=ft(Tt,Mt,Nt);var Kt={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Xt=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Kt),en=Object.assign({years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:30.436875/7,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Kt),tn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],nn=tn.slice(0).reverse();function rn(e,t,n){void 0===n&&(n=!1);var r={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new an(r)}function on(e,t,n,r,i){var o,a=e[i][n],u=t[n]/a,s=!(Math.sign(u)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(u)<=1?(o=u)<0?Math.floor(o):Math.ceil(o):Math.trunc(u);r[i]+=s,t[n]-=s*a}var an=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||ct.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?en:Xt,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!=typeof t)throw new v("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:de(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:ct.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var r=dt(t,[Dt,It])[0];if(r){var i=Object.assign(r,n);return e.fromObject(i)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.fromISOTime=function(t,n){var r=dt(t,[Et,Yt])[0];if(r){var i=Object.assign(r,n);return e.fromObject(i)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new v("need to specify a reason the Duration is invalid");var r=t instanceof Fe?t:new Fe(t,n);if(Ke.throwOnInvalid)throw new h(r);return new e({invalid:r})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new y(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?xe.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=ne(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||t>=864e5)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var n=this.shiftTo("hours","minutes","seconds","milliseconds"),r="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===n.seconds&&0===n.milliseconds||(r+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===n.milliseconds||(r+=".SSS"));var i=n.toFormat(r);return e.includePrefix&&(i="T"+i),i},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.toMillis=function(){return this.as("milliseconds")},t.valueOf=function(){return this.toMillis()},t.plus=function(e){if(!this.isValid)return this;for(var t,n=un(e),r={},i=c(tn);!(t=i()).done;){var o=t.value;(Q(n.values,o)||Q(this.values,o))&&(r[o]=n.get(o)+this.get(o))}return rn(this,{values:r},!0)},t.minus=function(e){if(!this.isValid)return this;var t=un(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n=0){i=f;var d=0;for(var h in u)d+=this.matrix[h][f]*u[h],u[h]=0;P(s[f])&&(d+=s[f]);var m=Math.trunc(d);for(var y in a[f]=m,u[f]=d-m,s)tn.indexOf(y)>tn.indexOf(f)&&on(this.matrix,s,y,a,f)}else P(s[f])&&(u[f]=s[f])}for(var v in u)0!==u[v]&&(a[i]+=v===i?u[v]:u[v]/this.matrix[i][v]);return rn(this,{values:a},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);te},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},t.set=function(t){var n=void 0===t?{}:t,r=n.start,i=n.end;return this.isValid?e.fromDateTimes(r||this.s,i||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var n=arguments.length,r=new Array(n),i=0;i+this.e?this.e:c;a.push(e.fromDateTimes(u,l)),u=l,s+=1}return a},t.splitBy=function(t){var n=un(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var r,i,o=this.s,a=[];o+this.e?this.e:r,a.push(e.fromDateTimes(o,i)),o=i;return a},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s=e.e)},t.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,r=this.er?null:e.fromDateTimes(n,r)},t.union=function(t){if(!this.isValid)return this;var n=this.st.e?this.e:t.e;return e.fromDateTimes(n,r)},e.merge=function(e){var t=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],r=e[1];return r?r.overlaps(t)||r.abutsStart(t)?[n,r.union(t)]:[n.concat([r]),t]:[n,t]},[[],null]),n=t[0],r=t[1];return r&&n.push(r),n},e.xor=function(t){for(var n,r,i=null,o=0,a=[],u=t.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),s=c((n=Array.prototype).concat.apply(n,u).sort(function(e,t){return e.time-t.time}));!(r=s()).done;){var l=r.value;1===(o+="s"===l.type?1:-1)?i=l.time:(i&&+i!=+l.time&&a.push(e.fromDateTimes(i,l.time)),i=null)}return e.merge(a)},t.difference=function(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i=0){var f;r=c;var d,h=l(e,t);(i=e.plus(((f={})[c]=h,f)))>t?(e=e.plus(((d={})[c]=h-1,d)),h-=1):e=i,o[c]=h}}return[e,o,i,r]}(e,t,n),o=i[0],a=i[1],u=i[2],s=i[3],c=t-o,l=n.filter(function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0});if(0===l.length){var f;if(u0?(d=an.fromMillis(c,r)).shiftTo.apply(d,l).plus(h):h}var mn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},yn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},vn=mn.hanidec.replace(/[\[|\]]/g,"").split("");function gn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+mn[n||"latn"]+t)}var pn="missing Intl.DateTimeFormat.formatToParts support";function wn(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(function(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n=a&&r<=u&&(t+=r-a)}}return parseInt(t,10)}return t}(n))}}}var kn="( |"+String.fromCharCode(160)+")",bn=new RegExp(kn,"g");function Sn(e){return e.replace(/\./g,"\\.?").replace(bn,kn)}function On(e){return e.replace(/\./g,"").replace(bn," ").toLowerCase()}function Tn(e,t){return null===e?null:{regex:RegExp(e.map(Sn).join("|")),deser:function(n){var r=n[0];return e.findIndex(function(e){return On(r)===On(e)})+t}}}function Mn(e,t){return{regex:e,deser:function(e){return le(e[1],e[2])},groups:t}}function Nn(e){return{regex:e,deser:function(e){return e[0]}}}var En={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};var Dn=null;function In(e,t){if(e.literal)return e;var n=xe.macroTokenToFormatOpts(e.val);if(!n)return e;var r=xe.create(t,n).formatDateTimeParts((Dn||(Dn=sr.fromMillis(1555555555555)),Dn)).map(function(e){return function(e,t,n){var r=e.type,i=e.value;if("literal"===r)return{literal:!0,val:i};var o=n[r],a=En[r];return"object"==typeof a&&(a=a[o]),a?{literal:!1,val:a}:void 0}(e,0,n)});return r.includes(void 0)?e:r}function Vn(e,t,n){var r=function(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map(function(e){return In(e,t)}))}(xe.parseFormat(n),e),i=r.map(function(t){return n=t,i=gn(r=e),o=gn(r,"{2}"),a=gn(r,"{3}"),u=gn(r,"{4}"),s=gn(r,"{6}"),c=gn(r,"{1,2}"),l=gn(r,"{1,3}"),f=gn(r,"{1,6}"),d=gn(r,"{1,9}"),h=gn(r,"{2,4}"),m=gn(r,"{4,6}"),y=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},(v=function(e){if(n.literal)return y(e);switch(e.val){case"G":return Tn(r.eras("short",!1),0);case"GG":return Tn(r.eras("long",!1),0);case"y":return wn(f);case"yy":return wn(h,se);case"yyyy":return wn(u);case"yyyyy":return wn(m);case"yyyyyy":return wn(s);case"M":return wn(c);case"MM":return wn(o);case"MMM":return Tn(r.months("short",!0,!1),1);case"MMMM":return Tn(r.months("long",!0,!1),1);case"L":return wn(c);case"LL":return wn(o);case"LLL":return Tn(r.months("short",!1,!1),1);case"LLLL":return Tn(r.months("long",!1,!1),1);case"d":return wn(c);case"dd":return wn(o);case"o":return wn(l);case"ooo":return wn(a);case"HH":return wn(o);case"H":return wn(c);case"hh":return wn(o);case"h":return wn(c);case"mm":return wn(o);case"m":case"q":return wn(c);case"qq":return wn(o);case"s":return wn(c);case"ss":return wn(o);case"S":return wn(l);case"SSS":return wn(a);case"u":return Nn(d);case"a":return Tn(r.meridiems(),0);case"kkkk":return wn(u);case"kk":return wn(h,se);case"W":return wn(c);case"WW":return wn(o);case"E":case"c":return wn(i);case"EEE":return Tn(r.weekdays("short",!1,!1),1);case"EEEE":return Tn(r.weekdays("long",!1,!1),1);case"ccc":return Tn(r.weekdays("short",!0,!1),1);case"cccc":return Tn(r.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Mn(new RegExp("([+-]"+c.source+")(?::("+o.source+"))?"),2);case"ZZZ":return Mn(new RegExp("([+-]"+c.source+")("+o.source+")?"),2);case"z":return Nn(/[a-z_+-/]{1,256}?/i);default:return y(e)}}(n)||{invalidReason:pn}).token=n,v;var n,r,i,o,a,u,s,c,l,f,d,h,m,y,v}),o=i.find(function(e){return e.invalidReason});if(o)return{input:t,tokens:r,invalidReason:o.invalidReason};var a=function(e){return["^"+e.map(function(e){return e.regex}).reduce(function(e,t){return e+"("+t.source+")"},"")+"$",e]}(i),u=a[0],s=a[1],c=RegExp(u,"i"),l=function(e,t,n){var r=e.match(t);if(r){var i={},o=1;for(var a in n)if(Q(n,a)){var u=n[a],s=u.groups?u.groups+1:1;!u.literal&&u.token&&(i[u.token.val[0]]=u.deser(r.slice(o,o+s))),o+=s}return[r,i]}return[r,{}]}(t,c,s),f=l[0],d=l[1],h=d?function(e){var t;return t=R(e.Z)?R(e.z)?null:He.create(e.z):new Re(e.Z),R(e.q)||(e.M=3*(e.q-1)+1),R(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),R(e.u)||(e.S=te(e.u)),[Object.keys(e).reduce(function(t,n){var r=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return r&&(t[r]=e[n]),t},{}),t]}(d):[null,null],y=h[0],v=h[1];if(Q(d,"a")&&Q(d,"H"))throw new m("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:c,rawMatches:f,matches:d,result:y,zone:v}}var Ln=[0,31,59,90,120,151,181,212,243,273,304,334],xn=[0,31,60,91,121,152,182,213,244,274,305,335];function Fn(e,t){return new Fe("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function Cn(e,t,n){var r=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===r?7:r}function Zn(e,t,n){return n+(re(e)?xn:Ln)[t-1]}function jn(e,t){var n=re(e)?xn:Ln,r=n.findIndex(function(e){return eue(n)?(t=n+1,u=1):t=n,Object.assign({weekYear:t,weekNumber:u,weekday:a},me(e))}function zn(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,o=Cn(n,1,4),a=ie(n),u=7*r+i-o-3;u<1?u+=ie(t=n-1):u>a?(t=n+1,u-=ie(n)):t=n;var s=jn(t,u),c=s.month,l=s.day;return Object.assign({year:t,month:c,day:l},me(e))}function _n(e){var t=e.year,n=Zn(t,e.month,e.day);return Object.assign({year:t,ordinal:n},me(e))}function qn(e){var t=e.year,n=jn(t,e.ordinal),r=n.month,i=n.day;return Object.assign({year:t,month:r,day:i},me(e))}function Hn(e){var t=W(e.year),n=K(e.month,1,12),r=K(e.day,1,oe(e.year,e.month));return t?n?!r&&Fn("day",e.day):Fn("month",e.month):Fn("year",e.year)}function Un(e){var t=e.hour,n=e.minute,r=e.second,i=e.millisecond,o=K(t,0,23)||24===t&&0===n&&0===r&&0===i,a=K(n,0,59),u=K(r,0,59),s=K(i,0,999);return o?a?u?!s&&Fn("millisecond",i):Fn("second",r):Fn("minute",n):Fn("hour",t)}function Rn(e){return new Fe("unsupported zone",'the zone "'+e.name+'" is not supported')}function Pn(e){return null===e.weekData&&(e.weekData=An(e.c)),e.weekData}function Wn(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new sr(Object.assign({},n,t,{old:n}))}function Jn(e,t,n){var r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;var o=n.offset(r);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}function Yn(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Gn(e,t,n){return Jn(ae(e),t,n)}function $n(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,oe(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),a=an.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),u=Jn(ae(o),n,e.zone),s=u[0],c=u[1];return 0!==a&&(s+=a,c=e.zone.offset(s)),{ts:s,o:c}}function Bn(e,t,n,r,i){var o=n.setZone,a=n.zone;if(e&&0!==Object.keys(e).length){var u=t||a,s=sr.fromObject(Object.assign(e,n,{zone:u,setZone:void 0}));return o?s:s.setZone(a)}return sr.invalid(new Fe("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function Qn(e,t,n){return void 0===n&&(n=!0),e.isValid?xe.create(ct.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Kn(e,t){var n=t.suppressSeconds,r=void 0!==n&&n,i=t.suppressMilliseconds,o=void 0!==i&&i,a=t.includeOffset,u=t.includePrefix,s=void 0!==u&&u,c=t.includeZone,l=void 0!==c&&c,f=t.spaceZone,d=void 0!==f&&f,h=t.format,m=void 0===h?"extended":h,y="basic"===m?"HHmm":"HH:mm";r&&0===e.second&&0===e.millisecond||(y+="basic"===m?"ss":":ss",o&&0===e.millisecond||(y+=".SSS")),(l||a)&&d&&(y+=" "),l?y+="z":a&&(y+="basic"===m?"ZZZ":"ZZ");var v=Qn(e,y);return s&&(v="T"+v),v}var Xn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},er={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},tr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},nr=["year","month","day","hour","minute","second","millisecond"],rr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ir=["year","ordinal","hour","minute","second","millisecond"];function or(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new y(e);return t}function ar(e,t){for(var n,r=c(nr);!(n=r()).done;){var i=n.value;R(e[i])&&(e[i]=Xn[i])}var o=Hn(e)||Un(e);if(o)return sr.invalid(o);var a=Ke.now(),u=Gn(e,t.offset(a),t),s=u[0],l=u[1];return new sr({ts:s,zone:t,o:l})}function ur(e,t,n){var r=!!R(n.round)||n.round,i=function(e,i){return e=ne(e,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,i)},o=function(r){return n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r)};if(n.unit)return i(o(n.unit),n.unit);for(var a,u=c(n.units);!(a=u()).done;){var s=a.value,l=o(s);if(Math.abs(l)>=1)return i(l,s)}return i(0,n.units[n.units.length-1])}var sr=function(){function e(e){var t=e.zone||Ke.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Fe("invalid input"):null)||(t.isValid?null:Rn(t));this.ts=R(e.ts)?Ke.now():e.ts;var r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var o=[e.old.c,e.old.o];r=o[0],i=o[1]}else{var a=t.offset(this.ts);r=Yn(this.ts,a),r=(n=Number.isNaN(r.year)?new Fe("invalid input"):null)?null:r,i=n?null:a}this._zone=t,this.loc=e.loc||ct.create(),this.invalid=n,this.weekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}e.now=function(){return new e({})},e.local=function(t,n,r,i,o,a,u){return R(t)?new e({}):ar({year:t,month:n,day:r,hour:i,minute:o,second:a,millisecond:u},Ke.defaultZone)},e.utc=function(t,n,r,i,o,a,u){return R(t)?new e({ts:Ke.now(),zone:Re.utcInstance}):ar({year:t,month:n,day:r,hour:i,minute:o,second:a,millisecond:u},Re.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var r,i=(r=t,"[object Date]"===Object.prototype.toString.call(r)?t.valueOf():NaN);if(Number.isNaN(i))return e.invalid("invalid input");var o=We(n.zone,Ke.defaultZone);return o.isValid?new e({ts:i,zone:o,loc:ct.fromObject(n)}):e.invalid(Rn(o))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),P(t))return t<-864e13||t>864e13?e.invalid("Timestamp out of range"):new e({ts:t,zone:We(n.zone,Ke.defaultZone),loc:ct.fromObject(n)});throw new v("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),P(t))return new e({ts:1e3*t,zone:We(n.zone,Ke.defaultZone),loc:ct.fromObject(n)});throw new v("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=We(t.zone,Ke.defaultZone);if(!n.isValid)return e.invalid(Rn(n));var r=Ke.now(),i=n.offset(r),o=de(t,or,["zone","locale","outputCalendar","numberingSystem"]),a=!R(o.ordinal),u=!R(o.year),s=!R(o.month)||!R(o.day),l=u||s,f=o.weekYear||o.weekNumber,d=ct.fromObject(t);if((l||a)&&f)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&a)throw new m("Can't mix ordinal dates with month/day");var h,y,v=f||o.weekday&&!l,g=Yn(r,i);v?(h=rr,y=er,g=An(g)):a?(h=ir,y=tr,g=_n(g)):(h=nr,y=Xn);for(var p,w=!1,k=c(h);!(p=k()).done;){var b=p.value;R(o[b])?o[b]=w?y[b]:g[b]:w=!0}var S=(v?function(e){var t=W(e.weekYear),n=K(e.weekNumber,1,ue(e.weekYear)),r=K(e.weekday,1,7);return t?n?!r&&Fn("weekday",e.weekday):Fn("week",e.week):Fn("weekYear",e.weekYear)}(o):a?function(e){var t=W(e.year),n=K(e.ordinal,1,ie(e.year));return t?!n&&Fn("ordinal",e.ordinal):Fn("year",e.year)}(o):Hn(o))||Un(o);if(S)return e.invalid(S);var O=Gn(v?zn(o):a?qn(o):o,i,n),T=new e({ts:O[0],zone:n,o:O[1],loc:d});return o.weekday&&l&&t.weekday!==T.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+T.toISO()):T},e.fromISO=function(e,t){void 0===t&&(t={});var n=dt(e,[_t,Rt],[qt,Pt],[Ht,Wt],[Ut,Jt]);return Bn(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=dt(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[xt,Ft]);return Bn(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=dt(e,[Ct,At],[Zt,At],[jt,zt]);return Bn(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,r){if(void 0===r&&(r={}),R(t)||R(n))throw new v("fromFormat requires an input string and a format");var i=r,o=i.locale,a=void 0===o?null:o,u=i.numberingSystem,s=void 0===u?null:u,c=function(e,t,n){var r=Vn(e,t,n);return[r.result,r.zone,r.invalidReason]}(ct.fromOpts({locale:a,numberingSystem:s,defaultToEN:!0}),t,n),l=c[0],f=c[1],d=c[2];return d?e.invalid(d):Bn(l,f,r,"format "+n,t)},e.fromString=function(t,n,r){return void 0===r&&(r={}),e.fromFormat(t,n,r)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=dt(e,[Gt,Bt],[$t,Qt]);return Bn(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new v("need to specify a reason the DateTime is invalid");var r=t instanceof Fe?t:new Fe(t,n);if(Ke.throwOnInvalid)throw new f(r);return new e({invalid:r})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=xe.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(Re.instance(e),t)},t.toLocal=function(){return this.setZone(Ke.defaultZone)},t.setZone=function(t,n){var r=void 0===n?{}:n,i=r.keepLocalTime,o=void 0!==i&&i,a=r.keepCalendarTime,u=void 0!==a&&a;if((t=We(t,Ke.defaultZone)).equals(this.zone))return this;if(t.isValid){var s=this.ts;if(o||u){var c=t.offset(this.ts);s=Gn(this.toObject(),c,t)[0]}return Wn(this,{ts:s,zone:t})}return e.invalid(Rn(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.outputCalendar;return Wn(this,{loc:this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i})})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,n=de(e,or,[]);!R(n.weekYear)||!R(n.weekNumber)||!R(n.weekday)?t=zn(Object.assign(An(this.c),n)):R(n.ordinal)?(t=Object.assign(this.toObject(),n),R(n.day)&&(t.day=Math.min(oe(t.year,t.month),t.day))):t=qn(Object.assign(_n(this.c),n));var r=Gn(t,this.o,this.zone);return Wn(this,{ts:r[0],o:r[1]})},t.plus=function(e){return this.isValid?Wn(this,$n(this,un(e))):this},t.minus=function(e){return this.isValid?Wn(this,$n(this,un(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=an.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){var r=Math.ceil(this.month/3);t.month=3*(r-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?xe.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):"Invalid DateTime"},t.toLocaleString=function(e){return void 0===e&&(e=b),this.isValid?xe.create(this.loc.clone(e),e).formatDateTime(this):"Invalid DateTime"},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?xe.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n="basic"===(void 0===t?"extended":t)?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),Qn(this,n)},t.toISOWeekDate=function(){return Qn(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,r=void 0!==n&&n,i=t.suppressSeconds,o=void 0!==i&&i,a=t.includeOffset,u=void 0===a||a,s=t.includePrefix,c=void 0!==s&&s,l=t.format;return Kn(this,{suppressSeconds:o,suppressMilliseconds:r,includeOffset:u,includePrefix:c,format:void 0===l?"extended":l})},t.toRFC2822=function(){return Qn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return Qn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return Qn(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,r=void 0===n||n,i=t.includeZone;return Kn(this,{includeOffset:r,includeZone:void 0!==i&&i,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():"Invalid DateTime"},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return an.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var r,i=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),o=(r=t,Array.isArray(r)?r:[r]).map(an.normalizeUnit),a=e.valueOf()>this.valueOf(),u=hn(a?this:e,a?e:this,o,i);return a?u.negate():u},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.now(),t,n)},t.until=function(e){return this.isValid?ln.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(t)<=n&&n<=r.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),r=t.padding?thisthis.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return re(this.year)}},{key:"daysInMonth",get:function(){return oe(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?ie(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?ue(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return b}},{key:"DATE_MED",get:function(){return S}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return O}},{key:"DATE_FULL",get:function(){return T}},{key:"DATE_HUGE",get:function(){return M}},{key:"TIME_SIMPLE",get:function(){return N}},{key:"TIME_WITH_SECONDS",get:function(){return E}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return D}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return I}},{key:"TIME_24_SIMPLE",get:function(){return V}},{key:"TIME_24_WITH_SECONDS",get:function(){return L}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return x}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return F}},{key:"DATETIME_SHORT",get:function(){return C}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return Z}},{key:"DATETIME_MED",get:function(){return j}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return A}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return z}},{key:"DATETIME_FULL",get:function(){return _}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return q}},{key:"DATETIME_HUGE",get:function(){return H}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return U}}]),e}();function cr(e){if(sr.isDateTime(e))return e;if(e&&e.valueOf&&P(e.valueOf()))return sr.fromJSDate(e);if(e&&"object"==typeof e)return sr.fromObject(e);throw new v("Unknown datetime argument: "+e+", of type "+typeof e)}return e.DateTime=sr,e.Duration=an,e.FixedOffsetZone=Re,e.IANAZone=He,e.Info=fn,e.Interval=ln,e.InvalidZone=Pe,e.LocalZone=je,e.Settings=Ke,e.VERSION="1.26.0",e.Zone=Ce,e}({}); \ No newline at end of file diff --git a/webassets/vue-multiselect.min.css b/webassets/vue-multiselect.min.css new file mode 100644 index 0000000..d63b497 --- /dev/null +++ b/webassets/vue-multiselect.min.css @@ -0,0 +1,402 @@ +fieldset[disabled] .multiselect { + pointer-events: none; +} +.multiselect__spinner { + position: absolute; + right: 1px; + top: 1px; + width: 48px; + height: 35px; + background: #fff; + display: block; +} +.multiselect__spinner:after, +.multiselect__spinner:before { + position: absolute; + content: ""; + top: 50%; + left: 50%; + margin: -8px 0 0 -8px; + width: 16px; + height: 16px; + border-radius: 100%; + border-color: #41b883 transparent transparent; + border-style: solid; + border-width: 2px; + box-shadow: 0 0 0 1px transparent; +} +.multiselect__spinner:before { + animation: a 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62); + animation-iteration-count: infinite; +} +.multiselect__spinner:after { + animation: a 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8); + animation-iteration-count: infinite; +} +.multiselect__loading-enter-active, +.multiselect__loading-leave-active { + transition: opacity 0.4s ease-in-out; + opacity: 1; +} +.multiselect__loading-enter, +.multiselect__loading-leave-active { + opacity: 0; +} +.multiselect, +.multiselect__input, +.multiselect__single { + font-family: inherit; + font-size: 16px; + -ms-touch-action: manipulation; + touch-action: manipulation; +} +.multiselect { + box-sizing: content-box; + display: block; + position: relative; + width: 100%; + min-height: 40px; + text-align: left; + color: #35495e; +} +.multiselect * { + box-sizing: border-box; +} +.multiselect:focus { + outline: none; +} +.multiselect--disabled { + opacity: 0.6; +} +.multiselect--active { + z-index: 1; +} +.multiselect--active:not(.multiselect--above) .multiselect__current, +.multiselect--active:not(.multiselect--above) .multiselect__input, +.multiselect--active:not(.multiselect--above) .multiselect__tags { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} +.multiselect--active .multiselect__select { + transform: rotate(180deg); +} +.multiselect--above.multiselect--active .multiselect__current, +.multiselect--above.multiselect--active .multiselect__input, +.multiselect--above.multiselect--active .multiselect__tags { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.multiselect__input, +.multiselect__single { + position: relative; + display: inline-block; + min-height: 20px; + line-height: 20px; + border: none; + border-radius: 5px; + padding: 0 0 0 5px; + width: 100%; + transition: border 0.1s ease; + box-sizing: border-box; + margin-bottom: 8px; + vertical-align: top; +} +.multiselect__input::-webkit-input-placeholder { + color: #35495e; +} +.multiselect__input:-ms-input-placeholder { + color: #35495e; +} +.multiselect__input::placeholder { + color: #35495e; +} +.multiselect__tag ~ .multiselect__input, +.multiselect__tag ~ .multiselect__single { + width: auto; +} +.multiselect__input:hover, +.multiselect__single:hover { + border-color: #cfcfcf; +} +.multiselect__input:focus, +.multiselect__single:focus { + border-color: #a8a8a8; + outline: none; +} +.multiselect__single { + padding-left: 5px; + margin-bottom: 8px; +} +.multiselect__tags-wrap { + display: inline; +} +.multiselect__tags { + min-height: 40px; + display: block; + padding: 8px 40px 0 8px; + border-radius: 5px; + border: 1px solid #e8e8e8; + + font-size: 14px; +} +.multiselect__tag { + position: relative; + display: inline-block; + padding: 4px 26px 4px 10px; + border-radius: 5px; + margin-right: 10px; + color: #fff; + line-height: 1; + /* background: #41b883; */ + margin-bottom: 5px; + white-space: nowrap; + overflow: hidden; + max-width: 100%; + text-overflow: ellipsis; +} +.multiselect__tag-icon { + cursor: pointer; + margin-left: 7px; + position: absolute; + right: 0; + top: 0; + bottom: 0; + font-weight: 700; + font-style: normal; + width: 22px; + text-align: center; + line-height: 22px; + transition: all 0.2s ease; + border-radius: 5px; +} +.multiselect__tag-icon:after { + content: "\D7"; + color: #266d4d; + font-size: 14px; +} +.multiselect__tag-icon:focus, +.multiselect__tag-icon:hover { + background: #369a6e; +} +.multiselect__tag-icon:focus:after, +.multiselect__tag-icon:hover:after { + color: #fff; +} +.multiselect__current { + min-height: 40px; + overflow: hidden; + padding: 8px 12px 0; + padding-right: 30px; + white-space: nowrap; + border-radius: 5px; + border: 1px solid #e8e8e8; +} +.multiselect__current, +.multiselect__select { + line-height: 16px; + box-sizing: border-box; + display: block; + margin: 0; + text-decoration: none; + cursor: pointer; +} +.multiselect__select { + position: absolute; + width: 40px; + height: 38px; + right: 1px; + top: 1px; + padding: 4px 8px; + text-align: center; + transition: transform 0.2s ease; +} +.multiselect__select:before { + position: relative; + right: 0; + top: 65%; + color: #999; + margin-top: 4px; + border-style: solid; + border-width: 5px 5px 0; + border-color: #999 transparent transparent; + content: ""; +} +.multiselect__placeholder { + color: #adadad; + display: inline-block; + margin-bottom: 10px; + padding-top: 2px; +} +.multiselect--active .multiselect__placeholder { + display: none; +} +.multiselect__content-wrapper { + position: absolute; + display: block; + background: #fff; + width: 100%; + max-height: 240px; + overflow: auto; + border: 1px solid #e8e8e8; + border-top: none; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + z-index: 1; + -webkit-overflow-scrolling: touch; +} +.multiselect__content { + list-style: none; + display: inline-block; + padding: 0; + margin: 0; + min-width: 100%; + vertical-align: top; +} +.multiselect--above .multiselect__content-wrapper { + bottom: 100%; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + border-bottom: none; + border-top: 1px solid #e8e8e8; +} +.multiselect__content::webkit-scrollbar { + display: none; +} +.multiselect__element { + display: block; +} +.multiselect__option { + display: block; + padding: 12px; + min-height: 40px; + line-height: 16px; + text-decoration: none; + text-transform: none; + vertical-align: middle; + position: relative; + cursor: pointer; + white-space: nowrap; +} +.multiselect__option:after { + top: 0; + right: 0; + position: absolute; + line-height: 40px; + padding-right: 12px; + padding-left: 20px; + font-size: 13px; +} +.multiselect__option--highlight { + /* background: #41b883; */ + outline: none; + color: #fff; +} +.multiselect__option--highlight:after { + content: attr(data-select); + /* background: #41b883; */ + color: #fff; +} +.multiselect__option--selected { + /* background: #f3f3f3; + color: #35495e; */ + font-weight: 700; +} +.multiselect__option--selected:after { + content: attr(data-selected); + color: silver; +} +.multiselect__option--selected.multiselect__option--highlight { + /* background: #cccccc; */ + /* color: #fff; */ +} +.multiselect__option--selected.multiselect__option--highlight:after { + /* background: #cccccc; */ + content: attr(data-deselect); + /* color: #fff; */ +} +.multiselect--disabled { + background: #ededed; + pointer-events: none; +} +.multiselect--disabled .multiselect__current, +.multiselect--disabled .multiselect__select, +.multiselect__option--disabled { + background: #ededed; + color: #a6a6a6; +} +.multiselect__option--disabled { + cursor: text; + pointer-events: none; +} +.multiselect__option--group { + background: #ededed; + color: #35495e; +} +.multiselect__option--group.multiselect__option--highlight { + background: #35495e; + color: #fff; +} +.multiselect__option--group.multiselect__option--highlight:after { + background: #35495e; +} +.multiselect__option--disabled.multiselect__option--highlight { + background: #dedede; +} +.multiselect__option--group-selected.multiselect__option--highlight { + background: #ff6a6a; + color: #fff; +} +.multiselect__option--group-selected.multiselect__option--highlight:after { + background: #ff6a6a; + content: attr(data-deselect); + color: #fff; +} +.multiselect-enter-active, +.multiselect-leave-active { + transition: all 0.15s ease; +} +.multiselect-enter, +.multiselect-leave-active { + opacity: 0; +} +.multiselect__strong { + margin-bottom: 8px; + line-height: 20px; + display: inline-block; + vertical-align: top; +} +[dir="rtl"] .multiselect { + text-align: right; +} +[dir="rtl"] .multiselect__select { + right: auto; + left: 1px; +} +[dir="rtl"] .multiselect__tags { + padding: 8px 8px 0 40px; +} +[dir="rtl"] .multiselect__content { + text-align: right; +} +[dir="rtl"] .multiselect__option:after { + right: auto; + left: 0; +} +[dir="rtl"] .multiselect__clear { + right: auto; + left: 12px; +} +[dir="rtl"] .multiselect__spinner { + right: auto; + left: 1px; +} +@keyframes a { + 0% { + transform: rotate(0); + } + to { + transform: rotate(2turn); + } +} diff --git a/webassets/vue-multiselect.min.js b/webassets/vue-multiselect.min.js new file mode 100644 index 0000000..e1aeeb1 --- /dev/null +++ b/webassets/vue-multiselect.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueMultiselect=e():t.VueMultiselect=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=66)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){t.exports=!n(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(10),r=n(43),o=n(31),s=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(77),r=n(21);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(9),r=n(52),o=n(18),s=n(55),u=n(53),a=function(t,e,n){var l,c,f,p,h=t&a.F,d=t&a.G,v=t&a.S,y=t&a.P,g=t&a.B,b=d?i:v?i[e]||(i[e]={}):(i[e]||{}).prototype,m=d?r:r[e]||(r[e]={}),_=m.prototype||(m.prototype={});d&&(n=e);for(l in n)c=!h&&b&&void 0!==b[l],f=(c?b:n)[l],p=g&&c?u(f,i):y&&"function"==typeof f?u(Function.call,f):f,b&&s(b,l,f,t&a.U),m[l]!=f&&o(m,l,p),y&&_[l]!=f&&(_[l]=f)};i.core=r,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var i=n(3),r=n(15);t.exports=n(1)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(29)("wks"),r=n(16),o=n(0).Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var i=n(13);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var i=n(48),r=n(22);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(109),r=n(110);t.exports=n(35)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var i=n(8);t.exports=function(t,e){return!!t&&i(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(0),r=n(11),o=n(74),s=n(6),u=function(t,e,n){var a,l,c,f=t&u.F,p=t&u.G,h=t&u.S,d=t&u.P,v=t&u.B,y=t&u.W,g=p?r:r[e]||(r[e]={}),b=g.prototype,m=p?i:h?i[e]:(i[e]||{}).prototype;p&&(n=e);for(a in n)(l=!f&&m&&void 0!==m[a])&&a in g||(c=l?m[a]:n[a],g[a]=p&&"function"!=typeof m[a]?n[a]:v&&l?o(c,i):y&&m[a]==c?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(c):d&&"function"==typeof c?o(Function.call,c):c,d&&((g.virtual||(g.virtual={}))[a]=c,t&u.R&&b&&!b[a]&&s(b,a,c)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){t.exports={}},function(t,e){t.exports=!0},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(3).f,r=n(2),o=n(7)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){var i=n(29)("keys"),r=n(16);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e,n){var i=n(0),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(13);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var i=n(0),r=n(11),o=n(25),s=n(33),u=n(3).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:s.f(t)})}},function(t,e,n){e.f=n(7)},function(t,e,n){var i=n(53),r=n(36),o=n(57),s=n(37),u=n(104);t.exports=function(t,e){var n=1==t,a=2==t,l=3==t,c=4==t,f=6==t,p=5==t||f,h=e||u;return function(e,u,d){for(var v,y,g=o(e),b=r(g),m=i(u,d,3),_=s(b.length),x=0,w=n?h(e,_):a?h(e,0):void 0;_>x;x++)if((p||x in b)&&(v=b[x],y=m(v,x,g),t))if(n)w[x]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(c)return!1;return f?-1:l||c?c:w}}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(51);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(56),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(111)("wks"),r=n(58),o=n(9).Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},function(t,e,n){"use strict";function i(t){return 0!==t&&(!(!Array.isArray(t)||0!==t.length)||!t)}function r(t){return function(){return!t.apply(void 0,arguments)}}function o(t,e){return void 0===t&&(t="undefined"),null===t&&(t="null"),!1===t&&(t="false"),-1!==t.toString().toLowerCase().indexOf(e.trim())}function s(t,e,n,i){return t.filter(function(t){return o(i(t,n),e)})}function u(t){return t.filter(function(t){return!t.$isLabel})}function a(t,e){return function(n){return n.reduce(function(n,i){return i[t]&&i[t].length?(n.push({$groupLabel:i[e],$isLabel:!0}),n.concat(i[t])):n},[])}}function l(t,e,n,i,r){return function(o){return o.map(function(o){var u;if(!o[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];var a=s(o[n],t,e,r);return a.length?(u={},v()(u,i,o[i]),v()(u,n,a),u):[]})}}var c=n(65),f=n.n(c),p=n(59),h=(n.n(p),n(122)),d=(n.n(h),n(64)),v=n.n(d),y=n(120),g=(n.n(y),n(121)),b=(n.n(g),n(117)),m=(n.n(b),n(123)),_=(n.n(m),n(118)),x=(n.n(_),n(119)),w=(n.n(x),function(){for(var t=arguments.length,e=new Array(t),n=0;n-1},isSelected:function(t){var e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},getOptionLabel:function(t){if(i(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;var e=this.customLabel(t,this.label);return i(e)?"":e},select:function(t,e){if(t.$isLabel&&this.groupSelect)return void this.selectGroup(t);if(!(-1!==this.blockKeys.indexOf(e)||this.disabled||t.$isDisabled||t.$isLabel)&&(!this.max||!this.multiple||this.internalValue.length!==this.max)&&("Tab"!==e||this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t))return void("Tab"!==e&&this.removeElement(t));this.$emit("select",t,this.id),this.multiple?this.$emit("input",this.internalValue.concat([t]),this.id):this.$emit("input",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup:function(t){var e=this,n=this.options.find(function(n){return n[e.groupLabel]===t.$groupLabel});if(n)if(this.wholeGroupSelected(n)){this.$emit("remove",n[this.groupValues],this.id);var i=this.internalValue.filter(function(t){return-1===n[e.groupValues].indexOf(t)});this.$emit("input",i,this.id)}else{var o=n[this.groupValues].filter(r(this.isSelected));this.$emit("select",o,this.id),this.$emit("input",this.internalValue.concat(o),this.id)}},wholeGroupSelected:function(t){return t[this.groupValues].every(this.isSelected)},removeElement:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.disabled){if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();var n="object"===f()(t)?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.$emit("remove",t,this.id),this.multiple){var i=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("input",i,this.id)}else this.$emit("input",null,this.id);this.closeOnSelect&&e&&this.deactivate()}},removeLastElement:function(){-1===this.blockKeys.indexOf("Delete")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate:function(){var t=this;this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.$nextTick(function(){return t.$refs.search.focus()})):this.$el.focus(),this.$emit("open",this.id))},deactivate:function(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search.blur():this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle:function(){this.isOpen?this.deactivate():this.activate()},adjustPosition:function(){if("undefined"!=typeof window){var t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||"below"===this.openDirection||"bottom"===this.openDirection?(this.prefferedOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.prefferedOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))}}}}},function(t,e,n){"use strict";var i=n(59);n.n(i);e.a={data:function(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition:function(){return this.pointer*this.optionHeight},visibleElements:function(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions:function(){this.pointerAdjust()},isOpen:function(){this.pointerDirty=!1}},methods:{optionHighlight:function(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight:function(t,e){var n=this;if(!this.groupSelect)return["multiselect__option--disabled"];var i=this.options.find(function(t){return t[n.groupLabel]===e.$groupLabel});return[this.groupSelect?"multiselect__option--group":"multiselect__option--disabled",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(i)}]},addPointerElement:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Enter",e=t.key;this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward:function(){this.pointer0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset:function(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust:function(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet:function(t){this.pointer=t,this.pointerDirty=!0}}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(13),r=n(0).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){t.exports=!n(1)&&!n(12)(function(){return 7!=Object.defineProperty(n(42)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var i=n(25),r=n(23),o=n(49),s=n(6),u=n(2),a=n(24),l=n(79),c=n(27),f=n(86),p=n(7)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,v,y,g,b){l(n,e,v);var m,_,x,w=function(t){if(!h&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",O="values"==y,L=!1,P=t.prototype,k=P[p]||P["@@iterator"]||y&&P[y],E=k||w(y),j=y?O?w("entries"):E:void 0,V="Array"==e?P.entries||k:k;if(V&&(x=f(V.call(new t)))!==Object.prototype&&(c(x,S,!0),i||u(x,p)||s(x,p,d)),O&&k&&"values"!==k.name&&(L=!0,E=function(){return k.call(this)}),i&&!b||!h&&!L&&P[p]||s(P,p,E),a[e]=E,a[S]=d,y)if(m={values:O?E:w("values"),keys:g?E:w("keys"),entries:j},b)for(_ in m)_ in P||o(P,_,m[_]);else r(r.P+r.F*(h||L),e,m);return m}},function(t,e,n){var i=n(10),r=n(83),o=n(22),s=n(28)("IE_PROTO"),u=function(){},a=function(){var t,e=n(42)("iframe"),i=o.length;for(e.style.display="none",n(76).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("