diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index dc63e89e..1d9d3c07 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -1,4 +1,4 @@ -name: Code coverage +name: CI on: pull_request: null push: @@ -11,7 +11,7 @@ jobs: matrix: php: ['7.4'] - name: PHP ${{ matrix.php }} + name: Coverage - PHP ${{ matrix.php }} steps: - uses: actions/checkout@v2 - uses: shivammathur/setup-php@v1 diff --git a/.github/workflows/linting.yaml b/.github/workflows/linting.yaml index a2b2c23a..0edc80b9 100644 --- a/.github/workflows/linting.yaml +++ b/.github/workflows/linting.yaml @@ -1,4 +1,4 @@ -name: Code Styles +name: CI on: pull_request: null push: @@ -11,7 +11,7 @@ jobs: matrix: php: ['7.4'] - name: PHP ${{ matrix.php }} + name: Linting - PHP ${{ matrix.php }} steps: - uses: actions/checkout@v2 - uses: shivammathur/setup-php@v1 diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 9b8dffec..921d3af9 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -1,4 +1,4 @@ -name: Tests & Migrations +name: CI on: pull_request: null push: @@ -21,7 +21,7 @@ jobs: matrix: php: ['7.2', '7.3', '7.4'] - name: PHP ${{ matrix.php }} + name: Tests - PHP ${{ matrix.php }} steps: - uses: actions/checkout@v2 - uses: shivammathur/setup-php@v1 diff --git a/README.md b/README.md index e1eab051..7da7eb45 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Kimai 2 - online time-tracker +[](https://github.com/kevinpapst/kimai2/actions) +[](https://codecov.io/gh/kevinpapst/kimai2) [](https://packagist.org/packages/kevinpapst/kimai2) [](https://packagist.org/packages/kevinpapst/kimai2) -[](https://travis-ci.org/kevinpapst/kimai2) -[](https://codecov.io/gh/kevinpapst/kimai2) [](https://gitter.im/kimai2/support) [](https://www.bountysource.com/teams/kimai2) @@ -20,8 +20,8 @@ It is built with modern technologies such as Symfony, Bootstrap, RESTful API, Do ### Requirements -- PHP 7.2 or higher -- Database (MySQL/MariaDB with timezone data, SQLite for development) +- PHP 7.2.9 or higher +- Database (MySQL/MariaDB, SQLite for development) - Webserver (nginx, Apache) - A modern browser - [Other libraries](https://www.kimai.org/download/) @@ -32,7 +32,7 @@ This is the new version of the open source timetracker Kimai. It is stable and p with most advanced features from Kimai 1 and many new ones, including but not limited to: JSON API, invoicing, data exports, multi-timer and punch-in punch-out mode, tagging, multi-user and multi-timezones, -LDAP and built-in authentication, customizable role permissions, responsive and ready for your mobile device, +authentication via SAML/LDAP/Database, customizable role permissions, responsive and ready for your mobile device, hourly and fixed rates, advanced filtering, money and time budgets with report, support for plugins and many more. ## Installation diff --git a/assets/js/widgets/KimaiReloadPageWidget.js b/assets/js/widgets/KimaiReloadPageWidget.js index 1d6c536d..5ada6d79 100644 --- a/assets/js/widgets/KimaiReloadPageWidget.js +++ b/assets/js/widgets/KimaiReloadPageWidget.js @@ -59,6 +59,7 @@ export default class KimaiReloadPageWidget { jQuery('section.content').replaceWith( jQuery(response).find('section.content') ); + document.dispatchEvent(new Event('kimai.reloadPage')); self._hideOverlay(); }, dataType: 'html', diff --git a/config/serializer/App/Entity.Activity.yml b/config/serializer/App/Entity.Activity.yml index 5d257e56..a9a37378 100644 --- a/config/serializer/App/Entity.Activity.yml +++ b/config/serializer/App/Entity.Activity.yml @@ -1,6 +1,6 @@ App\Entity\Activity: exclusion_policy: All - custom_accessor_order: [id, name, comment, visible, project, fixedRate, hourlyRate, color, budget, timeBudget, metaFields, parentTitle] + custom_accessor_order: [id, name, comment, visible, project, color, budget, timeBudget, metaFields, parentTitle] properties: id: include: true @@ -20,12 +20,6 @@ App\Entity\Activity: timeBudget: include: true groups: [Entity] - fixedRate: - include: true - groups: [Activity] - hourlyRate: - include: true - groups: [Activity] project: include: false exclude: true diff --git a/config/serializer/App/Entity.Customer.yml b/config/serializer/App/Entity.Customer.yml index 6d859783..cc6caebb 100644 --- a/config/serializer/App/Entity.Customer.yml +++ b/config/serializer/App/Entity.Customer.yml @@ -1,6 +1,6 @@ App\Entity\Customer: exclusion_policy: All - custom_accessor_order: [id, name, number, comment, visible, company, contact, address, country, currency, phone, fax, mobile, email, homepage, timezone, fixedRate, hourlyRate, color, budget, timeBudget, metaFields, teams] + custom_accessor_order: [id, name, number, comment, visible, company, contact, address, country, currency, phone, fax, mobile, email, homepage, timezone, color, budget, timeBudget, metaFields, teams] properties: id: include: true @@ -53,12 +53,6 @@ App\Entity\Customer: timezone: include: true groups: [Entity] - fixedRate: - include: true - groups: [Customer] - hourlyRate: - include: true - groups: [Customer] color: include: true metaFields: diff --git a/config/serializer/App/Entity.Project.yml b/config/serializer/App/Entity.Project.yml index 4ba95ac6..1f334208 100644 --- a/config/serializer/App/Entity.Project.yml +++ b/config/serializer/App/Entity.Project.yml @@ -1,6 +1,6 @@ App\Entity\Project: exclusion_policy: All - custom_accessor_order: [id, name, comment, visible, orderNumber, orderDate, customer, start, end, fixedRate, hourlyRate, color, budget, timeBudget, metaFields, parentTitle, teams] + custom_accessor_order: [id, name, comment, visible, orderNumber, orderDate, customer, start, end, color, budget, timeBudget, metaFields, parentTitle, teams] properties: id: include: true @@ -29,12 +29,6 @@ App\Entity\Project: end: include: true groups: [Project] - fixedRate: - include: true - groups: [Project] - hourlyRate: - include: true - groups: [Project] customer: groups: [Subresource] color: diff --git a/config/services.yaml b/config/services.yaml index 04f272b6..a083c0d1 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -211,3 +211,18 @@ services: App\Repository\InvoiceDocumentRepository: class: App\Repository\InvoiceDocumentRepository arguments: ['%kimai.invoice.documents%'] + + App\Repository\CustomerRateRepository: + class: Doctrine\ORM\EntityRepository + factory: ['@doctrine.orm.entity_manager', getRepository] + arguments: ['App\Entity\CustomerRate'] + + App\Repository\ActivityRateRepository: + class: Doctrine\ORM\EntityRepository + factory: ['@doctrine.orm.entity_manager', getRepository] + arguments: ['App\Entity\ActivityRate'] + + App\Repository\ProjectRateRepository: + class: Doctrine\ORM\EntityRepository + factory: ['@doctrine.orm.entity_manager', getRepository] + arguments: ['App\Entity\ProjectRate'] diff --git a/public/build/app.480acc52.js b/public/build/app.480acc52.js deleted file mode 100644 index 67566eab..00000000 --- a/public/build/app.480acc52.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([["app"],{"+2oP":function(t,e,n){"use strict";var i=n("I+eb"),o=n("hh1v"),r=n("6LWA"),a=n("I8vh"),s=n("UMSQ"),l=n("/GqU"),c=n("hBjN"),u=n("tiKp"),d=n("Hd5f"),f=n("rkAj"),h=d("slice"),p=f("slice",{ACCESSORS:!0,0:0,1:2}),m=u("species"),g=[].slice,v=Math.max;i({target:"Array",proto:!0,forced:!h||!p},{slice:function(t,e){var n,i,u,d=l(this),f=s(d.length),h=a(t,f),p=a(void 0===e?f:e,f);if(r(d)&&("function"!=typeof(n=d.constructor)||n!==Array&&!r(n.prototype)?o(n)&&null===(n=n[m])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(d,h,p);for(i=new(void 0===n?Array:n)(v(p-h,0)),u=0;h
0?r()("#multi_update_form").show():r()("#multi_update_form").hide()}}])&&l(i.prototype,o),a&&l(i,a),n}(i.a)}).call(this,n("EVdn"))},"+s0g":function(t,e,n){!function(t){"use strict";var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),i=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],o=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;t.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(t,i){return t?/-MMM-/.test(i)?n[t.month()]:e[t.month()]:e},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("wd/R"))},"/GqU":function(t,e,n){var i=n("RK3t"),o=n("HYAF");t.exports=function(t){return i(o(t))}},"/b8u":function(t,e,n){var i=n("STAE");t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"/byt":function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},"07d7":function(t,e,n){var i=n("AO7/"),o=n("busE"),r=n("sEFX");i||o(Object.prototype,"toString",r,{unsafe:!0})},"0BK2":function(t,e){t.exports={}},"0BQa":function(t,e,n){(function(t){!function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)var e=t.fn.select2.amd;e.define("select2/i18n/it",[],(function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(t){var e=t.input.length-t.maximum;return"Per favore cancella "+e+" caratter"+(1!==e?"i":"e")},inputTooShort:function(t){return"Per favore inserisci "+(t.minimum-t.input.length)+" o più caratteri"},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(t){var e="Puoi selezionare solo "+t.maximum+" element";return 1!==t.maximum?e+="i":e+="o",e},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"},removeAllItems:function(){return"Rimuovi tutti gli oggetti"}}})),e.define,e.require}()}).call(this,n("EVdn"))},"0Dky":function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},"0GbY":function(t,e,n){var i=n("Qo9l"),o=n("2oRo"),r=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?r(i[t])||r(o[t]):i[t]&&i[t][e]||o[t]&&o[t][e]}},"0eef":function(t,e,n){"use strict";var i={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,r=o&&!i.call({1:2},1);e.f=r?function(t){var e=o(this,t);return!!e&&e.enumerable}:i},"0oug":function(t,e,n){n("dG/n")("iterator")},"0rvr":function(t,e,n){var i=n("glrk"),o=n("O741");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return i(n),o(r),e?t.call(n,r):n.__proto__=r,n}}():void 0)},"0tRk":function(t,e,n){!function(t){"use strict";t.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"})}(n("wd/R"))},"14Sl":function(t,e,n){"use strict";n("rB9j");var i=n("busE"),o=n("0Dky"),r=n("tiKp"),a=n("kmMV"),s=n("kRJp"),l=r("species"),c=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),u="$0"==="a".replace(/./,"$0"),d=r("replace"),f=!!/./[d]&&""===/./[d]("a","$0"),h=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,d){var p=r(t),m=!o((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),g=m&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!m||!g||"replace"===t&&(!c||!u||f)||"split"===t&&!h){var v=/./[p],y=n(p,""[t],(function(t,e,n,i,o){return e.exec===a?m&&!o?{done:!0,value:v.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}}),{REPLACE_KEEPS_$0:u,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),b=y[0],w=y[1];i(String.prototype,t,b),i(RegExp.prototype,p,2==e?function(t,e){return w.call(t,this,e)}:function(t){return w.call(t,this)})}d&&s(RegExp.prototype[p],"sham",!0)}},"1E5z":function(t,e,n){var i=n("m/L8").f,o=n("UTVS"),r=n("tiKp")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,r)&&i(t,r,{configurable:!0,value:e})}},"1Wo5":function(t,e,n){(function(t){var e=n("EVdn");t.$=t.jQuery=e,n("VSY+"),n("Onkx"),n("DjPg"),n("kyKd"),n("vbVy"),n("Dxs7"),n("Auod"),n("qQBl"),n("jhq1"),n("PWE2"),n("e0G9"),n("0BQa"),n("dp/T"),n("VdOU"),n("DHBJ"),n("u2me"),n("fv4y"),n("CTrX"),n("AYug"),n("pRY5"),n("Bozk"),n("Ft9+");var i=n("wd/R");t.moment=i,n("jnO4"),n("PA2r"),n("DxQv"),n("tGlX"),n("u3GI"),n("iYuL"),n("D/JM"),n("nyYc"),n("WxRl"),n("bpih"),n("B55N"),n("Ivi+"),n("+s0g"),n("jVdC"),n("0tRk"),n("lXzo"),n("e+ae"),n("X709"),n("DoHr"),n("XDpg"),n("eHjp");var o=n("ddRL");t.Sortable=o,n("MPPO"),n("Qiut"),n("vh7O"),n("WySY"),t.$.AdminLTE={},t.$.AdminLTE.options={},n("qG+3"),n("NlKh"),n("zcCC"),t.KimaiPaginatedBoxWidget=n("ckYw").default,t.KimaiReloadPageWidget=n("QZse").default,n("9/yf")}).call(this,n("yLpj"))},"27RR":function(t,e,n){var i=n("I+eb"),o=n("g6v/"),r=n("Vu81"),a=n("/GqU"),s=n("Bs8V"),l=n("hBjN");i({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,i=a(t),o=s.f,c=r(i),u={},d=0;c.length>d;)void 0!==(n=o(i,e=c[d++]))&&l(u,e,n);return u}})},"2B1R":function(t,e,n){"use strict";var i=n("I+eb"),o=n("tycR").map,r=n("Hd5f"),a=n("rkAj"),s=r("map"),l=a("map");i({target:"Array",proto:!0,forced:!s||!l},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},"2oRo":function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n("yLpj"))},"33Wh":function(t,e,n){var i=n("yoRg"),o=n("eDl+");t.exports=Object.keys||function(t){return i(t,o)}},"3UD+":function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},"3bBZ":function(t,e,n){var i=n("2oRo"),o=n("/byt"),r=n("4mDm"),a=n("kRJp"),s=n("tiKp"),l=s("iterator"),c=s("toStringTag"),u=r.values;for(var d in o){var f=i[d],h=f&&f.prototype;if(h){if(h[l]!==u)try{a(h,l,u)}catch(t){h[l]=u}if(h[c]||a(h,c,d),o[d])for(var p in r)if(h[p]!==r[p])try{a(h,p,r[p])}catch(t){h[p]=r[p]}}}},"4Brf":function(t,e,n){"use strict";var i=n("I+eb"),o=n("g6v/"),r=n("2oRo"),a=n("UTVS"),s=n("hh1v"),l=n("m/L8").f,c=n("6JNq"),u=r.Symbol;if(o&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var d={},f=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof f?new u(t):void 0===t?u():u(t);return""===t&&(d[e]=!0),e};c(f,u);var h=f.prototype=u.prototype;h.constructor=f;var p=h.toString,m="Symbol(test)"==String(u("test")),g=/^Symbol\((.*)\)[^)]+$/;l(h,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=p.call(t);if(a(d,t))return"";var n=m?e.slice(7,-1):e.replace(g,"$1");return""===n?void 0:n}}),i({global:!0,forced:!0},{Symbol:f})}},"4WOD":function(t,e,n){var i=n("UTVS"),o=n("ewvW"),r=n("93I0"),a=n("4Xet"),s=r("IE_PROTO"),l=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=o(t),i(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},"4Xet":function(t,e,n){var i=n("0Dky");t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},"4l63":function(t,e,n){var i=n("I+eb"),o=n("wg0c");i({global:!0,forced:parseInt!=o},{parseInt:o})},"4mDm":function(t,e,n){"use strict";var i=n("/GqU"),o=n("RNIs"),r=n("P4y1"),a=n("afO8"),s=n("fdAy"),l=a.set,c=a.getterFor("Array Iterator");t.exports=s(Array,"Array",(function(t,e){l(this,{type:"Array Iterator",target:i(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,n=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}}),"values"),r.Arguments=r.Array,o("keys"),o("values"),o("entries")},"5+3N":function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return p}));n("pNMO"),n("4Brf"),n("0oug"),n("TeQF"),n("fbCW"),n("QWBl"),n("yXV3"),n("J30X"),n("4mDm"),n("oVuX"),n("pDQq"),n("DQNa"),n("sMBO"),n("uL8W"),n("HRxU"),n("eoL8"),n("T63A"),n("5DmW"),n("27RR"),n("NBAS"),n("tkto"),n("ExoC"),n("07d7"),n("rB9j"),n("JfAA"),n("PKPk"),n("UxlC"),n("EnZy"),n("SYor"),n("FZtP"),n("3bBZ"),n("R5XZ");var i=n("dQ1+"),o=n("EVdn"),r=n.n(o);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)))return;var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){o=!0,r=t}finally{try{i||null==s.return||s.return()}finally{if(o)throw r}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){for(var n=0;n ".concat(l.project.name," (").concat(l.project.customer.name,")").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay((function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")}))},menufocus:function(e,n){var i,o;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",(function(){t(e.target).trigger(e.originalEvent)}));o=n.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:o})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(o.value),(i=n.item.attr("aria-label")||o.value)&&t.trim(i).length&&(this.liveRegion.children().hide(),t("
'),t},i.prototype.bind=function(e,o){var r=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",(function(t){r.trigger("toggle",{originalEvent:t})})),this.$selection.on("click",".select2-selection__choice__remove",(function(e){if(!r.isDisabled()){var i=t(this).parent(),o=n.GetData(i[0],"data");r.trigger("unselect",{originalEvent:e,data:o})}}))},i.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},i.prototype.display=function(t,e){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(t,e))},i.prototype.selectionContainer=function(){return t('
n(i(l),i(u))?d.important="horizontal":d.important="vertical",e.using.call(this,t,d)}),a.offset(t.extend(S,{using:r}))}))},t.ui.position={fit:{left:function(t,e){var i,o=e.within,r=o.isWindow?o.scrollLeft:o.offset.left,a=o.width,s=t.left-e.collisionPosition.marginLeft,l=r-s,c=s+e.collisionWidth-a-r;e.collisionWidth>a?l>0&&c<=0?(i=t.left+l+e.collisionWidth-a-r,t.left+=l-i):t.left=c>0&&l<=0?r:l>c?r+a-e.collisionWidth:r:l>0?t.left+=l:c>0?t.left-=c:t.left=n(t.left-s,t.left)},top:function(t,e){var i,o=e.within,r=o.isWindow?o.scrollTop:o.offset.top,a=e.within.height,s=t.top-e.collisionPosition.marginTop,l=r-s,c=s+e.collisionHeight-a-r;e.collisionHeight>a?l>0&&c<=0?(i=t.top+l+e.collisionHeight-a-r,t.top+=l-i):t.top=c>0&&l<=0?r:l>c?r+a-e.collisionHeight:r:l>0?t.top+=l:c>0?t.top-=c:t.top=n(t.top-s,t.top)}},flip:{left:function(t,e){var n,o,r=e.within,a=r.offset.left+r.scrollLeft,s=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,c=t.left-e.collisionPosition.marginLeft,u=c-l,d=c+e.collisionWidth-s-l,f="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,h="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];u<0?((n=t.left+f+h+p+e.collisionWidth-s-a)<0||n0&&((o=t.left-e.collisionPosition.marginLeft+f+h+p-l)>0||i(o)",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,n){e._removeClass(n,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var i,o,r,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},i=e.split("."),e=i.shift(),i.length){for(o=a[e]=t.widget.extend({},this.options[e]),r=0;r\n \n \n \n \n \n
\n \n \n
"+"".concat(l.activity.name,"")+""+'').concat(n.formatDuration(l.duration,this.attributes.format),"")+"
"+"";for(c in this.ranges)p+='
",this.container.find(".ranges").prepend(p)}"function"==typeof o&&(this.callback=o),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&this.container.addClass("auto-apply"),"object"==typeof i.ranges&&this.container.addClass("show-ranges"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".drp-calendar.left").addClass("single"),this.container.find(".drp-calendar.left").show(),this.container.find(".drp-calendar.right").hide(),this.timePicker||this.container.addClass("auto-apply")),(void 0===i.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyButtonClasses.length&&this.container.find(".applyBtn").addClass(this.applyButtonClasses),this.cancelButtonClasses.length&&this.container.find(".cancelBtn").addClass(this.cancelButtonClasses),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".drp-calendar").on("click.daterangepicker",".prev",e.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",e.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",e.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",e.proxy(this.hoverDate,this)).on("change.daterangepicker","select.yearselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",e.proxy(this.timeChanged,this)),this.container.find(".ranges").on("click.daterangepicker","li",e.proxy(this.clickRange,this)),this.container.find(".drp-buttons").on("click.daterangepicker","button.applyBtn",e.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",e.proxy(this.clickCancel,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":e.proxy(this.show,this),"focus.daterangepicker":e.proxy(this.show,this),"keyup.daterangepicker":e.proxy(this.elementChanged,this),"keydown.daterangepicker":e.proxy(this.keydown,this)}):(this.element.on("click.daterangepicker",e.proxy(this.toggle,this)),this.element.on("keydown.daterangepicker",e.proxy(this.toggle,this))),this.updateElement()};return n.prototype={constructor:n,setStartDate:function(e){"string"==typeof e&&(this.startDate=t(e,this.locale.format)),"object"==typeof e&&(this.startDate=t(e)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(e){"string"==typeof e&&(this.endDate=t(e,this.locale.format)),"object"==typeof e&&(this.endDate=t(e)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),this.maxSpan&&this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.maxSpan)),this.previousRightTime=this.endDate.clone(),this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled"):this.container.find(".right .calendar-time select").attr("disabled","disabled").addClass("disabled")),this.endDate&&this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){var t,e,n,i;this.timePicker&&(this.endDate?(t=parseInt(this.container.find(".left .hourselect").val(),10),e=parseInt(this.container.find(".left .minuteselect").val(),10),isNaN(e)&&(e=parseInt(this.container.find(".left .minuteselect option:last").val(),10)),n=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,this.timePicker24Hour||("PM"===(i=this.container.find(".left .ampmselect").val())&&t<12&&(t+=12),"AM"===i&&12===t&&(t=0))):(t=parseInt(this.container.find(".right .hourselect").val(),10),e=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(e)&&(e=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),n=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,this.timePicker24Hour||("PM"===(i=this.container.find(".right .ampmselect").val())&&t<12&&(t+=12),"AM"===i&&12===t&&(t=0))),this.leftCalendar.month.hour(t).minute(e).second(n),this.rightCalendar.month.hour(t).minute(e).second(n));this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(n){var i,o=(i="left"==n?this.leftCalendar:this.rightCalendar).month.month(),r=i.month.year(),a=i.month.hour(),s=i.month.minute(),l=i.month.second(),c=t([r,o]).daysInMonth(),u=t([r,o,1]),d=t([r,o,c]),f=t(u).subtract(1,"month").month(),h=t(u).subtract(1,"month").year(),p=t([h,f]).daysInMonth(),m=u.day();(i=[]).firstDay=u,i.lastDay=d;for(var g=0;g<6;g++)i[g]=[];var v=p-m+this.locale.firstDay+1;v>p&&(v-=7),m==this.locale.firstDay&&(v=p-6);for(var y=t([h,f,v,12,s,l]),b=(g=0,0),w=0;g<42;g++,b++,y=t(y).add(24,"hour"))g>0&&b%7==0&&(b=0,w++),i[w][b]=y.clone().hour(a).minute(s).second(l),y.hour(12),this.minDate&&i[w][b].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&i[w][b].isBefore(this.minDate)&&"left"==n&&(i[w][b]=this.minDate.clone()),this.maxDate&&i[w][b].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&i[w][b].isAfter(this.maxDate)&&"right"==n&&(i[w][b]=this.maxDate.clone());"left"==n?this.leftCalendar.calendar=i:this.rightCalendar.calendar=i;var _="left"==n?this.minDate:this.startDate,k=this.maxDate,x=("left"==n?this.startDate:this.endDate,this.locale.direction,'');x+="",x+="
",this.container.find(".drp-calendar."+n+" .calendar-table").html(x)},renderTimePicker:function(t){if("right"!=t||this.endDate){var e,n,i,o=this.maxDate;if(!this.maxSpan||this.maxDate&&!this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate)||(o=this.startDate.clone().add(this.maxSpan)),"left"==t)n=this.startDate.clone(),i=this.minDate;else if("right"==t){n=this.endDate.clone(),i=this.startDate;var r=this.container.find(".drp-calendar.right .calendar-time");if(""!=r.html()&&(n.hour(isNaN(n.hour())?r.find(".hourselect option:selected").val():n.hour()),n.minute(isNaN(n.minute())?r.find(".minuteselect option:selected").val():n.minute()),n.second(isNaN(n.second())?r.find(".secondselect option:selected").val():n.second()),!this.timePicker24Hour)){var a=r.find(".ampmselect option:selected").val();"PM"===a&&n.hour()<12&&n.hour(n.hour()+12),"AM"===a&&12===n.hour()&&n.hour(0)}n.isBefore(this.startDate)&&(n=this.startDate.clone()),o&&n.isAfter(o)&&(n=o.clone())}e=' ",e+=': ",this.timePickerSeconds){for(e+=': "}if(!this.timePicker24Hour){e+='"}this.container.find(".drp-calendar."+t+" .calendar-time").html(e)}},updateFormInputs:function(){this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled")},move:function(){var t,n={top:0,left:0},i=e(window).width();this.parentEl.is("body")||(n={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},i=this.parentEl[0].clientWidth+this.parentEl.offset().left),t="up"==this.drops?this.element.offset().top-this.container.outerHeight()-n.top:this.element.offset().top+this.element.outerHeight()-n.top,this.container.css({top:0,left:0,right:"auto"});var o=this.container.outerWidth();if(this.container["up"==this.drops?"addClass":"removeClass"]("drop-up"),"left"==this.opens){var r=i-this.element.offset().left-this.element.outerWidth();o+r>e(window).width()?this.container.css({top:t,right:"auto",left:9}):this.container.css({top:t,right:r,left:"auto"})}else if("center"==this.opens)(a=this.element.offset().left-n.left+this.element.outerWidth()/2-o/2)<0?this.container.css({top:t,right:"auto",left:9}):a+o>e(window).width()?this.container.css({top:t,left:"auto",right:0}):this.container.css({top:t,left:a,right:"auto"});else{var a;(a=this.element.offset().left-n.left)+o>e(window).width()?this.container.css({top:t,left:"auto",right:0}):this.container.css({top:t,left:a,right:"auto"})}},show:function(t){this.isShowing||(this._outsideClickProxy=e.proxy((function(t){this.outsideClick(t)}),this),e(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),e(window).on("resize.daterangepicker",e.proxy((function(t){this.move(t)}),this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(t){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate.clone(),this.endDate.clone(),this.chosenLabel),this.updateElement(),e(document).off(".daterangepicker"),e(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(t){this.isShowing?this.hide():this.show()},outsideClick:function(t){var n=e(t.target);"focusin"==t.type||n.closest(this.element).length||n.closest(this.container).length||n.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},clickRange:function(t){var e=t.target.getAttribute("data-range-key");if(this.chosenLabel=e,e==this.locale.customRangeLabel)this.showCalendars();else{var n=this.ranges[e];this.startDate=n[0],this.endDate=n[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply()}},clickPrev:function(t){e(t.target).parents(".drp-calendar").hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(t){e(t.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(t){if(e(t.target).hasClass("available")){var n=e(t.target).attr("data-title"),i=n.substr(1,1),o=n.substr(3,1),r=e(t.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.calendar[i][o]:this.rightCalendar.calendar[i][o],a=this.leftCalendar,s=this.rightCalendar,l=this.startDate;this.endDate||this.container.find(".drp-calendar tbody td").each((function(t,n){if(!e(n).hasClass("week")){var i=e(n).attr("data-title"),o=i.substr(1,1),c=i.substr(3,1),u=e(n).parents(".drp-calendar").hasClass("left")?a.calendar[o][c]:s.calendar[o][c];u.isAfter(l)&&u.isBefore(r)||u.isSame(r,"day")?e(n).addClass("in-range"):e(n).removeClass("in-range")}}))}},clickDate:function(t){if(e(t.target).hasClass("available")){var n=e(t.target).attr("data-title"),i=n.substr(1,1),o=n.substr(3,1),r=e(t.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.calendar[i][o]:this.rightCalendar.calendar[i][o];if(this.endDate||r.isBefore(this.startDate,"day")){if(this.timePicker){var a=parseInt(this.container.find(".left .hourselect").val(),10);this.timePicker24Hour||("PM"===(c=this.container.find(".left .ampmselect").val())&&a<12&&(a+=12),"AM"===c&&12===a&&(a=0));var s=parseInt(this.container.find(".left .minuteselect").val(),10);isNaN(s)&&(s=parseInt(this.container.find(".left .minuteselect option:last").val(),10));var l=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;r=r.clone().hour(a).minute(s).second(l)}this.endDate=null,this.setStartDate(r.clone())}else if(!this.endDate&&r.isBefore(this.startDate))this.setEndDate(this.startDate.clone());else{var c;if(this.timePicker)a=parseInt(this.container.find(".right .hourselect").val(),10),this.timePicker24Hour||("PM"===(c=this.container.find(".right .ampmselect").val())&&a<12&&(a+=12),"AM"===c&&12===a&&(a=0)),s=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(s)&&(s=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),l=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,r=r.clone().hour(a).minute(s).second(l);this.setEndDate(r.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),this.timePicker||this.clickApply()),this.updateView(),t.stopPropagation()}},calculateChosenLabel:function(){var t=!0,e=0;for(var n in this.ranges){if(this.timePicker){var i=this.timePickerSeconds?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm";if(this.startDate.format(i)==this.ranges[n][0].format(i)&&this.endDate.format(i)==this.ranges[n][1].format(i)){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").attr("data-range-key");break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[n][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[n][1].format("YYYY-MM-DD")){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").attr("data-range-key");break}e++}t&&(this.showCustomRangeLabel?this.chosenLabel=this.container.find(".ranges li:last").addClass("active").attr("data-range-key"):this.chosenLabel=null,this.showCalendars())},clickApply:function(t){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(t){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(t){var n=e(t.target).closest(".drp-calendar").hasClass("left"),i=n?"left":"right",o=this.container.find(".drp-calendar."+i),r=parseInt(o.find(".monthselect").val(),10),a=o.find(".yearselect").val();n||(a",(this.showWeekNumbers||this.showISOWeekNumbers)&&(x+=" ",x+=""),_&&!_.isBefore(i.firstDay)||this.linkedCalendars&&"left"!=n?x+=" ":x+=' ';var D=this.locale.monthNames[i[1][1].month()]+i[1][1].format(" YYYY");if(this.showDropdowns){for(var S=i[1][1].month(),C=i[1][1].year(),T=k&&k.year()||this.maxYear,E=_&&_.year()||this.minYear,M=C==E,O=C==T,L='";for(var A='")}if(x+=' '+D+" ",k&&!k.isAfter(i.lastDay)||this.linkedCalendars&&"right"!=n&&!this.singleDatePicker?x+="":x+=' ',x+=" ",(this.showWeekNumbers||this.showISOWeekNumbers)&&(x+=' ",x+="",x+="",null==this.endDate&&this.maxSpan){var Y=this.startDate.clone().add(this.maxSpan).endOf("day");k&&!Y.isBefore(k)||(k=Y)}for(w=0;w<6;w++){for(x+="'+this.locale.weekLabel+" "),e.each(this.locale.daysOfWeek,(function(t,e){x+=""+e+" "})),x+="",this.showWeekNumbers?x+=' "}x+="",x+="'+i[w][0].week()+" ":this.showISOWeekNumbers&&(x+=''+i[w][0].isoWeek()+" "),b=0;b<7;b++){var I=[];i[w][b].isSame(new Date,"day")&&I.push("today"),i[w][b].isoWeekday()>5&&I.push("weekend"),i[w][b].month()!=i[1][1].month()&&I.push("off","ends"),this.minDate&&i[w][b].isBefore(this.minDate,"day")&&I.push("off","disabled"),k&&i[w][b].isAfter(k,"day")&&I.push("off","disabled"),this.isInvalidDate(i[w][b])&&I.push("off","disabled"),i[w][b].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&I.push("active","start-date"),null!=this.endDate&&i[w][b].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&I.push("active","end-date"),null!=this.endDate&&i[w][b]>this.startDate&&i[w][b]