diff --git a/.gitignore b/.gitignore index 4ee4015..411fada 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea/ .sass-cache/ node_modules/ -cgi-bin/ \ No newline at end of file +cgi-bin/ +.lando.yml diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 diff --git a/Gruntfile.js b/Gruntfile.js index 8cfe217..73f5d93 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -8,11 +8,24 @@ module.exports = function (grunt) { '<%= grunt.template.today("yyyy-mm-dd") %>\n' + '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + - ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n', + ' Licensed <%= _.map(pkg.licenses, "type").join(", ") %> */\n', // Task configuration. clean : { files: ['dist'] }, + copy: { + templates: { + files: [ + { + expand: true, + cwd: 'src/templates/', + src: '**/*.html', + dest: 'dist/assets/js/plugins/storeLocator/templates/', + flatten: true + } + ] + } + }, sass : { dist: { files: { @@ -100,6 +113,10 @@ module.exports = function (grunt) { files: '<%= jshint.gruntfile.src %>', tasks: ['jshint:gruntfile'] }, + templates: { + files: ['src/templates/**/*.html'], + tasks: ['copy'] + }, src : { files : ['src/**/*'], tasks : ['sass', 'concat', 'uglify', 'usebanner', 'cssmin'], @@ -117,6 +134,7 @@ module.exports = function (grunt) { // These plugins provide necessary tasks. grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-sass'); + grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-qunit'); @@ -127,7 +145,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-handlebars'); // Build - grunt.registerTask('build', ['sass', 'concat', 'uglify', 'usebanner', 'cssmin']); + grunt.registerTask('build', ['sass', 'copy', 'concat', 'uglify', 'usebanner', 'cssmin']); //Watch src build grunt.registerTask('watchsrc', ['watch:src']); diff --git a/bower.json b/bower.json index b5e7afe..7e18028 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jquery-storelocator-plugin", - "version": "3.0.1", + "version": "3.4.1", "description": "This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information.", "repository": { "type": "git", @@ -8,7 +8,7 @@ }, "keywords": ["jquery-plugin","locator","store","dealer","location","locations","maps","map","stores","find","finder"], "authors": [ - "Bjorn Holine (http://www.bjornblog.com)" + "Bjorn Holine (https://www.bjornblog.com)" ], "license": "MIT", "dependencies": { @@ -24,15 +24,16 @@ "dist/assets/css/storelocator.min.css" ], "devDependencies": { - "grunt-contrib-jshint": "~0.6.0", - "grunt-contrib-qunit": "~0.2.0", - "grunt-contrib-concat": "~0.3.0", - "grunt-contrib-uglify": "~0.2.0", - "grunt-contrib-watch": "~0.4.0", - "grunt-contrib-clean": "~0.4.0", - "grunt-contrib-less": "~0.11.0", - "grunt": "~0.4.4", + "grunt": "~1.3.0", "grunt-banner": "~0.2.2", - "grunt-contrib-cssmin": "~0.9.0" + "grunt-contrib-clean": "~2.0.0", + "grunt-contrib-concat": "~1.0.1", + "grunt-contrib-cssmin": "~3.0.0", + "grunt-contrib-handlebars": "^2.0.0", + "grunt-contrib-jshint": "~3.0.0", + "grunt-contrib-qunit": "~4.0.0", + "grunt-contrib-sass": "^2.0.0", + "grunt-contrib-uglify": "~5.0.0", + "grunt-contrib-watch": "~1.1.0" } } diff --git a/callbacks/callback-markerclick.md b/callbacks/callback-markerclick.md index 99391b9..177fc16 100644 --- a/callbacks/callback-markerclick.md +++ b/callbacks/callback-markerclick.md @@ -12,3 +12,4 @@ Fires when a marker on the map is clicked. | markerId | int | Marker ID number | | $selectedLocation | object | Corresponding location list DOM element | | locationObj | object | Location details of the selected item | +| map | object | Google map object | diff --git a/dist/assets/css/bootstrap-example.css b/dist/assets/css/bootstrap-example.css index 4625196..d7fd234 100644 --- a/dist/assets/css/bootstrap-example.css +++ b/dist/assets/css/bootstrap-example.css @@ -2,6 +2,10 @@ .gm-style div, .gm-style span, .gm-style label, .gm-style a { font-family: Arial, Helvetica, sans-serif; } +.GMAMP-maps-pin-view { + color: #000; + font: 400 15px/1 Arial, Helvetica, sans-serif; } + .bh-sl-error { clear: both; float: left; diff --git a/dist/assets/css/bootstrap-example.css.map b/dist/assets/css/bootstrap-example.css.map index de00fec..bde6d2e 100644 --- a/dist/assets/css/bootstrap-example.css.map +++ b/dist/assets/css/bootstrap-example.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAYA,qCAAqC;AACrC,2DAA4D;EAC1D,WAAW,EAJD,4BAA4B;;AAOxC,YAAa;EACX,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,MAAM;EACf,KAAK,EAbD,OAAO;EAcX,WAAW,EAAE,IAAI;;AAGnB,gBAAiB;EACf,KAAK,EAtBI,IAAI;EAwBb,wDAAwD;EAOxD,sDAAsD;EANtD,oBAAI;IACF,SAAS,EAAE,eAAe;IAC1B,aAAa,EAAE,YAAY;IAC3B,UAAU,EAAE,eAAe;EAI7B,oBAAI;IACF,UAAU,EAAE,sBAAsB;EAGpC,2BAAU;IACR,aAAa,EAAE,CAAC;EAIhB,2GAAmB;IACjB,YAAY,EAAE,IAAI;EAItB,8BAAc;IACZ,OAAO,EAAE,IAAI;EAGf,+BAAe;IACb,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,qCAAqC;EAGnD,yCAAyB;IACvB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,MAAM;IAEd,wDAAe;MACb,UAAU,EAAE,IAAI;MAChB,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,CAAC;MACV,MAAM,EAAE,WAAW;MAEnB,2DAAG;QACD,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,KAAK;QAEb,iEAAM;UACJ,OAAO,EAAE,MAAM;QAGjB,iEAAM;UACJ,OAAO,EAAE,KAAK;UACd,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,aAAa;EAO3B,uCAAE;IACA,KAAK,EAxFJ,OAAO;IAyFR,eAAe,EAAE,IAAI;IACrB,6FAAkB;MAChB,eAAe,EAAE,SAAS;EAKhC,gCAAgB;IACd,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IAEf,mCAAG;MACD,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,CAAC;MAEV,sCAAG;QACD,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,cAAgB;QAAE,+EAA+E;IAI7G,4CAAY;MACV,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,YAAY;MACpB,OAAO,EAAE,GAAG;MACZ,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,MAAM;MAClB,UAAU,EAAE,OAAoB;MAChC,KAAK,EAxIH,IAAI;MAyIN,WAAW,EAAE,IAAI;MACjB,aAAa,EAAE,IAAI;IAGrB,8CAAc;MACZ,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,GAAG;MAEV,4DAAc;QACZ,OAAO,EAAE,IAAI;MAGf,wDAAU;QACR,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,MAAM;QAClB,KAAK,EAvJF,OAAO;IA2Jd,4CAAY;MACV,MAAM,EAAE,+BAA+B;MACvC,eAAe,EAAE,6BAA6B;MAC9C,kBAAkB,EAAE,6BAA6B;MACjD,UAAU,EAAE,8BAA8B;MAC1C,UAAU,EAAE,gDAAgD;IAG9D,kEAAkC;MAChC,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;MACZ,QAAQ,EAAE,QAAQ;MAElB,oFAAkB;QAChB,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,GAAG;IAId,uDAAuB;MACrB,WAAW,EAAE,IAAI;EAIrB,0BAAU;IACR,4CAA4C;IAC5C,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;EAGnB,2BAAW;IACT,MAAM,EAAE,KAAK;EAGf,4CAA4B;IAC1B,KAAK,EAAE,IAAI;IAEX,+CAAG;MACD,eAAe,EAAE,IAAI;MACrB,UAAU,EAAE,MAAM;MAClB,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,MAAM;MAEf,kDAAG;QACD,OAAO,EAAE,YAAY;QACrB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,sCAAoB;QAC1B,KAAK,EArMN,OAAO;MAwMR,8DAAe;QACb,KAAK,EA5MF,IAAI;QA6MP,MAAM,EAAE,IAAI;QACZ,eAAe,EAAE,IAAI;;AAM7B,kBAAkB;AAClB,cAAe;EACb,QAAQ,EAAE,KAAK;EACf,IAAI,EAAE,CAAC;EACP,GAAG,EAAE,CAAC;EACN,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,KAAK;EACd,UAAU,EAAE,iCAAiC;EAE7C,kCAAoB;IAClB,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,MAAM;IAAE,wBAAwB;IAC7C,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,KAAK;IACd,UAAU,EA3ON,IAAI;IA4OR,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,gBAAgB;IAE5B,uDAAqB;MACnB,UAAU,EAAE,IAAI;MAAE,mCAAmC;IAGvD,uDAAqB;MACnB,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,MAAM;MAAE,kEAAkE;IAGrF,oDAAkB;MAChB,GAAG,EAAE,IAAI;MACT,KAAK,EAAE,IAAI;;AAKjB,iBAAkB;EAChB,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,OAAO;EACf,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;EAEX,iDACS;IACP,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,GAAG;IACT,UAAU,EA3QP,IAAI;IA4QP,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,GAAG;IACV,iBAAiB,EAAE,aAAa;IAChC,cAAc,EAAE,aAAa;IAC7B,aAAa,EAAE,aAAa;IAC5B,YAAY,EAAE,aAAa;IAC3B,SAAS,EAAE,aAAa;EAG1B,6DACe;IACb,UAAU,EAAE,OAAkB;EAGhC,wBAAS;IACP,iBAAiB,EAAE,cAAc;IACjC,cAAc,EAAE,cAAc;IAC9B,aAAa,EAAE,cAAc;IAC7B,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,cAAc", +"mappings": "AAYA,qCAAqC;AACrC,2DAA4D;EAC1D,WAAW,EAJD,4BAA4B;;AAOxC,oBAAqB;EACnB,KAAK,EAXC,IAAI;EAYV,IAAI,EAAE,uCAAqB;;AAG7B,YAAa;EACX,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,MAAM;EACf,KAAK,EAlBD,OAAO;EAmBX,WAAW,EAAE,IAAI;;AAGnB,gBAAiB;EACf,KAAK,EA3BI,IAAI;EA6Bb,wDAAwD;EAOxD,sDAAsD;EANtD,oBAAI;IACF,SAAS,EAAE,eAAe;IAC1B,aAAa,EAAE,YAAY;IAC3B,UAAU,EAAE,eAAe;EAI7B,oBAAI;IACF,UAAU,EAAE,sBAAsB;EAGpC,2BAAU;IACR,aAAa,EAAE,CAAC;EAIhB,2GAAmB;IACjB,YAAY,EAAE,IAAI;EAItB,8BAAc;IACZ,OAAO,EAAE,IAAI;EAGf,+BAAe;IACb,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,qCAAqC;EAGnD,yCAAyB;IACvB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,MAAM;IAEd,wDAAe;MACb,UAAU,EAAE,IAAI;MAChB,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,CAAC;MACV,MAAM,EAAE,WAAW;MAEnB,2DAAG;QACD,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,KAAK;QAEb,iEAAM;UACJ,OAAO,EAAE,MAAM;QAGjB,iEAAM;UACJ,OAAO,EAAE,KAAK;UACd,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,aAAa;EAO3B,uCAAE;IACA,KAAK,EA7FJ,OAAO;IA8FR,eAAe,EAAE,IAAI;IACrB,6FAAkB;MAChB,eAAe,EAAE,SAAS;EAKhC,gCAAgB;IACd,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IAEf,mCAAG;MACD,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,CAAC;MAEV,sCAAG;QACD,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,cAAgB;QAAE,+EAA+E;IAI7G,4CAAY;MACV,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,YAAY;MACpB,OAAO,EAAE,GAAG;MACZ,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,MAAM;MAClB,UAAU,EAAE,OAAoB;MAChC,KAAK,EA7IH,IAAI;MA8IN,WAAW,EAAE,IAAI;MACjB,aAAa,EAAE,IAAI;IAGrB,8CAAc;MACZ,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,GAAG;MAEV,4DAAc;QACZ,OAAO,EAAE,IAAI;MAGf,wDAAU;QACR,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,MAAM;QAClB,KAAK,EA5JF,OAAO;IAgKd,4CAAY;MACV,MAAM,EAAE,+BAA+B;MACvC,eAAe,EAAE,6BAA6B;MAC9C,kBAAkB,EAAE,6BAA6B;MACjD,UAAU,EAAE,8BAA8B;MAC1C,UAAU,EAAE,gDAAgD;IAG9D,kEAAkC;MAChC,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;MACZ,QAAQ,EAAE,QAAQ;MAElB,oFAAkB;QAChB,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,GAAG;IAId,uDAAuB;MACrB,WAAW,EAAE,IAAI;EAIrB,0BAAU;IACR,4CAA4C;IAC5C,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;EAGnB,2BAAW;IACT,MAAM,EAAE,KAAK;EAGf,4CAA4B;IAC1B,KAAK,EAAE,IAAI;IAEX,+CAAG;MACD,eAAe,EAAE,IAAI;MACrB,UAAU,EAAE,MAAM;MAClB,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,MAAM;MAEf,kDAAG;QACD,OAAO,EAAE,YAAY;QACrB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,sCAAoB;QAC1B,KAAK,EA1MN,OAAO;MA6MR,8DAAe;QACb,KAAK,EAjNF,IAAI;QAkNP,MAAM,EAAE,IAAI;QACZ,eAAe,EAAE,IAAI;;AAM7B,kBAAkB;AAClB,cAAe;EACb,QAAQ,EAAE,KAAK;EACf,IAAI,EAAE,CAAC;EACP,GAAG,EAAE,CAAC;EACN,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,KAAK;EACd,UAAU,EAAE,iCAAiC;EAE7C,kCAAoB;IAClB,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,MAAM;IAAE,wBAAwB;IAC7C,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,KAAK;IACd,UAAU,EAhPN,IAAI;IAiPR,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,gBAAgB;IAE5B,uDAAqB;MACnB,UAAU,EAAE,IAAI;MAAE,mCAAmC;IAGvD,uDAAqB;MACnB,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,MAAM;MAAE,kEAAkE;IAGrF,oDAAkB;MAChB,GAAG,EAAE,IAAI;MACT,KAAK,EAAE,IAAI;;AAKjB,iBAAkB;EAChB,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,OAAO;EACf,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;EAEX,iDACS;IACP,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,GAAG;IACT,UAAU,EAhRP,IAAI;IAiRP,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,GAAG;IACV,iBAAiB,EAAE,aAAa;IAChC,cAAc,EAAE,aAAa;IAC7B,aAAa,EAAE,aAAa;IAC5B,YAAY,EAAE,aAAa;IAC3B,SAAS,EAAE,aAAa;EAG1B,6DACe;IACb,UAAU,EAAE,OAAkB;EAGhC,wBAAS;IACP,iBAAiB,EAAE,cAAc;IACjC,cAAc,EAAE,cAAc;IAC9B,aAAa,EAAE,cAAc;IAC7B,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,cAAc", "sources": ["../../../src/css/bootstrap-example.scss"], "names": [], "file": "bootstrap-example.css" diff --git a/dist/assets/css/bootstrap-example.min.css b/dist/assets/css/bootstrap-example.min.css index ac01a07..133626c 100644 --- a/dist/assets/css/bootstrap-example.min.css +++ b/dist/assets/css/bootstrap-example.min.css @@ -1 +1 @@ -.gm-style a,.gm-style div,.gm-style label,.gm-style span{font-family:Arial,Helvetica,sans-serif}.bh-sl-error{clear:both;float:left;width:100%;padding:10px 0;color:#ae2118;font-weight:700}.bh-sl-container{color:#555}.bh-sl-container img{max-width:none!important;border-radius:0!important;box-shadow:none!important}.bh-sl-container>*{box-sizing:content-box!important}.bh-sl-container .jumbotron{margin-bottom:0}.bh-sl-container .form-input input,.bh-sl-container .form-input label,.bh-sl-container .form-input select{margin-right:10px}.bh-sl-container .loc-alt-dist{display:none}.bh-sl-container .bh-sl-loading{float:left;margin:4px 0 0 10px;width:16px;height:16px;background:url(../img/ajax-loader.gif) no-repeat}.bh-sl-container .bh-sl-filters-container{clear:both;width:100%;margin:15px 0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters{list-style:none;float:left;padding:0;margin:0 100px 0 0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li{display:block;clear:left;float:left;width:100%;margin:5px 0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li label{display:inline}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li input{display:block;float:left;margin:2px 8px 2px 0}.bh-sl-container .bh-sl-map-container a{color:#005293;text-decoration:none}.bh-sl-container .bh-sl-map-container a:active,.bh-sl-container .bh-sl-map-container a:hover{text-decoration:underline}.bh-sl-container .bh-sl-loc-list{height:530px;overflow-x:auto;font-size:13px}.bh-sl-container .bh-sl-loc-list ul{display:block;clear:left;float:left;width:100%;list-style:none;margin:0;padding:0}.bh-sl-container .bh-sl-loc-list ul li{display:block;clear:left;float:left;margin:3% 4%;cursor:pointer;width:92%;border:1px solid #fff}.bh-sl-container .bh-sl-loc-list .list-label{float:left;margin:10px 0 0 6px;padding:4px;width:27px;text-align:center;background:#00192d;color:#fff;font-weight:700;border-radius:15px}.bh-sl-container .bh-sl-loc-list .list-details{float:left;margin-left:6px;width:80%}.bh-sl-container .bh-sl-loc-list .list-details .list-content{padding:10px}.bh-sl-container .bh-sl-loc-list .list-details .loc-dist{font-weight:700;font-style:italic;color:#8e8e8e}.bh-sl-container .bh-sl-loc-list .list-focus{border:1px solid rgba(0,82,147,.4);-moz-box-shadow:0 0 8px rgba(0,82,147,.4);-webkit-box-shadow:0 0 8px rgba(0,82,147,.4);box-shadow:0 0 8px rgba(0,100,180,.4);transition:border .2s linear 0s,box-shadow .2s linear 0s}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container{width:100%;height:20px;position:relative}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container .bh-sl-close-icon{top:0;right:6px}.bh-sl-container .bh-sl-loc-list .bh-sl-noresults-title{font-weight:700}.bh-sl-container .loc-name{font-size:15px;font-weight:700}.bh-sl-container .bh-sl-map{height:530px}.bh-sl-container .bh-sl-pagination-container{clear:both}.bh-sl-container .bh-sl-pagination-container ol{list-style-type:none;text-align:center;margin:0;padding:10px 0}.bh-sl-container .bh-sl-pagination-container ol li{display:inline-block;padding:10px;cursor:pointer;font:700 14px Arial,Helvetica,sans-serif;color:#005293}.bh-sl-container .bh-sl-pagination-container ol .bh-sl-current{color:#555;cursor:auto;text-decoration:none}.bh-sl-overlay{position:fixed;left:0;top:0;width:100%;height:100%;z-index:10000;background:url(../img/overlay-bg.png) repeat}.bh-sl-overlay .bh-sl-modal-window{position:absolute;left:50%;margin-left:-460px;margin-top:60px;width:920px;height:620px;z-index:10010;background:#fff;border-radius:10px;box-shadow:0 0 10px #656565}.bh-sl-overlay .bh-sl-modal-window .bh-sl-map-container{margin-top:50px}.bh-sl-overlay .bh-sl-modal-window .bh-sl-modal-content{float:left;padding:0 22px}.bh-sl-overlay .bh-sl-modal-window .bh-sl-close-icon{top:13px;right:22px}.bh-sl-close-icon{position:absolute;cursor:pointer;height:24px;width:24px}.bh-sl-close-icon:after,.bh-sl-close-icon:before{position:absolute;top:3px;right:3px;bottom:0;left:50%;background:#ccc;content:'';display:block;height:24px;margin:-3px 0 0 -1px;width:3px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.bh-sl-close-icon:hover:after,.bh-sl-close-icon:hover:before{background:#b3b3b3}.bh-sl-close-icon:before{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)} \ No newline at end of file +.gm-style a,.gm-style div,.gm-style label,.gm-style span{font-family:Arial,Helvetica,sans-serif}.GMAMP-maps-pin-view{color:#000;font:400 15px/1 Arial,Helvetica,sans-serif}.bh-sl-error{clear:both;float:left;width:100%;padding:10px 0;color:#ae2118;font-weight:700}.bh-sl-container{color:#555}.bh-sl-container img{max-width:none!important;border-radius:0!important;box-shadow:none!important}.bh-sl-container>*{box-sizing:content-box!important}.bh-sl-container .jumbotron{margin-bottom:0}.bh-sl-container .form-input input,.bh-sl-container .form-input label,.bh-sl-container .form-input select{margin-right:10px}.bh-sl-container .loc-alt-dist{display:none}.bh-sl-container .bh-sl-loading{float:left;margin:4px 0 0 10px;width:16px;height:16px;background:url(../img/ajax-loader.gif) no-repeat}.bh-sl-container .bh-sl-filters-container{clear:both;width:100%;margin:15px 0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters{list-style:none;float:left;padding:0;margin:0 100px 0 0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li{display:block;clear:left;float:left;width:100%;margin:5px 0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li label{display:inline}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li input{display:block;float:left;margin:2px 8px 2px 0}.bh-sl-container .bh-sl-map-container a{color:#005293;text-decoration:none}.bh-sl-container .bh-sl-map-container a:active,.bh-sl-container .bh-sl-map-container a:hover{text-decoration:underline}.bh-sl-container .bh-sl-loc-list{height:530px;overflow-x:auto;font-size:13px}.bh-sl-container .bh-sl-loc-list ul{display:block;clear:left;float:left;width:100%;list-style:none;margin:0;padding:0}.bh-sl-container .bh-sl-loc-list ul li{display:block;clear:left;float:left;margin:3% 4%;cursor:pointer;width:92%;border:1px solid #fff}.bh-sl-container .bh-sl-loc-list .list-label{float:left;margin:10px 0 0 6px;padding:4px;width:27px;text-align:center;background:#00192d;color:#fff;font-weight:700;border-radius:15px}.bh-sl-container .bh-sl-loc-list .list-details{float:left;margin-left:6px;width:80%}.bh-sl-container .bh-sl-loc-list .list-details .list-content{padding:10px}.bh-sl-container .bh-sl-loc-list .list-details .loc-dist{font-weight:700;font-style:italic;color:#8e8e8e}.bh-sl-container .bh-sl-loc-list .list-focus{border:1px solid rgba(0,82,147,.4);-moz-box-shadow:0 0 8px rgba(0,82,147,.4);-webkit-box-shadow:0 0 8px rgba(0,82,147,.4);box-shadow:0 0 8px rgba(0,100,180,.4);transition:border .2s linear 0s,box-shadow .2s linear 0s}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container{width:100%;height:20px;position:relative}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container .bh-sl-close-icon{top:0;right:6px}.bh-sl-container .bh-sl-loc-list .bh-sl-noresults-title{font-weight:700}.bh-sl-container .loc-name{font-size:15px;font-weight:700}.bh-sl-container .bh-sl-map{height:530px}.bh-sl-container .bh-sl-pagination-container{clear:both}.bh-sl-container .bh-sl-pagination-container ol{list-style-type:none;text-align:center;margin:0;padding:10px 0}.bh-sl-container .bh-sl-pagination-container ol li{display:inline-block;padding:10px;cursor:pointer;font:bold 14px Arial,Helvetica,sans-serif;color:#005293}.bh-sl-container .bh-sl-pagination-container ol .bh-sl-current{color:#555;cursor:auto;text-decoration:none}.bh-sl-overlay{position:fixed;left:0;top:0;width:100%;height:100%;z-index:10000;background:url(../img/overlay-bg.png) repeat}.bh-sl-overlay .bh-sl-modal-window{position:absolute;left:50%;margin-left:-460px;margin-top:60px;width:920px;height:620px;z-index:10010;background:#fff;border-radius:10px;box-shadow:0 0 10px #656565}.bh-sl-overlay .bh-sl-modal-window .bh-sl-map-container{margin-top:50px}.bh-sl-overlay .bh-sl-modal-window .bh-sl-modal-content{float:left;padding:0 22px}.bh-sl-overlay .bh-sl-modal-window .bh-sl-close-icon{top:13px;right:22px}.bh-sl-close-icon{position:absolute;cursor:pointer;height:24px;width:24px}.bh-sl-close-icon:after,.bh-sl-close-icon:before{position:absolute;top:3px;right:3px;bottom:0;left:50%;background:#ccc;content:'';display:block;height:24px;margin:-3px 0 0 -1px;width:3px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.bh-sl-close-icon:hover:after,.bh-sl-close-icon:hover:before{background:#b3b3b3}.bh-sl-close-icon:before{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)} \ No newline at end of file diff --git a/dist/assets/css/storelocator.css b/dist/assets/css/storelocator.css index 65e06da..7c19bcd 100644 --- a/dist/assets/css/storelocator.css +++ b/dist/assets/css/storelocator.css @@ -14,6 +14,10 @@ .gm-style div, .gm-style span, .gm-style label, .gm-style a { font-family: Arial, Helvetica, sans-serif; } +.GMAMP-maps-pin-view { + color: #000; + font: 400 15px/1 Arial, Helvetica, sans-serif; } + /* InfoBubble font size */ .bh-sl-window { font-size: 13px; } @@ -183,7 +187,7 @@ .bh-sl-container .bh-sl-loc-list .list-details .list-content { padding: 10px; } .bh-sl-container .bh-sl-loc-list .list-details .loc-dist { - color: #8e8e8e; + color: #6c6c6c; font-weight: bold; font-style: italic; } .bh-sl-container .bh-sl-loc-list .list-focus { @@ -236,15 +240,23 @@ padding: 10px 0; text-align: center; } .bh-sl-container .bh-sl-pagination-container ol li { + display: inline-block; + margin: 0 4px; } + .bh-sl-container .bh-sl-pagination-container ol a { + box-shadow: none; color: #005293; - cursor: pointer; display: inline-block; font: bold 14px Arial, Helvetica, sans-serif; - padding: 10px; } + padding: 10px; + text-decoration: underline; } .bh-sl-container .bh-sl-pagination-container ol .bh-sl-current { color: #555; cursor: auto; text-decoration: none; } + .bh-sl-container .bh-sl-pagination-container ol .bh-sl-current a { + color: #555; + pointer-events: none; + text-decoration: none; } /* Modal window */ .bh-sl-overlay { diff --git a/dist/assets/css/storelocator.css.map b/dist/assets/css/storelocator.css.map index 4c3473a..8322026 100644 --- a/dist/assets/css/storelocator.css.map +++ b/dist/assets/css/storelocator.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAcA,oDAAoD;AACpD,YAAa;EACZ,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;EACX,SAAS,EAAE,KAAK;EAEhB,yBAAa;IACZ,KAAK,EAlBK,OAAO;IAmBjB,IAAI,EAAE,4CAA0B;IAEhC,0BAAuB;MAJxB,yBAAa;QAKX,SAAS,EAAE,IAAI;;AAKlB,qCAAqC;AAEpC,2DAAoB;EACnB,WAAW,EAvBD,4BAA4B;;AA2BxC,0BAA0B;AAC1B,aAAc;EACb,SAAS,EAAE,IAAI;;AAGhB,YAAa;EACZ,KAAK,EAAE,IAAI;EACX,KAAK,EAnCA,OAAO;EAoCZ,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,IAAI;EACjB,OAAO,EAAE,MAAM;EACf,KAAK,EAAE,IAAI;;AAGZ,wDAAwD;AACxD,wBAAyB;EACxB,aAAa,EAAE,YAAY;EAC3B,UAAU,EAAE,eAAe;EAC3B,UAAU,EAAE,eAAe;EAC3B,SAAS,EAAE,eAAe;;AAG3B,gBAAiB;EAChB,UAAU,EAAE,UAAU;EACtB,KAAK,EAxDK,IAAI;EAyDd,KAAK,EAAE,IAAI;EACX,IAAI,EAAE,4CAA0B;EAChC,OAAO,EAAE,MAAM;EACf,KAAK,EAAE,IAAI;EAEX,sDAAsD;EACtD,oBAAI;IACH,UAAU,EAAE,sBAAsB;EAGnC,sCAAsB;IACrB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;EAGZ,4BAAY;IACX,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,GAAG;IACf,KAAK,EAAE,IAAI;IAGX,yBAAkB;MANnB,4BAAY;QAOV,KAAK,EAAE,IAAI;IAGZ,kCAAM;MACL,OAAO,EAAE,KAAK;MACd,WAAW,EAAE,IAAI;MACjB,KAAK,EAAE,IAAI;MAGX,yBAAkB;QANnB,kCAAM;UAOJ,OAAO,EAAE,YAAY;UACrB,KAAK,EAAE,IAAI;IAIb,uEAAc;MACb,UAAU,EAAE,UAAU;MACtB,MAAM,EAAE,cAAe;MACvB,aAAa,EAAE,GAAG;MAClB,IAAI,EAAE,4CAA0B;MAChC,MAAM,EAAE,MAAM;MACd,OAAO,EAAE,QAAQ;MACjB,KAAK,EAAE,IAAI;MACX,qBAAqB,EAAE,GAAG;MAG1B,yBAAkB;QAXnB,uEAAc;UAYZ,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,aAAa;EAKxB,8BAAc;IACb,OAAO,EAAE,IAAI;EAGd,uBAAO;IACN,UAAU,EAAE,OAAmB;IAC/B,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,GAAG;IAClB,KAAK,EA/HC,IAAI;IAgIV,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,0CAAwB;IAC9B,UAAU,EAAE,GAAG;IACf,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,MAAM;IACnB,qBAAqB,EAAE,GAAG;EAG3B,+BAAe;IACd,UAAU,EAAE,qCAAqC;IACjD,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;EAGZ,yCAAyB;IACxB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,IAAI;IAEX,wDAAe;MACd,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,WAAW;MACnB,OAAO,EAAE,CAAC;MAEV,2DAAG;QACF,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,IAAI;QAEX,iEAAM;UACL,OAAO,EAAE,MAAM;UACf,cAAc,EAAE,WAAW;QAG5B,iEAAM;UACL,OAAO,EAAE,KAAK;UACd,KAAK,EAAE,IAAI;UACX,YAAY,EAAE,GAAG;QAGlB,kEAAO;UACN,UAAU,EAAE,UAAU;UACtB,MAAM,EAAE,cAAe;UACvB,aAAa,EAAE,GAAG;UAClB,IAAI,EAAE,4CAA0B;UAChC,OAAO,EAAE,QAAQ;UACjB,qBAAqB,EAAE,GAAG;EAM9B,qCAAqB;IACpB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IAGX,0BAAuB;MAPxB,qCAAqB;QAQnB,aAAa,EAAE,IAAI;IAGpB,uCAAE;MACD,KAAK,EA/LD,OAAO;MAgMX,eAAe,EAAE,IAAI;MAErB,4IAEQ;QACP,eAAe,EAAE,SAAS;EAK7B,gCAAgB;IACf,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IAGX,0BAAuB;MAPxB,gCAAgB;QAQd,KAAK,EAAE,GAAG;IAGX,mCAAG;MACF,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,CAAC;MAEV,sCAAG;QACF,MAAM,EAAE,cAAgB;QAAE,+EAA+E;QACzG,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;IAIb,4CAAY;MACX,UAAU,EAAE,OAAoB;MAChC,aAAa,EAAE,IAAI;MACnB,KAAK,EApPA,IAAI;MAqPT,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,IAAI;MACjB,MAAM,EAAE,aAAa;MACrB,OAAO,EAAE,OAAO;MAChB,UAAU,EAAE,MAAM;MAClB,KAAK,EAAE,IAAI;MACX,SAAS,EAAE,IAAI;IAGhB,8CAAc;MACb,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,GAAG;MAEV,4DAAc;QACb,OAAO,EAAE,IAAI;MAGd,wDAAU;QACT,KAAK,EAvQE,OAAO;QAwQd,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,MAAM;IAIpB,4CAAY;MACX,MAAM,EAAE,+BAA+B;MACvC,UAAU,EAAE,gDAAgD;IAG7D,kEAAkC;MACjC,MAAM,EAAE,IAAI;MACZ,QAAQ,EAAE,QAAQ;MAClB,KAAK,EAAE,IAAI;MAEX,oFAAkB;QACjB,KAAK,EAAE,GAAG;QACV,GAAG,EAAE,CAAC;IAIR,wDAAwB;MACvB,MAAM,EAAE,IAAI;MAEZ,oCAAoC;MACpC,8DAAM;QACL,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,IAAI;MAGZ,2HAAU;QACT,cAAc,EAAE,MAAM;QACtB,eAAe,EAAE,QAAQ;MAG1B,2DAAG;QACF,OAAO,EAAE,GAAG;MAGb,uEAAe;QACd,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,iBAAiB;MAG1B,oEAAY;QACX,OAAO,EAAE,GAAG;IAId,uDAAuB;MACtB,WAAW,EAAE,IAAI;MACjB,MAAM,EAAE,IAAI;IAGb,sDAAsB;MACrB,MAAM,EAAE,MAAM;EAIhB,0BAAU;IACT,4CAA4C;IAC5C,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;EAGlB,2BAAW;IACV,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,IAAI;IAGX,0BAAuB;MANxB,2BAAW;QAOT,KAAK,EAAE,GAAG;EAIZ,4CAA4B;IAC3B,KAAK,EAAE,IAAI;IAEX,+CAAG;MACF,eAAe,EAAE,IAAI;MACrB,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,MAAM;MACf,UAAU,EAAE,MAAM;MAElB,kDAAG;QACF,KAAK,EAxVF,OAAO;QAyVV,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,YAAY;QACrB,IAAI,EAAE,sCAAoB;QAC1B,OAAO,EAAE,IAAI;MAGd,8DAAe;QACd,KAAK,EAnWE,IAAI;QAoWX,MAAM,EAAE,IAAI;QACZ,eAAe,EAAE,IAAI;;AAMzB,kBAAkB;AAClB,cAAe;EACd,UAAU,EAAE,iCAAiC;EAC7C,MAAM,EAAE,IAAI;EACZ,IAAI,EAAE,CAAC;EACP,QAAQ,EAAE,KAAK;EACf,GAAG,EAAE,CAAC;EACN,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;EAEd,kCAAoB;IACnB,UAAU,EA3XJ,IAAI;IA4XV,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,gBAAgB;IAC5B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,MAAM;IAAE,wBAAwB;IAC7C,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,KAAK;IAEd,uDAAqB;MACpB,UAAU,EAAE,IAAI;MAAE,mCAAmC;IAGtD,uDAAqB;MACpB,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,IAAI;MAAE,kEAAkE;MACjF,KAAK,EAAE,GAAG;IAGX,oDAAkB;MACjB,KAAK,EAAE,IAAI;MACX,GAAG,EAAE,IAAI;;AAKZ,iBAAkB;EACjB,MAAM,EAAE,OAAO;EACf,MAAM,EAAE,IAAI;EACZ,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EAEX,iDACS;IACR,UAAU,EA9ZL,IAAI;IA+ZT,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,aAAa;IACrB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,GAAG;IACV,iBAAiB,EAAE,aAAa;IAChC,cAAc,EAAE,aAAa;IAC7B,aAAa,EAAE,aAAa;IAC5B,YAAY,EAAE,aAAa;IAC3B,SAAS,EAAE,aAAa;EAGzB,6DACe;IACd,UAAU,EAAE,OAAkB;EAG/B,wBAAS;IACR,iBAAiB,EAAE,cAAc;IACjC,cAAc,EAAE,cAAc;IAC9B,aAAa,EAAE,cAAc;IAC7B,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,cAAc", +"mappings": "AAcA,oDAAoD;AACpD,YAAa;EACZ,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;EACX,SAAS,EAAE,KAAK;EAEhB,yBAAa;IACZ,KAAK,EAlBK,OAAO;IAmBjB,IAAI,EAAE,4CAA0B;IAEhC,0BAAuB;MAJxB,yBAAa;QAKX,SAAS,EAAE,IAAI;;AAKlB,qCAAqC;AAEpC,2DAAoB;EACnB,WAAW,EAvBD,4BAA4B;;AA2BxC,oBAAqB;EACpB,KAAK,EA/BE,IAAI;EAgCX,IAAI,EAAE,uCAAqB;;AAG5B,0BAA0B;AAC1B,aAAc;EACb,SAAS,EAAE,IAAI;;AAGhB,YAAa;EACZ,KAAK,EAAE,IAAI;EACX,KAAK,EAxCA,OAAO;EAyCZ,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,IAAI;EACjB,OAAO,EAAE,MAAM;EACf,KAAK,EAAE,IAAI;;AAGZ,wDAAwD;AACxD,wBAAyB;EACxB,aAAa,EAAE,YAAY;EAC3B,UAAU,EAAE,eAAe;EAC3B,UAAU,EAAE,eAAe;EAC3B,SAAS,EAAE,eAAe;;AAG3B,gBAAiB;EAChB,UAAU,EAAE,UAAU;EACtB,KAAK,EA7DK,IAAI;EA8Dd,KAAK,EAAE,IAAI;EACX,IAAI,EAAE,4CAA0B;EAChC,OAAO,EAAE,MAAM;EACf,KAAK,EAAE,IAAI;EAEX,sDAAsD;EACtD,oBAAI;IACH,UAAU,EAAE,sBAAsB;EAGnC,sCAAsB;IACrB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;EAGZ,4BAAY;IACX,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,GAAG;IACf,KAAK,EAAE,IAAI;IAGX,yBAAkB;MANnB,4BAAY;QAOV,KAAK,EAAE,IAAI;IAGZ,kCAAM;MACL,OAAO,EAAE,KAAK;MACd,WAAW,EAAE,IAAI;MACjB,KAAK,EAAE,IAAI;MAGX,yBAAkB;QANnB,kCAAM;UAOJ,OAAO,EAAE,YAAY;UACrB,KAAK,EAAE,IAAI;IAIb,uEAAc;MACb,UAAU,EAAE,UAAU;MACtB,MAAM,EAAE,cAAe;MACvB,aAAa,EAAE,GAAG;MAClB,IAAI,EAAE,4CAA0B;MAChC,MAAM,EAAE,MAAM;MACd,OAAO,EAAE,QAAQ;MACjB,KAAK,EAAE,IAAI;MACX,qBAAqB,EAAE,GAAG;MAG1B,yBAAkB;QAXnB,uEAAc;UAYZ,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,aAAa;EAKxB,8BAAc;IACb,OAAO,EAAE,IAAI;EAGd,uBAAO;IACN,UAAU,EAAE,OAAmB;IAC/B,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,GAAG;IAClB,KAAK,EApIC,IAAI;IAqIV,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,0CAAwB;IAC9B,UAAU,EAAE,GAAG;IACf,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,MAAM;IACnB,qBAAqB,EAAE,GAAG;EAG3B,+BAAe;IACd,UAAU,EAAE,qCAAqC;IACjD,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;EAGZ,yCAAyB;IACxB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,IAAI;IAEX,wDAAe;MACd,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,WAAW;MACnB,OAAO,EAAE,CAAC;MAEV,2DAAG;QACF,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,IAAI;QAEX,iEAAM;UACL,OAAO,EAAE,MAAM;UACf,cAAc,EAAE,WAAW;QAG5B,iEAAM;UACL,OAAO,EAAE,KAAK;UACd,KAAK,EAAE,IAAI;UACX,YAAY,EAAE,GAAG;QAGlB,kEAAO;UACN,UAAU,EAAE,UAAU;UACtB,MAAM,EAAE,cAAe;UACvB,aAAa,EAAE,GAAG;UAClB,IAAI,EAAE,4CAA0B;UAChC,OAAO,EAAE,QAAQ;UACjB,qBAAqB,EAAE,GAAG;EAM9B,qCAAqB;IACpB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IAGX,0BAAuB;MAPxB,qCAAqB;QAQnB,aAAa,EAAE,IAAI;IAGpB,uCAAE;MACD,KAAK,EApMD,OAAO;MAqMX,eAAe,EAAE,IAAI;MAErB,4IAEQ;QACP,eAAe,EAAE,SAAS;EAK7B,gCAAgB;IACf,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IAGX,0BAAuB;MAPxB,gCAAgB;QAQd,KAAK,EAAE,GAAG;IAGX,mCAAG;MACF,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,CAAC;MAEV,sCAAG;QACF,MAAM,EAAE,cAAgB;QAAE,+EAA+E;QACzG,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;IAIb,4CAAY;MACX,UAAU,EAAE,OAAoB;MAChC,aAAa,EAAE,IAAI;MACnB,KAAK,EAzPA,IAAI;MA0PT,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,IAAI;MACjB,MAAM,EAAE,aAAa;MACrB,OAAO,EAAE,OAAO;MAChB,UAAU,EAAE,MAAM;MAClB,KAAK,EAAE,IAAI;MACX,SAAS,EAAE,IAAI;IAGhB,8CAAc;MACb,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,GAAG;MAEV,4DAAc;QACb,OAAO,EAAE,IAAI;MAGd,wDAAU;QACT,KAAK,EA5QE,OAAO;QA6Qd,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,MAAM;IAIpB,4CAAY;MACX,MAAM,EAAE,+BAA+B;MACvC,UAAU,EAAE,gDAAgD;IAG7D,kEAAkC;MACjC,MAAM,EAAE,IAAI;MACZ,QAAQ,EAAE,QAAQ;MAClB,KAAK,EAAE,IAAI;MAEX,oFAAkB;QACjB,KAAK,EAAE,GAAG;QACV,GAAG,EAAE,CAAC;IAIR,wDAAwB;MACvB,MAAM,EAAE,IAAI;MAEZ,oCAAoC;MACpC,8DAAM;QACL,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,IAAI;MAGZ,2HAAU;QACT,cAAc,EAAE,MAAM;QACtB,eAAe,EAAE,QAAQ;MAG1B,2DAAG;QACF,OAAO,EAAE,GAAG;MAGb,uEAAe;QACd,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,iBAAiB;MAG1B,oEAAY;QACX,OAAO,EAAE,GAAG;IAId,uDAAuB;MACtB,WAAW,EAAE,IAAI;MACjB,MAAM,EAAE,IAAI;IAGb,sDAAsB;MACrB,MAAM,EAAE,MAAM;EAIhB,0BAAU;IACT,4CAA4C;IAC5C,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;EAGlB,2BAAW;IACV,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,IAAI;IAGX,0BAAuB;MANxB,2BAAW;QAOT,KAAK,EAAE,GAAG;EAIZ,4CAA4B;IAC3B,KAAK,EAAE,IAAI;IAEX,+CAAG;MACF,eAAe,EAAE,IAAI;MACrB,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,MAAM;MACf,UAAU,EAAE,MAAM;MAElB,kDAAG;QACF,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,KAAK;MAGd,iDAAE;QACD,UAAU,EAAE,IAAI;QAChB,KAAK,EAnWF,OAAO;QAoWV,OAAO,EAAE,YAAY;QACrB,IAAI,EAAE,sCAAoB;QAC1B,OAAO,EAAE,IAAI;QACb,eAAe,EAAE,SAAS;MAG3B,8DAAe;QACd,KAAK,EA9WE,IAAI;QA+WX,MAAM,EAAE,IAAI;QACZ,eAAe,EAAE,IAAI;QAErB,gEAAE;UACD,KAAK,EAnXC,IAAI;UAoXV,cAAc,EAAE,IAAI;UACpB,eAAe,EAAE,IAAI;;AAO1B,kBAAkB;AAClB,cAAe;EACd,UAAU,EAAE,iCAAiC;EAC7C,MAAM,EAAE,IAAI;EACZ,IAAI,EAAE,CAAC;EACP,QAAQ,EAAE,KAAK;EACf,GAAG,EAAE,CAAC;EACN,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;EAEd,kCAAoB;IACnB,UAAU,EA5YJ,IAAI;IA6YV,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,gBAAgB;IAC5B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,MAAM;IAAE,wBAAwB;IAC7C,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,KAAK;IAEd,uDAAqB;MACpB,UAAU,EAAE,IAAI;MAAE,mCAAmC;IAGtD,uDAAqB;MACpB,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,IAAI;MAAE,kEAAkE;MACjF,KAAK,EAAE,GAAG;IAGX,oDAAkB;MACjB,KAAK,EAAE,IAAI;MACX,GAAG,EAAE,IAAI;;AAKZ,iBAAkB;EACjB,MAAM,EAAE,OAAO;EACf,MAAM,EAAE,IAAI;EACZ,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EAEX,iDACS;IACR,UAAU,EA/aL,IAAI;IAgbT,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,aAAa;IACrB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,GAAG;IACV,iBAAiB,EAAE,aAAa;IAChC,cAAc,EAAE,aAAa;IAC7B,aAAa,EAAE,aAAa;IAC5B,YAAY,EAAE,aAAa;IAC3B,SAAS,EAAE,aAAa;EAGzB,6DACe;IACd,UAAU,EAAE,OAAkB;EAG/B,wBAAS;IACR,iBAAiB,EAAE,cAAc;IACjC,cAAc,EAAE,cAAc;IAC9B,aAAa,EAAE,cAAc;IAC7B,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,cAAc", "sources": ["../../../src/css/storelocator.scss"], "names": [], "file": "storelocator.css" diff --git a/dist/assets/css/storelocator.min.css b/dist/assets/css/storelocator.min.css index f044683..27883fb 100644 --- a/dist/assets/css/storelocator.min.css +++ b/dist/assets/css/storelocator.min.css @@ -1 +1 @@ -#page-header{display:block;float:left;max-width:800px}#page-header .bh-sl-title{color:#797874;font:400 20px/1.4 Arial,Helvetica,sans-serif}@media (min-width:1024px){#page-header .bh-sl-title{font-size:30px}}.gm-style a,.gm-style div,.gm-style label,.gm-style span{font-family:Arial,Helvetica,sans-serif}.bh-sl-window{font-size:13px}.bh-sl-error{clear:both;color:#ae2118;float:left;font-weight:700;padding:10px 0;width:100%}.bh-sl-map-container img{border-radius:0!important;box-shadow:none!important;max-height:none!important;max-width:none!important}.bh-sl-container{box-sizing:border-box;color:#555;float:left;font:400 14px/1.4 Arial,Helvetica,sans-serif;padding:0 15px;width:100%}.bh-sl-container>*{box-sizing:content-box!important}.bh-sl-container .bh-sl-form-container{clear:left;float:left;margin-top:15px;width:100%}.bh-sl-container .form-input{float:left;margin-top:3px;width:100%}@media (min-width:768px){.bh-sl-container .form-input{width:auto}}.bh-sl-container .form-input label{display:block;font-weight:700;width:100%}@media (min-width:768px){.bh-sl-container .form-input label{display:inline-block;width:auto}}.bh-sl-container .form-input input,.bh-sl-container .form-input select{box-sizing:border-box;border:1px solid #ccc;border-radius:4px;font:400 14px/1.4 Arial,Helvetica,sans-serif;margin:15px 0;padding:6px 12px;width:100%;-webkit-border-radius:4px}@media (min-width:768px){.bh-sl-container .form-input input,.bh-sl-container .form-input select{width:auto;margin:0 15px 0 10px}}.bh-sl-container .loc-alt-dist{display:none}.bh-sl-container button{background:#00447a;border:none;border-radius:4px;color:#fff;cursor:pointer;float:left;font:700 14px/1.4 Arial,Helvetica,sans-serif;margin-top:3px;padding:6px 12px;white-space:nowrap;-webkit-border-radius:4px}.bh-sl-container .bh-sl-loading{background:url(../img/ajax-loader.gif) no-repeat;float:left;margin:4px 0 0 10px;height:16px;width:16px}.bh-sl-container .bh-sl-filters-container{clear:both;float:left;margin:15px 0;width:100%}.bh-sl-container .bh-sl-filters-container .bh-sl-filters{float:left;list-style:none;margin:0 100px 0 0;padding:0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li{clear:left;display:block;float:left;margin:5px 0;width:100%}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li label{display:inline;vertical-align:text-bottom}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li input{display:block;float:left;margin-right:8px}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li select{box-sizing:border-box;border:1px solid #ccc;border-radius:4px;font:400 14px/1.4 Arial,Helvetica,sans-serif;padding:6px 12px;-webkit-border-radius:4px}.bh-sl-container .bh-sl-map-container{clear:left;float:left;margin-top:27px;width:100%}@media (min-width:1024px){.bh-sl-container .bh-sl-map-container{margin-bottom:60px}}.bh-sl-container .bh-sl-map-container a{color:#005293;text-decoration:none}.bh-sl-container .bh-sl-map-container a:active,.bh-sl-container .bh-sl-map-container a:focus,.bh-sl-container .bh-sl-map-container a:hover{text-decoration:underline}.bh-sl-container .bh-sl-loc-list{font-size:13px;height:530px;overflow-x:auto;width:100%}@media (min-width:1024px){.bh-sl-container .bh-sl-loc-list{width:30%}}.bh-sl-container .bh-sl-loc-list ul{display:block;clear:left;float:left;width:100%;list-style:none;margin:0;padding:0}.bh-sl-container .bh-sl-loc-list ul li{border:1px solid #fff;box-sizing:border-box;clear:left;cursor:pointer;display:block;float:left;width:100%}.bh-sl-container .bh-sl-loc-list .list-label{background:#00192d;border-radius:15px;color:#fff;display:block;float:left;font-weight:700;margin:10px 0 0 15px;padding:4px 7px;text-align:center;width:auto;min-width:13px}.bh-sl-container .bh-sl-loc-list .list-details{float:left;margin-left:6px;width:80%}.bh-sl-container .bh-sl-loc-list .list-details .list-content{padding:10px}.bh-sl-container .bh-sl-loc-list .list-details .loc-dist{color:#8e8e8e;font-weight:700;font-style:italic}.bh-sl-container .bh-sl-loc-list .list-focus{border:1px solid rgba(0,82,147,.4);transition:border .2s linear 0s,box-shadow .2s linear 0s}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container{height:20px;position:relative;width:100%}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container .bh-sl-close-icon{right:6px;top:0}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel{margin:0 2%}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel table{table-layout:auto;width:100%}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel table,.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel td{vertical-align:middle;border-collapse:separate}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel td{padding:1px}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel .adp-placemark{margin:10px 0;border:1px solid silver}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel .adp-marker{padding:3px}.bh-sl-container .bh-sl-loc-list .bh-sl-noresults-title{font-weight:700;margin:15px}.bh-sl-container .bh-sl-loc-list .bh-sl-noresults-desc{margin:0 15px}.bh-sl-container .loc-name{font-size:15px;font-weight:700}.bh-sl-container .bh-sl-map{float:left;height:530px;width:100%}@media (min-width:1024px){.bh-sl-container .bh-sl-map{width:70%}}.bh-sl-container .bh-sl-pagination-container{clear:both}.bh-sl-container .bh-sl-pagination-container ol{list-style-type:none;margin:0;padding:10px 0;text-align:center}.bh-sl-container .bh-sl-pagination-container ol li{color:#005293;cursor:pointer;display:inline-block;font:700 14px Arial,Helvetica,sans-serif;padding:10px}.bh-sl-container .bh-sl-pagination-container ol .bh-sl-current{color:#555;cursor:auto;text-decoration:none}.bh-sl-overlay{background:url(../img/overlay-bg.png) repeat;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10000}.bh-sl-overlay .bh-sl-modal-window{background:#fff;border-radius:10px;box-shadow:0 0 10px #656565;position:absolute;left:50%;margin-left:-460px;margin-top:60px;height:620px;width:920px;z-index:10010}.bh-sl-overlay .bh-sl-modal-window .bh-sl-map-container{margin-top:50px}.bh-sl-overlay .bh-sl-modal-window .bh-sl-modal-content{float:left;padding:0 1%;width:98%}.bh-sl-overlay .bh-sl-modal-window .bh-sl-close-icon{right:22px;top:13px}.bh-sl-close-icon{cursor:pointer;height:24px;position:absolute;width:24px}.bh-sl-close-icon:after,.bh-sl-close-icon:before{background:#ccc;content:'';display:block;height:24px;margin:-3px 0 0 -1px;position:absolute;bottom:0;left:50%;right:3px;top:3px;width:3px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.bh-sl-close-icon:hover:after,.bh-sl-close-icon:hover:before{background:#b3b3b3}.bh-sl-close-icon:before{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)} \ No newline at end of file +#page-header{display:block;float:left;max-width:800px}#page-header .bh-sl-title{color:#797874;font:normal 20px/1.4 Arial,Helvetica,sans-serif}@media (min-width:1024px){#page-header .bh-sl-title{font-size:30px}}.gm-style a,.gm-style div,.gm-style label,.gm-style span{font-family:Arial,Helvetica,sans-serif}.GMAMP-maps-pin-view{color:#000;font:400 15px/1 Arial,Helvetica,sans-serif}.bh-sl-window{font-size:13px}.bh-sl-error{clear:both;color:#ae2118;float:left;font-weight:700;padding:10px 0;width:100%}.bh-sl-map-container img{border-radius:0!important;box-shadow:none!important;max-height:none!important;max-width:none!important}.bh-sl-container{box-sizing:border-box;color:#555;float:left;font:normal 14px/1.4 Arial,Helvetica,sans-serif;padding:0 15px;width:100%}.bh-sl-container>*{box-sizing:content-box!important}.bh-sl-container .bh-sl-form-container{clear:left;float:left;margin-top:15px;width:100%}.bh-sl-container .form-input{float:left;margin-top:3px;width:100%}@media (min-width:768px){.bh-sl-container .form-input{width:auto}}.bh-sl-container .form-input label{display:block;font-weight:700;width:100%}@media (min-width:768px){.bh-sl-container .form-input label{display:inline-block;width:auto}}.bh-sl-container .form-input input,.bh-sl-container .form-input select{box-sizing:border-box;border:1px solid #ccc;border-radius:4px;font:normal 14px/1.4 Arial,Helvetica,sans-serif;margin:15px 0;padding:6px 12px;width:100%;-webkit-border-radius:4px}@media (min-width:768px){.bh-sl-container .form-input input,.bh-sl-container .form-input select{width:auto;margin:0 15px 0 10px}}.bh-sl-container .loc-alt-dist{display:none}.bh-sl-container button{background:#00447a;border:none;border-radius:4px;color:#fff;cursor:pointer;float:left;font:bold 14px/1.4 Arial,Helvetica,sans-serif;margin-top:3px;padding:6px 12px;white-space:nowrap;-webkit-border-radius:4px}.bh-sl-container .bh-sl-loading{background:url(../img/ajax-loader.gif) no-repeat;float:left;margin:4px 0 0 10px;height:16px;width:16px}.bh-sl-container .bh-sl-filters-container{clear:both;float:left;margin:15px 0;width:100%}.bh-sl-container .bh-sl-filters-container .bh-sl-filters{float:left;list-style:none;margin:0 100px 0 0;padding:0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li{clear:left;display:block;float:left;margin:5px 0;width:100%}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li label{display:inline;vertical-align:text-bottom}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li input{display:block;float:left;margin-right:8px}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li select{box-sizing:border-box;border:1px solid #ccc;border-radius:4px;font:normal 14px/1.4 Arial,Helvetica,sans-serif;padding:6px 12px;-webkit-border-radius:4px}.bh-sl-container .bh-sl-map-container{clear:left;float:left;margin-top:27px;width:100%}@media (min-width:1024px){.bh-sl-container .bh-sl-map-container{margin-bottom:60px}}.bh-sl-container .bh-sl-map-container a{color:#005293;text-decoration:none}.bh-sl-container .bh-sl-map-container a:active,.bh-sl-container .bh-sl-map-container a:focus,.bh-sl-container .bh-sl-map-container a:hover{text-decoration:underline}.bh-sl-container .bh-sl-loc-list{font-size:13px;height:530px;overflow-x:auto;width:100%}@media (min-width:1024px){.bh-sl-container .bh-sl-loc-list{width:30%}}.bh-sl-container .bh-sl-loc-list ul{display:block;clear:left;float:left;width:100%;list-style:none;margin:0;padding:0}.bh-sl-container .bh-sl-loc-list ul li{border:1px solid #fff;box-sizing:border-box;clear:left;cursor:pointer;display:block;float:left;width:100%}.bh-sl-container .bh-sl-loc-list .list-label{background:#00192d;border-radius:15px;color:#fff;display:block;float:left;font-weight:700;margin:10px 0 0 15px;padding:4px 7px;text-align:center;width:auto;min-width:13px}.bh-sl-container .bh-sl-loc-list .list-details{float:left;margin-left:6px;width:80%}.bh-sl-container .bh-sl-loc-list .list-details .list-content{padding:10px}.bh-sl-container .bh-sl-loc-list .list-details .loc-dist{color:#6c6c6c;font-weight:700;font-style:italic}.bh-sl-container .bh-sl-loc-list .list-focus{border:1px solid rgba(0,82,147,.4);transition:border .2s linear 0s,box-shadow .2s linear 0s}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container{height:20px;position:relative;width:100%}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container .bh-sl-close-icon{right:6px;top:0}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel{margin:0 2%}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel table{table-layout:auto;width:100%}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel table,.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel td{vertical-align:middle;border-collapse:separate}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel td{padding:1px}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel .adp-placemark{margin:10px 0;border:1px solid silver}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel .adp-marker{padding:3px}.bh-sl-container .bh-sl-loc-list .bh-sl-noresults-title{font-weight:700;margin:15px}.bh-sl-container .bh-sl-loc-list .bh-sl-noresults-desc{margin:0 15px}.bh-sl-container .loc-name{font-size:15px;font-weight:700}.bh-sl-container .bh-sl-map{float:left;height:530px;width:100%}@media (min-width:1024px){.bh-sl-container .bh-sl-map{width:70%}}.bh-sl-container .bh-sl-pagination-container{clear:both}.bh-sl-container .bh-sl-pagination-container ol{list-style-type:none;margin:0;padding:10px 0;text-align:center}.bh-sl-container .bh-sl-pagination-container ol li{display:inline-block;margin:0 4px}.bh-sl-container .bh-sl-pagination-container ol a{box-shadow:none;color:#005293;display:inline-block;font:bold 14px Arial,Helvetica,sans-serif;padding:10px;text-decoration:underline}.bh-sl-container .bh-sl-pagination-container ol .bh-sl-current{color:#555;cursor:auto;text-decoration:none}.bh-sl-container .bh-sl-pagination-container ol .bh-sl-current a{color:#555;pointer-events:none;text-decoration:none}.bh-sl-overlay{background:url(../img/overlay-bg.png) repeat;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10000}.bh-sl-overlay .bh-sl-modal-window{background:#fff;border-radius:10px;box-shadow:0 0 10px #656565;position:absolute;left:50%;margin-left:-460px;margin-top:60px;height:620px;width:920px;z-index:10010}.bh-sl-overlay .bh-sl-modal-window .bh-sl-map-container{margin-top:50px}.bh-sl-overlay .bh-sl-modal-window .bh-sl-modal-content{float:left;padding:0 1%;width:98%}.bh-sl-overlay .bh-sl-modal-window .bh-sl-close-icon{right:22px;top:13px}.bh-sl-close-icon{cursor:pointer;height:24px;position:absolute;width:24px}.bh-sl-close-icon:after,.bh-sl-close-icon:before{background:#ccc;content:'';display:block;height:24px;margin:-3px 0 0 -1px;position:absolute;bottom:0;left:50%;right:3px;top:3px;width:3px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.bh-sl-close-icon:hover:after,.bh-sl-close-icon:hover:before{background:#b3b3b3}.bh-sl-close-icon:before{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)} \ No newline at end of file diff --git a/dist/assets/js/geocode.min.js b/dist/assets/js/geocode.min.js index 091ac14..b1eef7d 100644 --- a/dist/assets/js/geocode.min.js +++ b/dist/assets/js/geocode.min.js @@ -1 +1 @@ -function GoogleGeocode(){var a=new google.maps.Geocoder;this.geocode=function(b,c){a.geocode({address:b},function(a,b){if(b===google.maps.GeocoderStatus.OK){var d={};d.latitude=a[0].geometry.location.lat(),d.longitude=a[0].geometry.location.lng(),c(d)}else alert("Geocode was not successful for the following reason: "+b),c(null)})}}$(function(){$("#bh-sl-user-location").on("submit",function(a){a.preventDefault();var b=$("form #bh-sl-address").val();""===b&&alert("The input box was blank.");var c=new GoogleGeocode,d=b;c.geocode(d,function(a){if(null!==a){var b=a.latitude,c=a.longitude;$("#geocode-result").append("Latitude: "+b+"
Longitude: "+c+"

")}else alert("ERROR! Unable to geocode address")})})}); \ No newline at end of file +function GoogleGeocode(){var e=new google.maps.Geocoder;this.geocode=function(o,n){e.geocode({address:o},function(o,e){var t;e===google.maps.GeocoderStatus.OK?((t={}).latitude=o[0].geometry.location.lat(),t.longitude=o[0].geometry.location.lng(),n(t)):(alert("Geocode was not successful for the following reason: "+e),n(null))})}}$(function(){$("#bh-sl-user-location").on("submit",function(o){o.preventDefault();o=$("form #bh-sl-address").val();""===o&&alert("The input box was blank."),(new GoogleGeocode).geocode(o,function(o){var e;null!==o?(e=o.latitude,o=o.longitude,$("#geocode-result").append("Latitude: "+e+"
Longitude: "+o+"

")):alert("ERROR! Unable to geocode address")})})}); \ No newline at end of file diff --git a/dist/assets/js/libs/handlebars.min.js b/dist/assets/js/libs/handlebars.min.js index 982731b..f1c27e8 100644 --- a/dist/assets/js/libs/handlebars.min.js +++ b/dist/assets/js/libs/handlebars.min.js @@ -1,3 +1 @@ -!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(21),i=e(h),j=c(22),k=c(27),l=c(28),m=e(l),n=c(25),o=e(n),p=c(20),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(18),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(19),p=e(o),q=c(20),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(7),j=c(15),k=c(17),l=e(k),m="4.0.5";b.VERSION=m;var n=7;b.COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};b.REVISION_CHANGES=o;var p="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===p)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]}};var q=l["default"].log;b.log=q,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;bc;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return a||0===a?p(a)&&0===a.length?!0:!1:!0}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===n.call(a):!1};b.isArray=p},function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0;e&&(f=e.start.line,g=e.start.column,a+=" - "+f+":"+g);for(var h=Error.prototype.constructor.call(this,a),i=0;i0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,f){j&&(j.key=b,j.index=c,j.first=0===c,j.last=!!f,k&&(j.contextPath=k+b)),i+=d(a[b],{data:j,blockParams:e.blockParams([a[b],b],[k+b,null])})}if(!b)throw new g["default"]("Must pass iterator to #each");var d=b.fn,f=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=e.appendContextPath(b.data.contextPath,b.ids[0])+"."),e.isFunction(a)&&(a=a.call(this)),b.data&&(j=e.createFrame(b.data)),a&&"object"==typeof a)if(e.isArray(a))for(var l=a.length;l>h;h++)h in a&&c(h,h,h===a.length-1);else{var m=void 0;for(var n in a)a.hasOwnProperty(n)&&(void 0!==m&&c(m,h-1),m=n,h++);void 0!==m&&c(m,h-1,!0)}return 0===h&&(i=f(this)),i})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1===arguments.length)return void 0;throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("if",function(a,b){return d.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||d.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;c>f;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=r.COMPILER_REVISION;if(b!==c){if(c>b){var d=r.REVISION_CHANGES[c],e=r.REVISION_CHANGES[b];throw new q["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new q["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=o.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=b.VM.invokePartial.call(this,c,d,e);if(null==f&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),f=e.partials[e.name](d,e)),null!=f){if(e.indent){for(var g=f.split("\n"),h=0,i=g.length;i>h&&(g[h]||h+1!==i);h++)g[h]=e.indent+g[h];f=g.join("\n")}return f}throw new q["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(e,b,e.helpers,e.partials,g,i,h)}var f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=f.data;d._setup(f),!f.partial&&a.useData&&(g=j(b,g));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=f.depths?b!==f.depths[0]?[b].concat(f.depths):f.depths:[b]),(c=k(a.main,c,e,f.depths||[],g,i))(b,f)}if(!b)throw new q["default"]("No environment passed to template");if(!a||!a.main)throw new q["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e={strict:function(a,b){if(!(b in a))throw new q["default"]('"'+b+'" not defined in '+a);return a[b]},lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:o.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=o.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){c.partial?(e.helpers=c.helpers,e.partials=c.partials,e.decorators=c.decorators):(e.helpers=e.merge(c.helpers,b.helpers),a.usePartial&&(e.partials=e.merge(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(e.decorators=e.merge(c.decorators,b.decorators)))},d._child=function(b,c,d,g){if(a.useBlockParams&&!d)throw new q["default"]("must pass block params");if(a.useDepths&&!g)throw new q["default"]("must pass parent depths");return f(e,b,a[b],c,0,d,g)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return g&&b!==g[0]&&(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var d=void 0;if(c.fn&&c.fn!==i&&(c.data=r.createFrame(c.data),d=c.data["partial-block"]=c.fn,d.partials&&(c.partials=o.extend({},c.partials,d.partials))),void 0===a&&d&&(a=d),void 0===a)throw new q["default"]("The partial "+c.name+" could not be found");return a instanceof Function?a(b,c):void 0}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?r.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),o.extend(b,g)}return b}var l=c(3)["default"],m=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var n=c(5),o=l(n),p=c(6),q=m(p),r=c(4)},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;h["default"].yy=n,n.locInfo=function(a){return new n.SourceLocation(b&&b.srcName,a)};var c=new j["default"](b);return c.accept(h["default"].parse(a))}var e=c(1)["default"],f=c(3)["default"];b.__esModule=!0,b.parse=d;var g=c(23),h=e(g),i=c(24),j=e(i),k=c(26),l=f(k),m=c(5);b.parser=h["default"];var n={};m.extend(n,l)},function(a,b){"use strict";var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[f[h]];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16], -44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(b.yytext=b.yytext.substr(5,b.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b.__esModule=!0,b["default"]=c},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(25),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;j>i;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;c>b;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substr(1,a.length-2):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g="",h=0,i=b.length;i>h;h++){var j=b[h].part,k=b[h].original!==j;if(d+=(b[h].separator||"")+j,k||".."!==j&&"."!==j&&"this"!==j)e.push(j);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===j&&(f++,g+="../")}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(l.isArray(a)&&l.isArray(b)&&a.length===b.length){for(var c=0;cc;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[];var c=b.knownHelpers;if(b.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)d in c&&(b.knownHelpers[d]=c[d]);return this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new k["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;c>d;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,n["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=n["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");d>c;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=n["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&n["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||n["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;c>b;b++){var d=this.options.blockParams[b],e=d&&l.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;g>f;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),")"]:e}var g=c(1)["default"];b.__esModule=!0;var h=c(4),i=c(6),j=g(i),k=c(5),l=c(29),m=g(l);e.prototype={nameLookup:function(a,b){return e.isValidJavaScriptVariableName(b)?[a,".",b]:[a,"[",JSON.stringify(b),"]"]},depthedLookup:function(a){return[this.aliasable("container.lookup"),'(depths, "',a,'")']},compilerInfo:function(){var a=h.COMPILER_REVISION,b=h.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return k.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;i>h;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new j["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(d);if(this.isChild)return k;var l={compiler:this.compilerInfo(),main:k};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;i>h;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new m["default"](this.options.srcName),this.decorators=new m["default"](this.options.srcName)},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));var d=0;for(var e in this.aliases){var f=this.aliases[e];this.aliases.hasOwnProperty(e)&&f.children&&f.referenceCount>1&&(b+=", alias"+ ++d+"="+e,f.children[0]="alias"+d)}var g=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths");var h=this.mergeSource(b);return a?(g.push(h),Function.apply(this,g)):this.source.wrap(["function(",g.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},blockValue:function(a){var b=this.aliasable("helpers.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("helpers.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;h>c;c++)this.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=c?[e.name," || "]:"",g=["("].concat(f,d);this.options.strict||g.push(" || ",this.aliasable("helpers.helperMissing")),g.push(")"),this.push(this.source.functionCall(g,"call",e.callParams))},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"), -e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;g>f;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);null==h?(this.context.programs.push(""),h=this.context.programs.length,d.index=h,d.name="program"+h,this.context.programs[h]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[h]=e.decorators,this.context.environments[h]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams):(d.index=h,d.name="program"+h,this.useDepths=this.useDepths||d.useDepths,this.useBlockParams=this.useBlockParams||d.useBlockParams)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new j["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;c>b;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new j["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : {}");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;d>c;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(f.isArray(a)){for(var d=[],e=0,g=a.length;g>e;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}b.__esModule=!0;var f=c(5),g=void 0;try{}catch(h){}g||(g=function(a,b,c,d){this.src="",d&&this.add(d)},g.prototype={add:function(a){f.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){f.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;c>b;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new g(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof g?a:(a=d(a,this,b),new g(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)if(a.hasOwnProperty(c)){var e=d(a[c],this);"undefined"!==e&&b.push([this.quotedString(c),":",e])}var f=this.generateList(b);return f.prepend("{"),f.add("}"),f},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;e>c;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Handlebars=e():t.Handlebars=e()}(this,function(){return s=[function(t,e,r){"use strict";function s(){var r=p();return r.compile=function(t,e){return c.compile(t,e,r)},r.precompile=function(t,e){return c.precompile(t,e,r)},r.AST=o.default,r.Compiler=c.Compiler,r.JavaScriptCompiler=l.default,r.Parser=a.parser,r.parse=a.parse,r.parseWithoutProcessing=a.parseWithoutProcessing,r}var n=r(1).default;e.__esModule=!0;var i=n(r(2)),o=n(r(45)),a=r(46),c=r(51),l=n(r(52)),u=n(r(49)),n=n(r(44)),p=i.default.create,r=s();r.create=s,n.default(r),r.Visitor=u.default,r.default=r,e.default=r,t.exports=e.default},function(t,e){"use strict";e.default=function(t){return t&&t.__esModule?t:{default:t}},e.__esModule=!0},function(t,e,r){"use strict";function s(){var e=new o.HandlebarsEnvironment;return l.extend(e,o),e.SafeString=a.default,e.Exception=c.default,e.Utils=l,e.escapeExpression=l.escapeExpression,e.VM=u,e.template=function(t){return u.template(t,e)},e}var n=r(3).default,i=r(1).default;e.__esModule=!0;var o=n(r(4)),a=i(r(37)),c=i(r(6)),l=n(r(5)),u=n(r(38)),n=i(r(44)),i=s();i.create=s,n.default(i),i.default=i,e.default=i,t.exports=e.default},function(t,e){"use strict";e.default=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e},e.__esModule=!0},function(t,e,r){"use strict";function s(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},a.registerDefaultHelpers(this),c.registerDefaultDecorators(this)}var n=r(1).default,i=(e.__esModule=!0,e.HandlebarsEnvironment=s,r(5)),o=n(r(6)),a=r(10),c=r(30),n=n(r(32)),l=r(33),u=(e.VERSION="4.7.7",e.COMPILER_REVISION=8,e.LAST_COMPATIBLE_COMPILER_REVISION=7,e.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"},"[object Object]"),r=(s.prototype={constructor:s,logger:n.default,log:n.default.log,registerHelper:function(t,e){if(i.toString.call(t)===u){if(e)throw new o.default("Arg not supported with multiple helpers");i.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(i.toString.call(t)===u)i.extend(this.partials,t);else{if(void 0===e)throw new o.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(i.toString.call(t)===u){if(e)throw new o.default("Arg not supported with multiple decorators");i.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){l.resetLoggedProperties()}},n.default.log);e.log=r,e.createFrame=i.createFrame,e.logger=n.default},function(t,e){"use strict";function r(t){return n[t]}function s(t){for(var e=1;e":">",'"':""","'":"'","`":"`","=":"="},i=/[&<>"'`=]/g,o=/[&<>"'`=]/,a=Object.prototype.toString,c=(e.toString=a,function(t){return"function"==typeof t}),l=(c(/x/)&&(e.isFunction=c=function(t){return"function"==typeof t&&"[object Function]"===a.call(t)}),e.isFunction=c,Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===a.call(t)});e.isArray=l},function(t,e,r){"use strict";function c(t,e){var e=e&&e.loc,r=void 0,s=void 0,n=void 0,i=void 0;e&&(r=e.start.line,s=e.end.line,n=e.start.column,i=e.end.column,t+=" - "+r+":"+n);for(var o=Error.prototype.constructor.call(this,t),a=0;a<=(e=s.indexOf(n.methodMap,t.toLowerCase()))?e:parseInt(t,10):t},log:function(t){if(t=n.lookupLevel(t),"undefined"!=typeof console&&n.lookupLevel(n.level)<=t){t=n.methodMap[t];console[t]||(t="log");for(var e=arguments.length,r=Array(1=m.LAST_COMPATIBLE_COMPILER_REVISION&&e<=m.COMPILER_REVISION)){if(e<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20t[0].length)||(t=e,r=i,this.options.flex));i++);return t?((s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,n[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)},options:{},performAction:function(t,r,e,s){function n(t,e){return r.yytext=r.yytext.substring(t,r.yyleng-e+t)}switch(e){case 0:if("\\\\"===r.yytext.slice(-2)?(n(0,1),this.begin("mu")):"\\"===r.yytext.slice(-1)?(n(0,1),this.begin("emu")):this.begin("mu"),r.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(n(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(r.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return r.yytext=n(1,2).replace(/\\"/g,'"'),80;case 32:return r.yytext=n(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return r.yytext=r.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};var r=new((s.prototype=r).Parser=s);function s(){this.yy={}}e.default=r,t.exports=e.default},function(t,e,r){"use strict";function s(){this.options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]}function h(t,e,r){var s=t[(e=void 0===e?t.length:e)-1],t=t[e-2];return s?"ContentStatement"===s.type?(t||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(s.original):void 0:r}function f(t,e,r){var s=t[(e=void 0===e?-1:e)+1],t=t[e+2];return s?"ContentStatement"===s.type?(t||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(s.original):void 0:r}function d(t,e,r){t=t[null==e?0:e+1];!t||"ContentStatement"!==t.type||!r&&t.rightStripped||(e=t.value,t.value=t.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),t.rightStripped=t.value!==e)}function m(t,e,r){t=t[null==e?t.length-1:e-1];if(t&&"ContentStatement"===t.type&&(r||!t.leftStripped))return e=t.value,t.value=t.value.replace(r?/\s+$/:/[ \t]+$/,""),t.leftStripped=t.value!==e,t.leftStripped}var n=r(1).default;e.__esModule=!0;n=n(r(49));(s.prototype=new n.default).Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var s=t.body,n=0,i=s.length;nthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,r=t.length;eg&&(c=g,d=b)}}if(d&&d.isMarkerInClusterBounds(a))d.addMarker(a);else{var b=new Cluster(this);b.addMarker(a),this.clusters_.push(b)}},MarkerClusterer.prototype.createClusters_=function(){if(this.ready_)for(var a,b=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),this.map_.getBounds().getNorthEast()),c=this.getExtendedBounds(b),d=0;a=this.markers_[d];d++)!a.isAdded&&this.isMarkerInBounds_(a,c)&&this.addToClosestCluster_(a)},Cluster.prototype.isMarkerAlreadyAdded=function(a){if(this.markers_.indexOf)return-1!=this.markers_.indexOf(a);for(var b,c=0;b=this.markers_[c];c++)if(b==a)return!0;return!1},Cluster.prototype.addMarker=function(a){if(this.isMarkerAlreadyAdded(a))return!1;if(this.center_){if(this.averageCenter_){var b=this.markers_.length+1,c=(this.center_.lat()*(b-1)+a.getPosition().lat())/b,d=(this.center_.lng()*(b-1)+a.getPosition().lng())/b;this.center_=new google.maps.LatLng(c,d),this.calculateBounds_()}}else this.center_=a.getPosition(),this.calculateBounds_();a.isAdded=!0,this.markers_.push(a);var e=this.markers_.length;if(ef;f++)this.markers_[f].setMap(null);return e>=this.minClusterSize_&&a.setMap(null),this.updateIcon(),!0},Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_},Cluster.prototype.getBounds=function(){for(var a,b=new google.maps.LatLngBounds(this.center_,this.center_),c=this.getMarkers(),d=0;a=c[d];d++)b.extend(a.getPosition());return b},Cluster.prototype.remove=function(){this.clusterIcon_.remove(),this.markers_.length=0,delete this.markers_},Cluster.prototype.getSize=function(){return this.markers_.length},Cluster.prototype.getMarkers=function(){return this.markers_},Cluster.prototype.getCenter=function(){return this.center_},Cluster.prototype.calculateBounds_=function(){var a=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(a)},Cluster.prototype.isMarkerInClusterBounds=function(a){return this.bounds_.contains(a.getPosition())},Cluster.prototype.getMap=function(){return this.map_},Cluster.prototype.updateIcon=function(){var a=this.map_.getZoom(),b=this.markerClusterer_.getMaxZoom();if(b&&a>b)for(var c,d=0;c=this.markers_[d];d++)c.setMap(this.map_);else{if(this.markers_.length0&&this.anchor_[0]<0&&-this.anchor_[0]0&&this.anchor_[1]<0&&(r[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,o=Object.getOwnPropertySymbols(t);s<0&&Object.prototype.propertyIsEnumerable.call(t,o[s])&&(r[o[s]]=t[o[s]]);return r}class n{static isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}class a{constructor(t){var{markers:t,position:e}=t;this.markers=t,e&&(e instanceof google.maps.LatLng?this._position=e:this._position=new google.maps.LatLng(e))}get bounds(){if(0!==this.markers.length||this._position){var t=new google.maps.LatLngBounds(this._position,this._position);for(const e of this.markers)t.extend(n.getPosition(e));return t}}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>n.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(n.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const h=(t,e,r,s)=>{const o=l(t.getBounds(),e,s);return r.filter(t=>o.contains(n.getPosition(t)))},l=(t,e,r)=>{var{northEast:t,southWest:s}=z(t,e),t=c({northEast:t,southWest:s},r);return p(t,e)},s=(t,e,r)=>{t=l(t,e,r),e=t.getNorthEast(),r=t.getSouthWest();return[r.lng(),r.lat(),e.lng(),e.lat()]},u=(t,e)=>{var r=(e.lat-t.lat)*Math.PI/180,s=(e.lng-t.lng)*Math.PI/180,r=Math.sin(r/2),s=Math.sin(s/2),r=r*r+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*s*s;return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371},z=(t,e)=>({northEast:e.fromLatLngToDivPixel(t.getNorthEast()),southWest:e.fromLatLngToDivPixel(t.getSouthWest())}),c=(t,e)=>{var{northEast:t,southWest:r}=t;return t.x+=e,t.y-=e,r.x-=e,r.y+=e,{northEast:t,southWest:r}},p=(t,e)=>{var{northEast:t,southWest:r}=t,r=e.fromDivPixelToLatLng(r),e=e.fromDivPixelToLatLng(t);return new google.maps.LatLngBounds(r,e)};class t{constructor(t){var{maxZoom:t=16}=t;this.maxZoom=t}noop(t){t=t.markers;return r(t)}}class e extends t{constructor(t){var{viewportPadding:e=60}=t;super(i(t,["viewportPadding"])),this.viewportPadding=60,this.viewportPadding=e}calculate(t){var{markers:t,map:e,mapCanvasProjection:r}=t;return e.getZoom()>=this.maxZoom?{clusters:this.noop({markers:t}),changed:!1}:{clusters:this.cluster({markers:h(e,r,t,this.viewportPadding),map:e,mapCanvasProjection:r})}}}const r=t=>t.map(t=>new a({position:n.getPosition(t),markers:[t]}));var m,d,g=(d=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var s,o,i;if(Array.isArray(e)){if((s=e.length)!=r.length)return!1;for(o=s;0!=o--;)if(!t(e[o],r[o]))return!1}else{if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((s=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=s;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=s;0!=o--;){var a=i[o];if(!t(e[a],r[a]))return!1}}return!0}return e!=e&&r!=r})&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d;const f=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class v{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var[e,r]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");e=r>>4;if(1!=e)throw new Error(`Got v${e} data when expected v1.`);var s,e=f[15&r];if(e)return[r]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1),new v(s,r,e,t);throw new Error("Unrecognized array type.")}constructor(t,e=64,r=Float64Array,s){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;var o=f.indexOf(this.ArrayType),i=2*t*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,n=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);s&&s instanceof ArrayBuffer?(this.data=s,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+n,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+i+a+n),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+n,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){var r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){var t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return function t(e,r,s,o,i,a){if(i-o<=s)return;const n=o+i>>1;k(e,r,n,o,i,a),t(e,r,s,o,n-1,1-a),t(e,r,s,1+n,i,1-a)}(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,s,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:a,nodeSize:t}=this,n=[0,i.length-1,0],h=[];for(;n.length;){var l=n.pop()||0,u=n.pop()||0,c=n.pop()||0;if(u-c<=t)for(let t=c;t<=u;t++){const n=a[2*t],g=a[2*t+1];n>=e&&n<=s&&r<=g&&g<=o&&h.push(i[t])}else{var p=c+u>>1,m=a[2*p],d=a[2*p+1];e<=m&&m<=s&&r<=d&&d<=o&&h.push(i[p]),(0===l?e<=m:r<=d)&&(n.push(c),n.push(p-1),n.push(1-l)),(0===l?m<=s:d<=o)&&(n.push(1+p),n.push(u),n.push(1-l))}}return h}within(e,r,t){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:s,coords:o,nodeSize:i}=this,a=[0,s.length-1,0],n=[],h=t*t;a.length;){var l=a.pop()||0,u=a.pop()||0,c=a.pop()||0;if(u-c<=i)for(let t=c;t<=u;t++)M(o[2*t],o[2*t+1],e,r)<=h&&n.push(s[t]);else{var p=c+u>>1,m=o[2*p],d=o[2*p+1];M(m,d,e,r)<=h&&n.push(s[p]),(0===l?e-t<=m:r-t<=d)&&(a.push(c),a.push(p-1),a.push(1-l)),(0===l?m<=e+t:d<=r+t)&&(a.push(1+p),a.push(u),a.push(1-l))}}return n}}function k(r,s,o,i,a,n){for(;ip&&w(r,s,i,a);tp;)e--}s[2*i+n]===p?w(r,s,i,e):w(r,s,++e,a),e<=o&&(i=e+1),o<=e&&(a=e-1)}}function w(t,e,r,s){y(t,r,s),y(e,2*r,2*s),y(e,2*r+1,2*s+1)}function y(t,e,r){var s=t[e];t[e]=t[r],t[r]=s}function M(t,e,r,s){t-=r,r=e-s;return t*t+r*r}const U={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},x=Math.fround||(m=new Float32Array(1),t=>(m[0]=+t,m[0])),C=3,P=5,_=6;class E{constructor(t){this.options=Object.assign(Object.create(U),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:r,minZoom:s,maxZoom:o}=this.options,i=(r&&console.time("total time"),`prepare ${e.length} points`);r&&console.time(i),this.points=e;var a=[];for(let t=0;t=s;t--){const s=+Date.now();n=this.trees[t]=this._createTree(this._cluster(n,t)),r&&console.log("z%d: %d clusters in %dms",t,n.numItems,+Date.now()-s)}return r&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;var s=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;var i=Math.max(-90,Math.min(90,t[3]));if(360<=t[2]-t[0])r=-180,o=180;else if(r>o){const t=this.getClusters([r,s,180,i],e),a=this.getClusters([-180,s,o,i],e);return t.concat(a)}const a=this.trees[this._limitZoom(e)],n=a.range(L(r),O(i),L(o),O(s)),h=a.data,l=[];for(const t of n){const e=this.stride*t;l.push(1=i.length)throw new Error(s);var a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),n=i[e*this.stride],h=i[e*this.stride+1],l=[];for(const e of o.within(n,h,a)){const r=e*this.stride;i[4+r]===t&&l.push(1a&&(o+=l[e+P])}if(o>f&&o>=r){let t,e=n*f,r=d*f,s=-1;var p,m=((i/c|0)<<5)+(a+1)+this.points.length;for(const n of g){const u=n*c;l[2+u]<=a||(l[2+u]=a,p=l[u+P],e+=l[u]*p,r+=l[1+u]*p,l[4+u]=m,h&&(t||(t=this._map(l,i,!0),s=this.clusterProps.length,this.clusterProps.push(t)),h(t,this._map(l,u))))}l[i+4]=m,u.push(e/o,r/o,1/0,m,-1,o),h&&u.push(s)}else{for(let t=0;t>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(1<0?0:1{var e=n.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}});this.superCluster.load(r)}return e||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(e=!g(this.state,r)),this.state=r,e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e}}cluster(t){t=t.map;return this.superCluster.getClusters([-180,-90,180,90],Math.round(t.getZoom())).map(t=>this.transformCluster(t))}transformCluster(t){var{geometry:{coordinates:[t,e]},properties:r}=t;return r.cluster?new a({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(t=>t.properties.marker),position:{lat:e,lng:t}}):(e=r.marker,new a({markers:[e],position:n.getPosition(e)}))}}class I{constructor(t,e){this.markers={sum:t.length};var t=e.map(t=>t.count),r=t.reduce((t,e)=>t+e,0);this.clusters={count:e.length,markers:{mean:r/e.length,sum:r,min:Math.min(...t),max:Math.max(...t)}}}}class T{render(t,e,r){var{count:t,position:s}=t,o=` + + + +${t} +`,i=`Cluster of ${t} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+t;if(n.isAdvancedMarkerAvailable(r)){const t=(new DOMParser).parseFromString(o,"image/svg+xml").documentElement,e=(t.setAttribute("transform","translate(0 25)"),{map:r,position:s,zIndex:a,title:i,content:t});return new google.maps.marker.AdvancedMarkerElement(e)}e={position:s,zIndex:a,title:i,icon:{url:"data:image/svg+xml;base64,"+btoa(o),anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(e)}}class j{constructor(){var t,e=j,r=google.maps.OverlayView;for(t in r.prototype)e.prototype[t]=r.prototype[t]}}o.MarkerClustererEvents=void 0,(d=o.MarkerClustererEvents||(o.MarkerClustererEvents={})).CLUSTERING_BEGIN="clusteringbegin",d.CLUSTERING_END="clusteringend",d.CLUSTER_CLICK="click";const S=(t,e,r)=>{r.fitBounds(e.bounds)};return o.AbstractAlgorithm=t,o.AbstractViewportAlgorithm=e,o.Cluster=a,o.ClusterStats=I,o.DefaultRenderer=T,o.GridAlgorithm=class extends e{constructor(t){var{maxDistance:e=4e4,gridSize:r=40}=t;super(i(t,["maxDistance","gridSize"])),this.clusters=[],this.state={zoom:-1},this.maxDistance=e,this.gridSize=r}calculate(t){var{markers:t,map:e,mapCanvasProjection:r}=t,s={zoom:e.getZoom()};let o=!1;return this.state.zoom>=this.maxZoom&&s.zoom>=this.maxZoom||(o=!g(this.state,s)),this.state=s,e.getZoom()>=this.maxZoom?{clusters:this.noop({markers:t}),changed:o}:{clusters:this.cluster({markers:h(e,r,t,this.viewportPadding),map:e,mapCanvasProjection:r})}}cluster(t){let{markers:e,map:r,mapCanvasProjection:s}=t;return this.clusters=[],e.forEach(t=>{this.addToClosestCluster(t,r,s)}),this.clusters}addToClosestCluster(e,t,r){let s=this.maxDistance,o=null;for(let t=0;t{this.addMarker(t,!0)}),e||this.render()}removeMarker(t,e){var r=this.markers.indexOf(t);return-1!==r&&(n.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}removeMarkers(t,e){let r=!1;return t.forEach(t=>{r=this.removeMarker(t,!0)||r}),r&&!e&&this.render(),r}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,o.MarkerClustererEvents.CLUSTERING_BEGIN,this);var{clusters:e,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||null==r){const o=new Set;for(const t of e)1==t.markers.length&&o.add(t.markers[0]);const t=[];for(const s of this.clusters)null!=s.marker&&(1==s.markers.length?o.has(s.marker)||n.setMap(s.marker,null):t.push(s.marker));this.clusters=e,this.renderClusters(),requestAnimationFrame(()=>t.forEach(t=>n.setMap(t,null)))}google.maps.event.trigger(this,o.MarkerClustererEvents.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(t=>n.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){const t=new I(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(e=>{1===e.markers.length?e.marker=e.markers[0]:(e.marker=this.renderer.render(e,t,r),e.markers.forEach(t=>n.setMap(t,null)),this.onClusterClick&&e.marker.addListener("click",t=>{google.maps.event.trigger(this,o.MarkerClustererEvents.CLUSTER_CLICK,e),this.onClusterClick(t,e,r)})),n.setMap(e.marker,r)})}},o.MarkerUtils=n,o.NoopAlgorithm=class extends t{constructor(t){super(i(t,[]))}calculate(t){var{markers:t,map:e,mapCanvasProjection:r}=t;return{clusters:this.cluster({markers:t,map:e,mapCanvasProjection:r}),changed:!1}}cluster(t){return this.noop(t)}},o.SuperClusterAlgorithm=Z,o.SuperClusterViewportAlgorithm=class extends e{constructor(t){var{maxZoom:e,radius:r=60,viewportPadding:s=60}=t,t=i(t,["maxZoom","radius","viewportPadding"]);super({maxZoom:e,viewportPadding:s}),this.superCluster=new E(Object.assign({maxZoom:this.maxZoom,radius:r},t)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(t){const e={zoom:Math.round(t.map.getZoom()),view:s(t.map.getBounds(),t.mapCanvasProjection,this.viewportPadding)};let r=!g(this.state,e);if(!g(t.markers,this.markers)){r=!0,this.markers=[...t.markers];const e=this.markers.map(t=>{var e=n.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}});this.superCluster.load(e)}return r&&(this.clusters=this.cluster(t),this.state=e),{clusters:this.clusters,changed:r}}cluster(t){var{map:t,mapCanvasProjection:e}=t,t={zoom:Math.round(t.getZoom()),view:s(t.getBounds(),e,this.viewportPadding)};return this.superCluster.getClusters(t.view,t.zoom).map(t=>this.transformCluster(t))}transformCluster(t){var{geometry:{coordinates:[t,e]},properties:r}=t;return r.cluster?new a({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(t=>t.properties.marker),position:{lat:e,lng:t}}):(e=r.marker,new a({markers:[e],position:n.getPosition(e)}))}},o.defaultOnClusterClickHandler=S,o.distanceBetweenPoints=u,o.extendBoundsToPaddedViewport=l,o.extendPixelBounds=c,o.filterMarkersToPaddedViewport=h,o.getPaddedViewport=s,o.noop=r,o.pixelBoundsToLatLngBounds=p,Object.defineProperty(o,"__esModule",{value:!0}),o}({}); \ No newline at end of file diff --git a/dist/assets/js/plugins/storeLocator/jquery.storelocator.js b/dist/assets/js/plugins/storeLocator/jquery.storelocator.js index 30c81c1..07fbed0 100644 --- a/dist/assets/js/plugins/storeLocator/jquery.storelocator.js +++ b/dist/assets/js/plugins/storeLocator/jquery.storelocator.js @@ -1,31 +1,34 @@ -/*! jQuery Google Maps Store Locator - v3.0.1 - 2018-09-29 +/*! jQuery Google Maps Store Locator - v3.4.1 - 2024-12-20 * http://www.bjornblog.com/web/jquery-store-locator-plugin -* Copyright (c) 2018 Bjorn Holine; Licensed MIT */ +* Copyright (c) 2024 Bjorn Holine; Licensed MIT */ ;(function ($, window, document, undefined) { 'use strict'; var pluginName = 'storeLocator'; + var googleMapsScriptIsInjected = false; + var googleMapsAPIPromise = null; - // Only allow for one instantiation of this script and make sure Google Maps API is included - if (typeof $.fn[pluginName] !== 'undefined' || typeof google === 'undefined') { + // Only allow for one instantiation of this script + if (typeof $.fn[pluginName] !== 'undefined') { return; } // Variables used across multiple methods - var $this, map, listTemplate, infowindowTemplate, dataTypeRead, originalOrigin, originalData, originalZoom, dataRequest, searchInput, addressInput, olat, olng, storeNum, directionsDisplay, directionsService, prevSelectedMarkerBefore, prevSelectedMarkerAfter, firstRun, reload; + var $this, map, listTemplate, infowindowTemplate, dataTypeRead, originalOrigin, originalData, originalZoom, dataRequest, searchInput, addressInput, olat, olng, storeNum, directionsDisplay, directionsService, prevSelectedMarkerBefore, prevSelectedMarkerAfter, firstRun, reload, nameAttrs, originalFilterVals, paginationPage, locationsTotal; var featuredset = [], locationset = [], normalset = [], markers = []; - var filters = {}, locationData = {}, GeoCodeCalc = {}, mappingObj = {}; + var filters = {}, locationData = {}, GeoCodeCalc = {}, mappingObj = {}, disabledFilterVals = {}; // Create the defaults once. DO NOT change these settings in this file - settings should be overridden in the plugin call var defaults = { 'ajaxData' : null, 'altDistanceNoResult' : false, + 'apiKey' : null, 'autoComplete' : false, 'autoCompleteDisableListener': false, 'autoCompleteOptions' : {}, 'autoGeocode' : false, - 'bounceMarker' : true, + 'bounceMarker' : true, // Deprecated. 'catMarkers' : null, 'dataLocation' : 'data/locations.json', 'dataRaw' : null, @@ -39,21 +42,24 @@ 'dragSearch' : false, 'exclusiveFiltering' : false, 'exclusiveTax' : null, + 'featuredDistance' : null, 'featuredLocations' : false, 'fullMapStart' : false, 'fullMapStartBlank' : false, 'fullMapStartListLimit' : false, 'infoBubble' : null, 'inlineDirections' : false, + 'lazyLoadMap' : false, 'lengthUnit' : 'm', 'listColor1' : '#ffffff', 'listColor2' : '#eeeeee', 'loading' : false, 'locationsPerPage' : 10, 'mapSettings' : { - mapTypeId: google.maps.MapTypeId.ROADMAP, - zoom : 12 + mapTypeId: 'roadmap', + zoom : 12, }, + 'mapSettingsID' : '', 'markerCluster' : null, 'markerImg' : null, 'markerDim' : null, @@ -78,33 +84,34 @@ 'visibleMarkersList' : false, 'xmlElement' : 'marker', // HTML elements - 'addressID' : 'bh-sl-address', - 'closeIcon' : 'bh-sl-close-icon', - 'formContainer' : 'bh-sl-form-container', - 'formID' : 'bh-sl-user-location', - 'geocodeID' : null, - 'lengthSwapID' : 'bh-sl-length-swap', - 'loadingContainer' : 'bh-sl-loading', - 'locationList' : 'bh-sl-loc-list', - 'mapID' : 'bh-sl-map', - 'maxDistanceID' : 'bh-sl-maxdistance', - 'modalContent' : 'bh-sl-modal-content', - 'modalWindow' : 'bh-sl-modal-window', - 'orderID' : 'bh-sl-order', - 'overlay' : 'bh-sl-overlay', - 'regionID' : 'bh-sl-region', - 'searchID' : 'bh-sl-search', - 'sortID' : 'bh-sl-sort', - 'taxonomyFiltersContainer' : 'bh-sl-filters-container', + 'addressID' : 'bh-sl-address', + 'closeIcon' : 'bh-sl-close-icon', + 'formContainer' : 'bh-sl-form-container', + 'formID' : 'bh-sl-user-location', + 'geocodeID' : null, + 'lengthSwapID' : 'bh-sl-length-swap', + 'loadingContainer' : 'bh-sl-loading', + 'locationList' : 'bh-sl-loc-list', + 'mapID' : 'bh-sl-map', + 'maxDistanceID' : 'bh-sl-maxdistance', + 'modalContent' : 'bh-sl-modal-content', + 'modalWindow' : 'bh-sl-modal-window', + 'orderID' : 'bh-sl-order', + 'overlay' : 'bh-sl-overlay', + 'regionID' : 'bh-sl-region', + 'searchID' : 'bh-sl-search', + 'sortID' : 'bh-sl-sort', + 'taxonomyFiltersContainer': 'bh-sl-filters-container', // Templates - 'infowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/infowindow-description.html', - 'listTemplatePath' : 'assets/js/plugins/storeLocator/templates/location-list-description.html', - 'KMLinfowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-infowindow-description.html', - 'KMLlistTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-location-list-description.html', - 'listTemplateID' : null, - 'infowindowTemplateID' : null, + 'infowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/infowindow-description.html', + 'listTemplatePath' : 'assets/js/plugins/storeLocator/templates/location-list-description.html', + 'KMLinfowindowTemplatePath': 'assets/js/plugins/storeLocator/templates/kml-infowindow-description.html', + 'KMLlistTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-location-list-description.html', + 'listTemplateID' : null, + 'infowindowTemplateID' : null, // Callbacks 'callbackAutoGeoSuccess' : null, + 'callbackBeforeMapInject' : null, 'callbackBeforeSend' : null, 'callbackCloseDirections' : null, 'callbackCreateMarker' : null, @@ -128,17 +135,17 @@ 'callbackSorting' : null, 'callbackSuccess' : null, // Language options - 'addressErrorAlert' : 'Unable to find address', - 'autoGeocodeErrorAlert' : 'Automatic location detection failed. Please fill in your address or zip code.', - 'distanceErrorAlert' : 'Unfortunately, our closest location is more than ', - 'kilometerLang' : 'kilometer', - 'kilometersLang' : 'kilometers', - 'mileLang' : 'mile', - 'milesLang' : 'miles', - 'noResultsTitle' : 'No results', - 'noResultsDesc' : 'No locations were found with the given criteria. Please modify your selections or input.', - 'nextPage' : 'Next »', - 'prevPage' : '« Prev' + 'addressErrorAlert' : 'Unable to find address', + 'autoGeocodeErrorAlert': 'Automatic location detection failed. Please fill in your address or zip code.', + 'distanceErrorAlert' : 'Unfortunately, our closest location is more than ', + 'kilometerLang' : 'kilometer', + 'kilometersLang' : 'kilometers', + 'mileLang' : 'mile', + 'milesLang' : 'miles', + 'noResultsTitle' : 'No results', + 'noResultsDesc' : 'No locations were found with the given criteria. Please modify your selections or input.', + 'nextPage' : 'Next »', + 'prevPage' : '« Prev' }; // Plugin constructor @@ -148,7 +155,39 @@ this.settings = $.extend({}, defaults, options); this._defaults = defaults; this._name = pluginName; - this.init(); + + // Add Map ID to map settings if set. + if (this.settings.mapSettingsID !== '') { + this.settings.mapSettings.mapId = this.settings.mapSettingsID; + } + + // Load Google Maps API when lazy load is enabled. + if (this.settings.lazyLoadMap && this.settings.apiKey !== null && typeof google === 'undefined') { + var _this = this; + var optionsQuery = {}; + var loadMap = false; + + // Load new marker library. + optionsQuery.libraries = 'marker'; + + // Autocomplete. + if (this.settings.autoComplete === true) { + optionsQuery.libraries = 'places,marker'; + } + + // Allow callback to resolve map loading when set. + if (this.settings.callbackBeforeMapInject) { + new Promise(function (resolve, reject) { + _this.settings.callbackBeforeMapInject.call(this, options, resolve); + }).then(function () { + _this.triggerMapLoad(optionsQuery) + }); + } else { + _this.triggerMapLoad(optionsQuery) + } + } else { + this.init(); + } } // Avoid Plugin.prototype conflicts @@ -160,6 +199,7 @@ init: function () { var _this = this; this.writeDebug('init'); + // Calculate geocode distance functions if (this.settings.lengthUnit === 'km') { // Kilometers @@ -193,6 +233,11 @@ } }); + // Handle distance changes on select + if (this.settings.maxDistance === true) { + this.distanceFiltering(); + } + // Do taxonomy filtering if set if (this.settings.taxonomyFilters !== null) { this.taxonomyFiltering(); @@ -204,7 +249,7 @@ // Add modal window divs if set if (this.settings.modal === true) { - // Clone the filters if there are any so they can be used in the modal + // Clone the filters if there are any, so they can be used in the modal if (this.settings.taxonomyFilters !== null) { // Clone the filters $('.' + this.settings.taxonomyFiltersContainer).clone(true, true).prependTo($this); @@ -232,9 +277,84 @@ this._loadTemplates(); }, + /** + * Trigger async map loading + */ + triggerMapLoad: function(optionsQuery) { + this.writeDebug('triggerMapLoad'); + var _this = this; + + this.loadMapsAPI(this.settings.apiKey, optionsQuery) + .then(function (map) { + _this.map = map; + _this.init(); + }); + }, + + /** + * Inject Google Maps script + * + * @param {Object} options Options query object to pass as query string parameters to Google Maps. + */ + injectGoogleMapsScript: function (options) { + this.writeDebug('injectGoogleMapsScript'); + options = (typeof options !== 'undefined') ? options : {}; + + if (googleMapsScriptIsInjected) { + throw new Error('Google Maps API is already loaded.'); + } + + var optionsQuery = Object.keys(options) + .map(k => encodeURIComponent(k) + '=' + encodeURIComponent(options[k])) + .join('&'); + var apiURL = 'https://maps.googleapis.com/maps/api/js?' + optionsQuery; + var mapScript = document.createElement('script'); + mapScript.setAttribute('src', apiURL); + mapScript.setAttribute('async', ''); + mapScript.setAttribute('defer', ''); + + // Append the script to the document head. + document.head.appendChild(mapScript); + googleMapsScriptIsInjected = true; + }, + + /** + * Load Google Maps API + * + * @param {string} apiKey Google Maps JavaScript API key. + * @param {Object} options Options query object to pass as query string parameters to Google Maps. + * + * @returns {Promise} + */ + loadMapsAPI: function (apiKey, options) { + this.writeDebug('loadMapsAPI'); + options = (typeof options !== 'undefined') ? options : {}; + var _this = this; + + if (!googleMapsAPIPromise) { + googleMapsAPIPromise = new Promise(function (resolve, reject) { + try { + window.onGoogleMapsAPILoaded = resolve; + + _this.injectGoogleMapsScript({ + key: apiKey, + loading: 'async', + callback: 'onGoogleMapsAPILoaded', + ...options, + }); + } catch (error) { + reject(error); + } + }).then(function () { window.google.maps }); + } + + return googleMapsAPIPromise; + }, + /** * Destroy - * Note: The Google map is not destroyed here because Google recommends using a single instance and reusing it (it's not really supported) + * Note: The Google map is not destroyed here because Google recommends using a single instance and reusing it + * (it's not really supported) */ destroy: function () { this.writeDebug('destroy'); @@ -301,7 +421,7 @@ } if (this.settings.pagination === true) { - $(document).off('click.'+pluginName, '.bh-sl-pagination li'); + $(document).off('click.'+pluginName, '.bh-sl-pagination li a'); } }, @@ -343,8 +463,9 @@ this.reset(); reload = true; - if ( this.settings.taxonomyFilters !== null ) { + if (this.settings.taxonomyFilters !== null) { this.formFiltersReset(); + this.resetDisabledFilterVals(); this.taxonomyFiltersInit(); } @@ -389,10 +510,39 @@ return radius * 2 * Math.asin(Math.min(1, Math.sqrt(( Math.pow(Math.sin((this.geoCodeCalcDiffRadian(lat1, lat2)) / 2.0), 2.0) + Math.cos(this.geoCodeCalcToRadian(lat1)) * Math.cos(this.geoCodeCalcToRadian(lat2)) * Math.pow(Math.sin((this.geoCodeCalcDiffRadian(lng1, lng2)) / 2.0), 2.0) )))); }, + /** + * Range helper function for coordinate validation + * + * @param min {number} minimum number allowed + * @param num {number} number to check + * @param max {number} maximum number allowed + * + * @returns {boolean} + */ + inRange: function(min, num, max){ + this.writeDebug('inRange',arguments); + num = Math.abs(num); + return isFinite(num) && (num >= min) && (num <= max); + }, + + /** + * Coordinate validation + * + * @param lat {number} latitude + * @param lng {number} longitude + * + * @returns {boolean} + */ + coordinatesInRange: function (lat, lng) { + this.writeDebug('coordinatesInRange',arguments); + return this.inRange(-90, lat, 90) && this.inRange(-180, lng, 180); + }, + /** * Check for query string * * @param param {string} query string parameter to test + * * @returns {string} query string value */ getQueryString: function(param) { @@ -523,12 +673,36 @@ }); } - // Reset button trigger + // Reset button trigger. if ($('.bh-sl-reset').length && $('#' + this.settings.mapID).length) { $(document).on('click.' + pluginName, '.bh-sl-reset', function () { _this.mapReload(); }); } + + // Track changes to the address search field. + $('#' + this.settings.addressID).on('change.'+pluginName, function () { + originalFilterVals = undefined; + disabledFilterVals = {}; + + // Unset origin tracking if input field is removed. + if ( + $.trim($('#' + _this.settings.addressID).val()) === '' && + (typeof searchInput === 'undefined' || searchInput === '') + ) { + + // Reset the origin, mapping object, and disabled filter values. + if (_this.settings.taxonomyFilters !== null && _this.settings.exclusiveFiltering === false) { + olat = undefined; + olng = undefined; + originalOrigin = undefined; + mappingObj = {}; + _this.resetDisabledFilterVals(); + _this.taxonomyFiltersInit(); + _this.mapping(null); + } + } + }); }, /** @@ -649,7 +823,7 @@ _this.map = new google.maps.Map(document.getElementById(_this.settings.mapID), myOptions); // Re-center the map when the browser is re-sized - google.maps.event.addDomListener(window, 'resize', function() { + window.addEventListener('resize', function() { var center = _this.map.getCenter(); google.maps.event.trigger(_this.map, 'resize'); _this.map.setCenter(center); @@ -658,8 +832,7 @@ // Only do this once _this.settings.fullMapStartBlank = false; myOptions.zoom = originalZoom; - } - else { + } else { // If a default location is set if (this.settings.defaultLoc === true) { this.defaultLocation(); @@ -672,7 +845,7 @@ doAutoGeo = false; // No need for additional processing } // If show full map option is true - else if (this.settings.fullMapStart === true) { + else if (this.settings.fullMapStart === true && this.settings.defaultLoc === false) { if ((this.settings.querystringParams === true && this.getQueryString(this.settings.addressID)) || (this.settings.querystringParams === true && this.getQueryString(this.settings.searchID)) || (this.settings.querystringParams === true && this.getQueryString(this.settings.maxDistanceID))) { _this.writeDebug('Using Query String'); this.processForm(null); @@ -776,6 +949,7 @@ if (results[0]) { var result = {}; result.address = results[0].formatted_address; + result.fullResult = results[0]; callbackFunction(result); } } else { @@ -791,6 +965,7 @@ * * @param num {number} the full number * @param dec {number} the number of digits to show after the decimal + * * @returns {number} */ roundNumber: function (num, dec) { @@ -802,6 +977,7 @@ * Checks to see if the object is empty. Using this instead of $.isEmptyObject for legacy browser support * * @param obj {Object} the object to check + * * @returns {boolean} */ isEmptyObject: function (obj) { @@ -818,6 +994,7 @@ * Checks to see if all the property values in the object are empty * * @param obj {Object} the object to check + * * @returns {boolean} */ hasEmptyObjectVals: function (obj) { @@ -835,6 +1012,23 @@ return objTest; }, + /** + * Checks to see if only a single taxonomy group has a selected value + * + * @param obj {Object} the object to check + * @param key {string} Key value of current filter group + * + * @returns {boolean} + */ + hasSingleGroupFilterVal: function(obj, key) { + this.writeDebug('hasSingleGroupFilterVal',arguments); + + // Copy the object so the original doesn't change. + var objCopy = Object.assign({}, obj); + + return !this.hasEmptyObjectVals(objCopy[key]); + }, + /** * Modal window close function */ @@ -923,8 +1117,9 @@ * Location distance sorting function * * @param locationsarray {array} locationset array + * @param distanceOverride {boolean} Force sort by distance */ - sortNumerically: function (locationsarray) { + sortNumerically: function (locationsarray, distanceOverride) { this.writeDebug('sortNumerically',arguments); var property = ( this.settings.sortBy !== null && @@ -932,6 +1127,10 @@ typeof this.settings.sortBy.prop !== 'undefined' ) ? this.settings.sortBy.prop : 'distance'; + if (typeof distanceOverride !== 'undefined' && distanceOverride === true) { + property = 'distance'; + } + if (this.settings.sortBy !== null && this.settings.sortBy.hasOwnProperty('order') && this.settings.sortBy.order.toString() === 'desc') { locationsarray.sort(function (a, b) { return ((b[property] < a[property]) ? -1 : ((b[property] > a[property]) ? 1 : 0)); @@ -961,47 +1160,79 @@ } }, + /** + * Run the matching between regular expression filters and string value + * + * @param filter {array} One or multiple filters to apply + * @param val {string} Value to compare + * @param inclusive {boolean} Inclusive (default) or exclusive + * + * @returns {boolean} + */ + filterMatching: function(filter, val, inclusive) { + this.writeDebug('inclusiveFilter',arguments); + inclusive = (typeof inclusive !== 'undefined') ? inclusive : true; + var applyFilters; + + // Undefined check. + if (typeof val === 'undefined') { + return false; + } + + // Modify the join depending on inclusive (AND) vs exclusive (OR). + if ( true === inclusive ) { + applyFilters = filter.join(''); + } else { + applyFilters = filter.join('|'); + } + + if ((new RegExp(applyFilters, 'i').test(val.replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '')))) { + return true; + } + + return false; + }, + /** * Filter the data with Regex * * @param data {array} data array to check for filter values * @param filters {Object} taxonomy filters object + * * @returns {boolean} */ filterData: function (data, filters) { - this.writeDebug('filterData',arguments); + this.writeDebug('filterData', arguments); var filterTest = true; for (var k in filters) { if (filters.hasOwnProperty(k)) { + var testResults = []; - // Exclusive filtering - if (this.settings.exclusiveFiltering === true || (this.settings.exclusiveTax !== null && Array.isArray(this.settings.exclusiveTax) && this.settings.exclusiveTax.indexOf(k) !== -1)) { - var filterTests = filters[k]; - var exclusiveTest = []; + for (var l = 0; l < filters[k].length; l++) { - if (typeof data[k] !== 'undefined') { - for (var l = 0; l < filterTests.length; l++) { - exclusiveTest[l] = new RegExp(filterTests[l], 'i').test(data[k].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '')); - } + // Exclusive filtering + if (this.settings.exclusiveFiltering === true || (this.settings.exclusiveTax !== null && Array.isArray(this.settings.exclusiveTax) && this.settings.exclusiveTax.indexOf(k) !== -1)) { + testResults[l] = this.filterMatching(filters[k], data[k], false); } - - if (exclusiveTest.indexOf(true) === -1) { - filterTest = false; + // Inclusive filtering + else { + testResults[l] = this.filterMatching(filters[k], data[k]); } } - // Inclusive filtering - else { - if (typeof data[k] === 'undefined' || !(new RegExp(filters[k].join(''), 'i').test(data[k].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '')))) { + + // First handle name search, then standard filtering. + if (typeof nameAttrs !== 'undefined' && nameAttrs.indexOf(k) !== -1 && testResults.indexOf(true) !== -1) { + return true; + } else { + if (testResults.indexOf(true) === -1) { filterTest = false; } } } } - if (filterTest) { - return true; - } + return filterTest; }, /** @@ -1009,41 +1240,142 @@ * * @param currentPage {number} * @param totalPages {number} + * * @returns {string} */ _paginationOutput: function(currentPage, totalPages) { this.writeDebug('_paginationOutput',arguments); - currentPage = parseFloat(currentPage); + currentPage = parseInt(currentPage); + totalPages = Math.ceil(totalPages); + var pagesStart, pagesEnd; var output = ''; var nextPage = currentPage + 1; var prevPage = currentPage - 1; + var pagesCutoff = 5; + var pagesCeiling = Math.ceil(pagesCutoff / 2); + var pagesFloor = Math.floor(pagesCutoff / 2); + + // Determine page numbers to display. + if (totalPages < pagesCutoff) { + pagesStart = 0; + pagesEnd = totalPages; + } else if (currentPage >= 0 && currentPage <= pagesCeiling) { + pagesStart = 0; + pagesEnd = pagesCutoff; + } else if ((currentPage + pagesFloor) >= totalPages) { + pagesStart = (totalPages - pagesCutoff); + pagesEnd = totalPages; + } else { + pagesStart = (currentPage - pagesCeiling); + pagesEnd = (currentPage + pagesFloor); + } // Previous page if ( currentPage > 0 ) { - output += '
  • ' + this.settings.prevPage + '
  • '; + output += '
  • '; + output += '' + this.settings.prevPage + ''; + output += '
  • '; + } + + // Additional pages indicator. + if ((currentPage + 1) >= pagesCutoff && totalPages > pagesCutoff) { + // First page link. + output += '
  • '; + output += '' + 1 + ''; + output += '
  • '; + + output += '
  • '; + output += ''; + output += '
  • '; } // Add the numbers - for (var p = 0; p < Math.ceil(totalPages); p++) { + for (var p = pagesStart; p < pagesEnd; p++) { var n = p + 1; if (p === currentPage) { - output += '
  • ' + n + '
  • '; - } - else { - output += '
  • ' + n + '
  • '; + output += '
  • '; + output += '' + n + ''; + output += '
  • '; + } else { + output += '
  • '; + output += '' + n + ''; + output += '
  • '; } } + // Additional pages indicator. + if ((currentPage + pagesCeiling) <= totalPages && totalPages > pagesCutoff) { + output += '
  • '; + output += ''; + output += '
  • '; + + // Last page link. + output += '
  • '; + output += '' + totalPages + ''; + output += '
  • '; + } + // Next page if ( nextPage < totalPages ) { - output += '
  • ' + this.settings.nextPage + '
  • '; + output += '
  • '; + output += '' + this.settings.nextPage + ''; + output += '
  • '; } return output; }, + /** + * Reset pagination after the input has changed + */ + paginationReset: function() { + this.writeDebug('paginationReset',arguments); + + var currentUrl = window.location.href; + var url = new URL(currentUrl); + + // Remove the old page in the URL. + url.searchParams.delete('bhsl-page'); + + // Update the query string param to match the new value. + if (history.pushState) { + window.history.pushState({path: url.href}, '', url.href); + } + }, + + /** + * Determine the total number of pages for pagination + */ + totalPages: function() { + this.writeDebug('totalPages',arguments); + + // Location limit. + if ( + typeof originalOrigin !== 'undefined' && + this.settings.storeLimit > 0 && + locationset.length > this.settings.storeLimit + ) { + return this.settings.storeLimit / this.settings.locationsPerPage; + } + + // WP API response after search. + if (locationsTotal > 0) { + return locationsTotal / this.settings.locationsPerPage; + } + + // Unlimited or last page. + if ( + this.settings.storeLimit === -1 || + locationset.length < this.settings.storeLimit + ) { + return locationset.length / this.settings.locationsPerPage; + } else { + return this.settings.storeLimit / this.settings.locationsPerPage; + } + }, + /** * Set up the pagination pages * @@ -1052,15 +1384,10 @@ paginationSetup: function (currentPage) { this.writeDebug('paginationSetup',arguments); var pagesOutput = ''; - var totalPages; var $paginationList = $('.bh-sl-pagination-container .bh-sl-pagination'); // Total pages - if ( this.settings.storeLimit === -1 || locationset.length < this.settings.storeLimit ) { - totalPages = locationset.length / this.settings.locationsPerPage; - } else { - totalPages = this.settings.storeLimit / this.settings.locationsPerPage; - } + var totalPages = this.totalPages(); // Current page check if (typeof currentPage === 'undefined') { @@ -1085,15 +1412,31 @@ }, /** - * Marker image setup + * Determine if the legacy or Advanced markers should be used + * + * @returns {boolean} + */ + useLegacyMarkers: function() { + this.writeDebug('useLegacyMarkers',arguments); + + return !this.settings.mapSettings.hasOwnProperty('mapId') || + this.settings.mapSettings.mapId === ''; + }, + + /** + * Legacy marker image setup + * + * Original functionality supporting the now deprecated google.maps.Marker + * This will eventually be removed in favor of markerImage below. * * @param markerUrl {string} path to marker image * @param markerWidth {number} width of marker * @param markerHeight {number} height of marker + * * @returns {Object} Google Maps icon object */ - markerImage: function (markerUrl, markerWidth, markerHeight) { - this.writeDebug('markerImage',arguments); + legacyMarkerImage: function (markerUrl, markerWidth, markerHeight) { + this.writeDebug('legacyMarkerImage',arguments); var markerImg; // User defined marker dimensions @@ -1116,15 +1459,51 @@ return markerImg; }, + /** + * Marker image setup + * + * @param markerUrl {string} path to marker image + * @param markerWidth {number} width of marker + * @param markerHeight {number} height of marker + * + * @returns {HTMLImageElement} Image element + */ + markerImage: function (markerUrl, markerWidth, markerHeight) { + this.writeDebug('markerImage',arguments); + + // Check if legacy marker image should be used + if (this.useLegacyMarkers()) { + return this.legacyMarkerImage(markerUrl, markerWidth, markerHeight); + } + + var markerImg = document.createElement('img'); + markerImg.src = markerUrl; + + // User defined marker dimensions + if (typeof markerWidth !== 'undefined' && typeof markerHeight !== 'undefined') { + markerImg.height = markerHeight; + markerImg.width = markerWidth; + } + // Default marker dimensions: 32px x 32px + else { + markerImg.height = 32; + markerImg.width = 32; + } + + return markerImg; + }, + /** * Map marker setup * * @param point {Object} LatLng of current location * @param name {string} location name * @param address {string} location address - * @param letter {string} optional letter used for front-end identification and correlation between list and points + * @param letter {string} optional letter used for front-end identification and correlation between list and + * points * @param map {Object} the Google Map * @param category {string} location category/categories + * * @returns {Object} Google Maps marker */ createMarker: function (point, name, address, letter, map, category) { @@ -1140,16 +1519,24 @@ // Break the category variable into an array if there are multiple categories for the location categories = category.split(','); // With multiple categories the color will be determined by the last matched category in the data - for(var i = 0; i < categories.length; i++) { + for (var i = 0; i < categories.length; i++) { if (categories[i] in this.settings.catMarkers) { - markerImg = this.markerImage(this.settings.catMarkers[categories[i]][0], parseInt(this.settings.catMarkers[categories[i]][1]), parseInt(this.settings.catMarkers[categories[i]][2])); + markerImg = this.markerImage( + this.settings.catMarkers[categories[i]][0], + Number(this.settings.catMarkers[categories[i]][1]), + Number(this.settings.catMarkers[categories[i]][2]) + ); } } } // Single category else { if (category in this.settings.catMarkers) { - markerImg = this.markerImage(this.settings.catMarkers[category][0], parseInt(this.settings.catMarkers[category][1]), parseInt(this.settings.catMarkers[category][2])); + markerImg = this.markerImage( + this.settings.catMarkers[category][0], + Number(this.settings.catMarkers[category][1]), + Number(this.settings.catMarkers[category][2]) + ); } } } @@ -1159,9 +1546,12 @@ if (this.settings.markerImg !== null) { if (this.settings.markerDim === null) { markerImg = this.markerImage(this.settings.markerImg); - } - else { - markerImg = this.markerImage(this.settings.markerImg, this.settings.markerDim.width, this.settings.markerDim.height); + } else { + markerImg = this.markerImage( + this.settings.markerImg, + this.settings.markerDim.width, + this.settings.markerDim.height + ); } } @@ -1173,26 +1563,47 @@ else { // Create the default markers if (this.settings.disableAlphaMarkers === true || this.settings.storeLimit === -1 || this.settings.storeLimit > 26 || this.settings.catMarkers !== null || this.settings.markerImg !== null || (this.settings.fullMapStart === true && firstRun === true && (isNaN(this.settings.fullMapStartListLimit) || this.settings.fullMapStartListLimit > 26 || this.settings.fullMapStartListLimit === -1))) { - marker = new google.maps.Marker({ - position : point, - map : map, - draggable: false, - icon: markerImg // Reverts to default marker if nothing is passed - }); + if (this.useLegacyMarkers()) { + marker = new google.maps.Marker({ + draggable: false, + icon : markerImg, // Reverts to default marker if markerImg not set. + map : map, + optimized: false, + position : point, + title : name, + }); + } else { + marker = new google.maps.marker.AdvancedMarkerElement({ + content : markerImg, // Reverts to default marker if markerImg not set. + draggable: false, + map : map, + position : point, + title : name, + }); + } } else { - // Letter markers image - letterMarkerImg = { - url: 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-b.png&text=' + letter + '&psize=16&font=fonts/Roboto-Regular.ttf&color=ff333333&ax=44&ay=48' - }; - // Letter markers - marker = new google.maps.Marker({ - position : point, - map : map, - icon : letterMarkerImg, - draggable: false - }); + if (this.useLegacyMarkers()) { + marker = new google.maps.Marker({ + draggable: false, + label : letter, + map : map, + optimized: false, + position : point, + title : name, + }); + } else { + var letterPin = new google.maps.marker.PinElement({glyph: letter}); + + marker = new google.maps.marker.AdvancedMarkerElement({ + content : letterPin.element, + draggable: false, + map : map, + position : point, + title : name, + }); + } } } @@ -1205,12 +1616,18 @@ * @param currentMarker {Object} Google Maps marker * @param storeStart {number} optional first location on the current page * @param page {number} optional current page + * * @returns {Object} extended location data object */ _defineLocationData: function (currentMarker, storeStart, page) { this.writeDebug('_defineLocationData',arguments); var indicator = ''; - this._createLocationVariables(currentMarker.get('id')); + + if (this.useLegacyMarkers()) { + this._createLocationVariables(currentMarker.get('id')); + } else { + this._createLocationVariables(currentMarker.bhslID); + } var altDistLength, distLength; @@ -1236,13 +1653,23 @@ } } + var markerId; + // Set up alpha character - var markerId = currentMarker.get('id'); + if (this.useLegacyMarkers()) { + markerId = currentMarker.get('id'); + } else { + markerId = currentMarker.bhslID; + } + // Use dot markers instead of alpha if there are more than 26 locations if (this.settings.disableAlphaMarkers === true || this.settings.storeLimit === -1 || this.settings.storeLimit > 26 || (this.settings.fullMapStart === true && firstRun === true && (isNaN(this.settings.fullMapStartListLimit) || this.settings.fullMapStartListLimit > 26 || this.settings.fullMapStartListLimit === -1))) { + if (page > 0) { + indicator = storeStart + markerId + 1; + } else { indicator = markerId + 1; - } - else { + } + } else { if (page > 0) { indicator = String.fromCharCode('A'.charCodeAt(0) + (storeStart + markerId)); } @@ -1330,38 +1757,75 @@ // Opens the infowindow when list item is clicked if (location === 'left') { infowindow.setContent(formattedAddress); - infowindow.open(marker.get('map'), marker); + + if (this.useLegacyMarkers()) { + infowindow.open(marker.get('map'), marker); + } else { + infowindow.open(marker.map, marker); + } } // Opens the infowindow when the marker is clicked else { - google.maps.event.addListener(marker, 'click', function () { - infowindow.setContent(formattedAddress); - infowindow.open(marker.get('map'), marker); - // Focus on the list - var markerId = marker.get('id'); - var $selectedLocation = $('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']'); - - if ($selectedLocation.length > 0) { - // Marker click callback - if (_this.settings.callbackMarkerClick) { - _this.settings.callbackMarkerClick.call(this, marker, markerId, $selectedLocation, locationset[markerId]); + if (this.useLegacyMarkers()) { + google.maps.event.addListener(marker, 'click', function () { + infowindow.setContent(formattedAddress); + infowindow.open(marker.get('map'), marker); + // Focus on the list + var markerId = marker.get('id'); + var $selectedLocation = $('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']'); + + if ($selectedLocation.length > 0) { + // Marker click callback + if (_this.settings.callbackMarkerClick) { + _this.settings.callbackMarkerClick.call(this, marker, markerId, $selectedLocation, locationset[markerId], _this.map); + } + + $('.' + _this.settings.locationList + ' li').removeClass('list-focus'); + $selectedLocation.addClass('list-focus'); + + // Scroll list to selected marker + var $container = $('.' + _this.settings.locationList); + $container.animate({ + scrollTop: $selectedLocation.offset().top - $container.offset().top + $container.scrollTop() + }); } - $('.' + _this.settings.locationList + ' li').removeClass('list-focus'); - $selectedLocation.addClass('list-focus'); + // Custom selected marker override + if (_this.settings.selectedMarkerImg !== null) { + _this.changeSelectedMarker(marker); + } + }); + } else { + marker.addListener('click', function (domEvent, latLng) { + infowindow.setContent(formattedAddress); + infowindow.open(marker.map, marker); + + // Focus on the list + var markerId = marker.bhslID; + var $selectedLocation = $('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']'); + + if ($selectedLocation.length > 0) { + // Marker click callback + if (_this.settings.callbackMarkerClick) { + _this.settings.callbackMarkerClick.call(this, marker, markerId, $selectedLocation, locationset[markerId], _this.map); + } + + $('.' + _this.settings.locationList + ' li').removeClass('list-focus'); + $selectedLocation.addClass('list-focus'); - // Scroll list to selected marker - var $container = $('.' + _this.settings.locationList); - $container.animate({ - scrollTop: $selectedLocation.offset().top - $container.offset().top + $container.scrollTop() - }); - } + // Scroll list to selected marker + var $container = $('.' + _this.settings.locationList); + $container.animate({ + scrollTop: $selectedLocation.offset().top - $container.offset().top + $container.scrollTop() + }); + } - // Custom selected marker override - if (_this.settings.selectedMarkerImg !== null) { - _this.changeSelectedMarker(marker); - } - }); + // Custom selected marker override + if (_this.settings.selectedMarkerImg !== null) { + _this.changeSelectedMarker(marker); + } + }); + } } }, @@ -1494,6 +1958,17 @@ paginationChange: function (newPage) { this.writeDebug('paginationChange',arguments); + var currentUrl = window.location.href; + var url = new URL(currentUrl); + + // Update the page in the URL. + url.searchParams.set('bhsl-page', parseInt(newPage) + 1); + + // Update the query string param to match the new value. + if (history.pushState) { + window.history.pushState({path: url.href}, '', url.href); + } + // Page change callback if (this.settings.callbackPageChange) { this.settings.callbackPageChange.call(this, newPage); @@ -1507,6 +1982,7 @@ * Get the address by marker ID * * @param markerID {number} location ID + * * @returns {string} formatted address */ getAddressByMarker: function(markerID) { @@ -1654,7 +2130,7 @@ $distanceInput = $('#' + this.settings.maxDistanceID), region = ''; - // Stop the form submission + // Stop the form submission. if (typeof e !== 'undefined' && e !== null) { e.preventDefault(); } @@ -1670,7 +2146,17 @@ searchInput = this.getQueryString(this.settings.searchID); distance = this.getQueryString(this.settings.maxDistanceID); - // The form should override the query string parameters + // Max distance field. + if (distance && $('#' + this.settings.maxDistanceID + ' option[value=' + distance + ']').length) { + $distanceInput.val(distance); + } + + // Update zoom if origin coordinates are available and a distance query string value is set. + if (addressInput && distance) { + _this.settings.mapSettings.zoom = 0; + } + + // The form should override the query string parameters. if ($addressInput.val() !== '') { addressInput = $addressInput.val(); } @@ -1685,6 +2171,7 @@ // Get the user input and use it addressInput = $addressInput.val() || ''; searchInput = $searchInput.val() || ''; + // Get the distance if set if (this.settings.maxDistance === true) { distance = $distanceInput.val() || ''; @@ -1732,6 +2219,10 @@ this._start(); } else if (addressInput !== '') { + // Check for existing name search and remove if address input is blank. + if (searchInput === '' && filters.hasOwnProperty('name')) { + delete filters.name; + } // Geocode the origin if needed if (typeof originalOrigin !== 'undefined' && typeof olat !== 'undefined' && typeof olng !== 'undefined' && (addressInput === originalOrigin)) { @@ -1787,6 +2278,11 @@ mappingObj.distance = distance; _this.mapping(mappingObj); } + + // Reset pagination if the input has changed. + if (typeof originalOrigin !== 'undefined' && addressInput !== originalOrigin) { + this.paginationReset(); + } }, /** @@ -1815,24 +2311,28 @@ } } + // Make sure the location coordinates are valid. + if (!this.coordinatesInRange(data.lat, data.lng)) { + this.writeDebug('locationsSetup', "location ignored because coordinates out of range: " + maxDistance, data); + return; + } + // Create the array if (this.settings.maxDistance === true && typeof maxDistance !== 'undefined' && maxDistance !== null) { if (data.distance <= maxDistance) { locationset.push( data ); - } - else { + } else { + this.writeDebug('locationsSetup', "location ignored because it is out of maxDistance: " + maxDistance, data); return; } - } - else if (this.settings.maxDistance === true && this.settings.querystringParams === true && typeof maxDistance !== 'undefined' && maxDistance !== null) { + } else if (this.settings.maxDistance === true && this.settings.querystringParams === true && typeof maxDistance !== 'undefined' && maxDistance !== null) { if (data.distance <= maxDistance) { locationset.push( data ); - } - else { + } else { + this.writeDebug('locationsSetup', "location ignored because it is out of maxDistance: " + maxDistance, data); return; } - } - else { + } else { locationset.push( data ); } }, @@ -1879,7 +2379,8 @@ }, /** - * Set up front-end ordering functionality - this ties in to sorting and that has to be enabled for this to work. + * Set up front-end ordering functionality - this ties in to sorting and that has to be enabled for this to + * work. */ order: function() { this.writeDebug('order',arguments); @@ -1912,6 +2413,45 @@ }); }, + /** + * Distance filtering + */ + distanceFiltering: function () { + this.writeDebug('distanceFiltering'); + var _this = this; + var $distanceInput = $('#' + this.settings.maxDistanceID); + + // Add event listener + $distanceInput.on('change.'+pluginName, function (e) { + e.stopPropagation(); + + // Query string parameter value updates on change. + if (_this.settings.querystringParams === true) { + var currentUrl = window.location.href; + var url = new URL(currentUrl); + + // Update the distance in the URL. + url.searchParams.set(_this.settings.maxDistanceID, this.value); + + // Update the query string param to match the new value. + if (history.pushState) { + window.history.pushState({path: url.href}, '', url.href); + } else { + window.location.replace(url.href); + } + } + + if ($('#' + _this.settings.mapID).hasClass('bh-sl-map-open') === true) { + if ((olat) && (olng)) { + _this.settings.mapSettings.zoom = 0; + _this.processForm(); + } else { + _this.mapping(mappingObj); + } + } + }); + }, + /** * Count the selected filters * @@ -2070,7 +2610,6 @@ } } } - }, /** @@ -2126,7 +2665,7 @@ // Reset pagination. if (_this.settings.pagination === true) { - _this.paginationChange(0); + _this.paginationReset(); } // Handle checkbox filters @@ -2165,10 +2704,10 @@ if ((olat) && (olng)) { if (_this.countFilters() === 0) { _this.settings.mapSettings.zoom = originalZoom; - } - else { + } else { _this.settings.mapSettings.zoom = 0; } + _this.processForm(); } else { @@ -2196,8 +2735,7 @@ if ((olat) && (olng)) { _this.settings.mapSettings.zoom = 0; _this.processForm(); - } - else { + } else { _this.mapping(mappingObj); } } @@ -2237,13 +2775,24 @@ // Set up the new list $(markers).each(function(x, marker){ - if (map.getBounds().contains(marker.getPosition())) { - // Define the location data - _this.listSetup(marker, 0, 0); + if (_this.useLegacyMarkers()) { + if (map.getBounds().contains(marker.getPosition())) { + // Define the location data + _this.listSetup(marker, 0, 0); + + // Set up the list template with the location data + listHtml = listTemplate(locations); + $('.' + _this.settings.locationList + ' > ul').append(listHtml); + } + } else { + if (map.getBounds().contains(marker.position)) { + // Define the location data + _this.listSetup(marker, 0, 0); - // Set up the list template with the location data - listHtml = listTemplate(locations); - $('.' + _this.settings.locationList + ' > ul').append(listHtml); + // Set up the list template with the location data + listHtml = listTemplate(locations); + $('.' + _this.settings.locationList + ' > ul').append(listHtml); + } } }); @@ -2269,7 +2818,7 @@ olat = mappingObj.lat = newCenter.lat(); olng = mappingObj.lng = newCenter.lng(); - // Determine the new origin addresss + // Determine the new origin address var newAddress = new this.reverseGoogleGeocode(this); newCenterCoords = new google.maps.LatLng(mappingObj.lat, mappingObj.lng); newAddress.geocode({'latLng': newCenterCoords}, function (data) { @@ -2338,29 +2887,63 @@ } var marker, - originImg = ''; + originImg; if (typeof origin !== 'undefined') { - if (this.settings.originMarkerImg !== null) { - if (this.settings.originMarkerDim === null) { - originImg = this.markerImage(this.settings.originMarkerImg); + if (this.useLegacyMarkers()) { + if (this.settings.originMarkerImg !== null) { + if (this.settings.originMarkerDim === null) { + originImg = this.markerImage(this.settings.originMarkerImg); + } + else { + originImg = this.markerImage(this.settings.originMarkerImg, this.settings.originMarkerDim.width, this.settings.originMarkerDim.height); + } } else { - originImg = this.markerImage(this.settings.originMarkerImg, this.settings.originMarkerDim.width, this.settings.originMarkerDim.height); + originImg = { + url: 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png' + }; } - } - else { - originImg = { - url: 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png' - }; - } - marker = new google.maps.Marker({ - position : originPoint, - map : map, - icon : originImg, - draggable: false - }); + marker = new google.maps.Marker({ + position : originPoint, + map : map, + icon : originImg, + draggable: false + }); + } else { + // Default green origin pin. + var defaultOriginPin = new google.maps.marker.PinElement({ + background : '#39b25e', + borderColor: '#177d3d', + glyphColor : '#177d3c' + }); + + marker = new google.maps.marker.AdvancedMarkerElement({ + content : defaultOriginPin.element, + draggable: false, + map : map, + position : originPoint, + title : name, + }); + + // Origin image. + if (this.settings.originMarkerImg !== null) { + originImg = document.createElement('img'); + + if (this.settings.originMarkerDim === null) { + originImg.src = this.settings.originMarkerImg; + } else { + originImg = this.markerImage( + this.settings.originMarkerImg, + this.settings.originMarkerDim.width, + this.settings.originMarkerDim.height, + ); + } + + marker.content = originImg; + } + } } }, @@ -2410,7 +2993,13 @@ openNearestLocation: function(nearestLoc, infowindow, storeStart, page) { this.writeDebug('openNearestLocation',arguments); - if (this.settings.openNearest !== true || typeof nearestLoc === 'undefined' || (this.settings.fullMapStart === true && firstRun === true) || (this.settings.defaultLoc === true && firstRun === true)) { + if ( + this.settings.openNearest !== true || + typeof nearestLoc === 'undefined' || + typeof originalOrigin === 'undefined' || + (this.settings.fullMapStart === true && firstRun === true && this.settings.querystringParams === false) || + (this.settings.defaultLoc === true && firstRun === true && this.settings.querystringParams === false) + ) { return; } @@ -2421,7 +3010,7 @@ _this.settings.callbackNearestLoc.call(this, _this.map, nearestLoc, infowindow, storeStart, page); } - var markerId = 0; + var markerId = (nearestLoc.hasOwnProperty('markerid')) ? nearestLoc.markerid : 0; var selectedMarker = markers[markerId]; _this.createInfowindow(selectedMarker, 'left', infowindow, storeStart, page); @@ -2460,20 +3049,15 @@ _this.settings.callbackListClick.call(this, markerId, selectedMarker, locationset[markerId], map); } - map.panTo(selectedMarker.getPosition()); - var listLoc = 'left'; - if (_this.settings.bounceMarker === true) { - selectedMarker.setAnimation(google.maps.Animation.BOUNCE); - setTimeout(function () { - selectedMarker.setAnimation(null); - _this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page); - }, 700 - ); - } - else { - _this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page); + if (_this.useLegacyMarkers()) { + map.panTo(selectedMarker.getPosition()); + } else { + map.panTo(selectedMarker.position); } + var listLoc = 'left'; + _this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page); + // Custom selected marker override if (_this.settings.selectedMarkerImg !== null) { _this.changeSelectedMarker(selectedMarker); @@ -2566,10 +3150,50 @@ }); }, + /** + * Restrict featured locations from displaying in results by a specific distance + * + * @returns {Array} + */ + featuredDistanceRestriction: function() { + this.writeDebug('featuredDistanceRestriction',arguments); + var _this = this; + + featuredset = $.grep(featuredset, function (val) { + + if (val.hasOwnProperty('distance')) { + return parseFloat(val.distance) <= parseFloat(_this.settings.featuredDistance); + } + }); + + return featuredset; + }, + + /** + * Restrict featured locations by distance. + * + * @returns {Array} + */ + featuredRestrictions: function(mappingObject) { + this.writeDebug('featuredRestrictions',arguments); + + if (this.settings.featuredDistance === null) { + return featuredset; + } + + // Featured locations radius restriction. + if (this.settings.featuredDistance !== null) { + featuredset = this.featuredDistanceRestriction(mappingObject); + } + + return featuredset; + }, + /** * The primary mapping function that runs everything * - * @param mappingObject {Object} all the potential mapping properties - latitude, longitude, origin, name, max distance, page + * @param mappingObject {Object} all the potential mapping properties - latitude, longitude, origin, name, max + * distance, page */ mapping: function (mappingObject) { this.writeDebug('mapping',arguments); @@ -2588,6 +3212,14 @@ if (typeof page === 'undefined' || originalOrigin !== addressInput ) { page = 0; } + + paginationPage = page; + } + + // Override page if the query string was set. + var queryStringPage = _this.getQueryString('bhsl-page'); + if (queryStringPage !== '') { + page = paginationPage = parseInt(queryStringPage) - 1; } // Data request @@ -2595,11 +3227,11 @@ dataRequest = _this._getData(); } else { - // Setup the origin point + // Set up the origin point originPoint = new google.maps.LatLng(orig_lat, orig_lng); - // If the origin hasn't changed use the existing data so we aren't making unneeded AJAX requests - if ((typeof originalOrigin !== 'undefined') && (origin === originalOrigin) && (typeof originalData !== 'undefined')) { + // If the origin hasn't changed use the existing data, so we aren't making unneeded AJAX requests + if ((typeof originalOrigin !== 'undefined') && (origin === originalOrigin) && (typeof originalData !== 'undefined') && this.settings.pagination !== true) { origin = originalOrigin; dataRequest = originalData; } @@ -2628,10 +3260,153 @@ } }, + /** + * Reset disabled form fields + */ + resetDisabledFilterVals: function() { + this.writeDebug('resetDisabledFilterVals'); + + for (var taxKey in this.settings.taxonomyFilters) { + if (this.settings.taxonomyFilters.hasOwnProperty(taxKey)) { + for (var x = 0; x < this.settings.taxonomyFilters[taxKey].length; x++) { + $('#' + this.settings.taxonomyFilters[taxKey] + ' input,option').each(function () { + var disabled = $(this).attr('disabled'); + + if (typeof disabled !== 'undefined') { + $(this).removeAttr('disabled'); + } + }); + } + } + } + }, + + /** + * Get available filter values + * + * @param callback + */ + getAvailableFilters: function(callback) { + this.writeDebug('getAvailableFilters'); + var availableValues = []; + + for (var location in locationset) { + if (locationset.hasOwnProperty(location)) { + // Loop through the location values. + for (var locationKey in locationset[location]) { + if (filters.hasOwnProperty(locationKey) && locationset[location][locationKey] !== '') { + if (availableValues.hasOwnProperty(locationKey)) { + var availableVal = availableValues[locationKey].concat(',', locationset[location][locationKey].replace(', ', ',').trim()); + availableValues[locationKey] = Array.from(new Set(availableVal.split(','))).toString(); + } else { + availableValues[locationKey] = locationset[location][locationKey].replace(', ', ',').trim(); + } + } + } + } + } + + // Account for missing filter properties in location set. + for (var keyName in filters) { + if (!availableValues.hasOwnProperty(keyName)) { + availableValues[keyName] = ''; + } + } + + callback(availableValues); + }, + + /** + * Disable input fields that aren't available within the current location set + */ + maybeDisableFilterOptions: function() { + this.writeDebug('maybeDisableFilterOptions'); + var availableValues = []; + var _this = this; + + // Initially reset any input/option fields that were previously disabled. + this.resetDisabledFilterVals(); + + // Loop through current location set to determine what filter values are still available. + this.getAvailableFilters( function(values) { + availableValues = values; + + // Save the original filter values for reference. + if (typeof originalFilterVals === 'undefined') { + originalFilterVals = availableValues; + } + + // Update input and option fields to disabled if they're not available. + for (var key in _this.settings.taxonomyFilters) { + if (_this.settings.taxonomyFilters.hasOwnProperty(key)) { + + // Loop through the taxonomy filter group items. + for (var i = 0; i < _this.settings.taxonomyFilters[key].length; i++) { + if (_this.settings.taxonomyFilters.hasOwnProperty(key)) { + $('#' + _this.settings.taxonomyFilters[key] + ' input, #' + _this.settings.taxonomyFilters[key] + ' option').each(function () { + + // Initial determination of values that should be disabled. + if ($(this).val() !== '' && ! Array.from(new Set(availableValues[key].split(','))).includes($(this).val())) { + if (! disabledFilterVals.hasOwnProperty(key)) { + disabledFilterVals[key] = []; + } + + // Handle select options and radio button values when there is no address input. + if ( + (typeof addressInput === 'undefined' || addressInput === '') && + ($(this).prop('tagName') === 'OPTION' || $(this).prop('type') === 'radio') && + _this.hasSingleGroupFilterVal(filters, key) && + Array.from(new Set(originalFilterVals[key].split(','))).includes($(this).val()) + ) { + return; + } + + // Handle select options and radio button values when there is address input. + if ( + (typeof addressInput !== 'undefined' || addressInput !== '') && + ($(this).prop('tagName') === 'OPTION' || $(this).prop('type') === 'radio') && + _this.hasSingleGroupFilterVal(filters, key) && + Array.from(new Set(originalFilterVals[key].split(','))).includes($(this).val()) && + _this.countFilters() === 1 + ) { + return; + } + + // Keep select options and radio button available values after one filter has been selected. + if ( + ($(this).prop('tagName') === 'OPTION' || $(this).prop('type') === 'radio') && + _this.hasSingleGroupFilterVal(filters, key) && + _this.countFilters() > 1 && + Array.from(new Set(originalFilterVals[key].split(','))).includes($(this).val()) && + ! disabledFilterVals[key].includes($(this).val()) + ) { + return; + } + + // Track disabled values. + if ( + disabledFilterVals.hasOwnProperty(key) && + Array.isArray(disabledFilterVals[key]) && + ! disabledFilterVals[key].includes($(this).val()) + ) { + disabledFilterVals[key].push($(this).val()); + } + + $(this).attr('disabled', true); + } + }); + } + } + } + } + }); + }, + /** * Processes the location data * - * @param mappingObject {Object} all the potential mapping properties - latitude, longitude, origin, name, max distance, page + * @param mappingObject {Object} all the potential mapping properties - latitude, longitude, origin, name, max + * distance, page * @param originPoint {Object} LatLng of origin point * @param data {Object} location data * @param page {number} current page number @@ -2669,16 +3444,20 @@ openMap = $mapDiv.hasClass('bh-sl-map-open'); - // Set a variable for fullMapStart so we can detect the first run + // Set a variable for fullMapStart, so we can detect the first run if ( - ( _this.settings.fullMapStart === true && openMap === false ) || - ( _this.settings.autoGeocode === true && openMap === false ) || - ( _this.settings.defaultLoc === true && openMap === false ) || - reload === true + (_this.settings.fullMapStart === true && openMap === false) || + (_this.settings.autoGeocode === true && openMap === false) || + (_this.settings.defaultLoc === true && openMap === false) ) { firstRun = true; - } - else { + } else if ( + (_this.settings.fullMapStart === true && reload === true) || + (_this.settings.autoGeocode === true && reload === true) || + (_this.settings.defaultLoc === true && reload === true) + ) { + _this.reset(); + } else { _this.reset(); } @@ -2738,8 +3517,40 @@ // Name search - using taxonomy filter to handle if (_this.settings.nameSearch === true) { - if (typeof searchInput !== 'undefined') { - filters[_this.settings.nameAttribute] = [searchInput]; + if (typeof searchInput !== 'undefined' && '' !== searchInput) { + + if (_this.settings.nameAttribute.indexOf(',')) { + nameAttrs = _this.settings.nameAttribute.split(','); + + // Multiple name attributes should swap to exclusive filtering. + if (_this.settings.exclusiveTax !== null) { + _this.settings.exclusiveTax.concat(nameAttrs); + } else { + _this.settings.exclusiveTax = nameAttrs; + } + + for (var a = 0; a < nameAttrs.length; a++) { + filters[nameAttrs[a].trim()] = [searchInput]; + } + } else { + filters[_this.settings.nameAttribute] = [searchInput]; + } + } + + // Check for a previous value. + if ( + typeof searchInput !== 'undefined' && + '' === searchInput + ) { + if (typeof nameAttrs !== 'undefined') { + for (var pa = 0; pa < nameAttrs.length; pa++) { + if (nameAttrs[pa] in filters) { + delete filters[nameAttrs[pa]]; + } + } + } else { + delete filters[_this.settings.nameAttribute]; + } } } @@ -2754,10 +3565,25 @@ if (!taxFilters[k]) { taxFilters[k] = []; } - taxFilters[k][z] = '(?=.*\\b' + filters[k][z].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '') + '\\b)'; + + // Swap pattern matching depending on name search vs. taxonomy filtering. + if (typeof nameAttrs !== 'undefined') { + if (nameAttrs.indexOf(k) !== -1) { + taxFilters[k][z] = '(?:^|\\s)' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, ''); + } else { + taxFilters[k][z] = '(?=.*' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '') + '(?!\\s))'; + } + } else { + if (k === _this.settings.nameAttribute) { + taxFilters[k][z] = '(?:^|\\s)' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, ''); + } else { + taxFilters[k][z] = '(?=.*' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '') + '(?!\\s))'; + } + } } } } + // Filter the data if (!_this.isEmptyObject(taxFilters)) { locationset = $.grep(locationset, function (val) { @@ -2768,6 +3594,23 @@ // Sorting if (_this.settings.sortBy !== null && typeof _this.settings.sortBy === 'object') { + + // Sort the multi-dimensional array by distance to get the nearest location first when enabled + if (_this.settings.openNearest === true && typeof originalOrigin !== 'undefined') { + this.sortNumerically(locationset, true); + + // Save the closest location to a variable for openNearest setting + if (typeof locationset[0] !== 'undefined') { + + if (this.settings.sortBy.hasOwnProperty('order') && this.settings.sortBy.order.toString() === 'desc') { + nearestLoc = locationset[locationset.length - 1]; + } else { + nearestLoc = locationset[0]; + } + } + } + + // Custom sorting _this.sortCustom(locationset); } else { // Sort the multi-dimensional array by distance @@ -2784,18 +3627,24 @@ } else { if (typeof locationset[0] !== 'undefined') { - if (_this.settings.distanceAlert !== -1 && locationset[0].distance > _this.settings.distanceAlert) { + if ( + _this.settings.distanceAlert !== -1 && + locationset[0].distance > _this.settings.distanceAlert && + (typeof paginationPage === 'undefined' || parseInt(paginationPage) === 1) + ) { _this.notify(_this.settings.distanceErrorAlert + _this.settings.distanceAlert + ' ' + distUnit); distError = true; } } else { + _this.emptyResult(); throw new Error('No locations found. Please check the dataLocation setting and path.'); + return; } } } - // Save the closest location to a variable for openNearest setting. + // Save the closest location to a variable for openNearest setting if (typeof locationset[0] !== 'undefined') { nearestLoc = locationset[0]; } @@ -2803,14 +3652,22 @@ // Featured locations filtering if (_this.settings.featuredLocations === true) { + // Create array for featured locations featuredset = $.grep(locationset, function (val) { - return val.featured === 'true'; + if (val.hasOwnProperty('featured')) { + return val.featured === 'true'; + } }); + // Featured location restrictions. + featuredset = _this.featuredRestrictions(mappingObject); + // Create array for normal locations normalset = $.grep(locationset, function (val) { - return val.featured !== 'true'; + if (val.hasOwnProperty('featured')) { + return val.featured !== 'true'; + } }); // Combine the arrays @@ -2818,6 +3675,15 @@ locationset = featuredset.concat(normalset); } + // Disable filter inputs if there are no locations with the values left. + if ( + (firstRun !== true && _this.settings.exclusiveFiltering === false) || + (_this.settings.fullMapStart === true && _this.settings.exclusiveFiltering === false) || + (_this.settings.defaultLoc === true && _this.settings.exclusiveFiltering === false) + ) { + _this.maybeDisableFilterOptions(); + } + // Slide in the map container if (_this.settings.slideMap === true) { $this.slideDown(); @@ -2851,12 +3717,22 @@ storeNum = _this.settings.storeLimit; } + // If fullMapStart is enabled and taxFilters is reset and name search and origin are empty, swap back to the original length. + if ( + _this.settings.fullMapStart === true && + _this.isEmptyObject(taxFilters) && + (searchInput === '' || typeof searchInput === 'undefined') && + (addressInput === '' || typeof addressInput === 'undefined') + ) { + storeNum = locationset.length; + } + // If pagination is on, change the store limit to the setting and slice the locationset array if (_this.settings.pagination === true) { storeNumToShow = _this.settings.locationsPerPage; storeStart = page * _this.settings.locationsPerPage; - if( (storeStart + storeNumToShow) > locationset.length ) { + if ( (storeStart + storeNumToShow) > locationset.length ) { storeNumToShow = _this.settings.locationsPerPage - ((storeStart + storeNumToShow) - locationset.length); } @@ -2872,7 +3748,13 @@ _this.resultsTotalCount(locationset.length); // Google maps settings - if ((_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || (_this.settings.mapSettings.zoom === 0) || (typeof origin === 'undefined') || (distError === true)) { + if ( + (_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || + (_this.settings.mapSettings.zoom === 0) || + (typeof origin === 'undefined') || + (distError === true) || + ((_this.settings.maxDistance === true && firstRun === false) && this.countFilters() > 0) + ) { myOptions = _this.settings.mapSettings; bounds = new google.maps.LatLngBounds(); } @@ -2898,13 +3780,12 @@ _this.map = new google.maps.Map(document.getElementById(_this.settings.mapID), myOptions); // Re-center the map when the browser is re-sized - google.maps.event.addDomListener(window, 'resize', function() { + window.addEventListener('resize', function() { var center = _this.map.getCenter(); google.maps.event.trigger(_this.map, 'resize'); _this.map.setCenter(center); }); - // Add map drag listener if setting is enabled and re-search on drag end if (_this.settings.dragSearch === true ) { _this.map.addListener('dragend', function() { @@ -2920,7 +3801,7 @@ _this.settings.callbackMapSet.call(this, _this.map, originPoint, originalZoom, myOptions); } - // Initialize the infowondow + // Initialize the infowindow if ( typeof InfoBubble !== 'undefined' && _this.settings.infoBubble !== null ) { var infoBubbleSettings = _this.settings.infoBubble; infoBubbleSettings.map = _this.map; @@ -2930,15 +3811,14 @@ infowindow = new google.maps.InfoWindow(); } - // Add origin marker if the setting is set _this.originMarker(_this.map, origin, originPoint); // Handle pagination - $(document).on('click.'+pluginName, '.bh-sl-pagination li', function (e) { + $(document).on('click.'+pluginName, '.bh-sl-pagination li a', function (e) { e.preventDefault(); // Run paginationChange - _this.paginationChange($(this).attr('data-page')); + _this.paginationChange($(this).parent().attr('data-page')); }); // Inline directions @@ -2957,9 +3837,37 @@ var point = new google.maps.LatLng(locationset[y].lat, locationset[y].lng); marker = _this.createMarker(point, locationset[y].name, locationset[y].address, letter, _this.map, locationset[y].category); - marker.set('id', y); + + if (_this.useLegacyMarkers()) { + marker.set('id', y); + } else { + marker.bhslID = y; + } + markers[y] = marker; - if ((_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || (_this.settings.mapSettings.zoom === 0) || (typeof origin === 'undefined') || (distError === true)) { + + // Add marker ID to location data + if (_this.useLegacyMarkers()) { + locationset[y].markerid = marker.get('id'); + } else { + locationset[y].markerid = marker.bhslID; + } + + if (this.settings.dataRaw !== null) { + for (var l = 0; l < this.settings.dataRaw.length; l++) { + if (this.settings.dataRaw[l] && this.settings.dataRaw[l].hasOwnProperty('id') && this.settings.dataRaw[l].id === locationset[y].id) { + this.settings.dataRaw[l].markerid = locationset[y].markerid; + } + } + } + + if ( + (_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || + (_this.settings.mapSettings.zoom === 0) || + (typeof origin === 'undefined') || + (distError === true) || + ((_this.settings.maxDistance === true && firstRun === false) && this.countFilters() > 0) + ) { bounds.extend(point); } // Pass variables to the pop-up infowindows @@ -2967,8 +3875,22 @@ } // Center and zoom if no origin or zoom was provided, or distance of first marker is greater than distanceAlert - if ((_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || (_this.settings.mapSettings.zoom === 0) || (typeof origin === 'undefined') || (distError === true)) { + if ( + (_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || + (_this.settings.mapSettings.zoom === 0) || + (typeof origin === 'undefined') || + (distError === true) || + ((_this.settings.maxDistance === true && firstRun === false) && this.countFilters() > 0) + ) { _this.map.fitBounds(bounds); + + // Prevent zooming in too far after fitBounds + var zoomListener = google.maps.event.addListener(_this.map, 'idle', function() { + if (_this.map.getZoom() > 16) { + _this.map.setZoom(16); + } + google.maps.event.removeListener(zoomListener); + }); } // Create the links that focus on the related marker @@ -2976,7 +3898,13 @@ locList.empty(); // Set up the location list markup - if (firstRun && _this.settings.fullMapStartListLimit !== false && !isNaN(_this.settings.fullMapStartListLimit) && _this.settings.fullMapStartListLimit !== -1) { + if ( + firstRun && + _this.settings.fullMapStartListLimit !== false && + !isNaN(_this.settings.fullMapStartListLimit) && + _this.settings.fullMapStartListLimit !== -1 && + markers.length > _this.settings.fullMapStartListLimit + ) { for (var m = 0; m < _this.settings.fullMapStartListLimit; m++) { var currentMarker = markers[m]; _this.listSetup(currentMarker, storeStart, page); @@ -3001,9 +3929,21 @@ // Open nearest location. _this.openNearestLocation(nearestLoc, infowindow, storeStart, page); - // MarkerClusterer setup - if ( typeof MarkerClusterer !== 'undefined' && _this.settings.markerCluster !== null ) { - var markerCluster = new MarkerClusterer(_this.map, markers, _this.settings.markerCluster); + // MarkerClusterer setup. + if (_this.useLegacyMarkers()) { + if ( typeof MarkerClusterer !== 'undefined' && _this.settings.markerCluster !== null ) { + var markerCluster = new MarkerClusterer(_this.map, markers, _this.settings.markerCluster); + } + } else { + if ( typeof markerClusterer !== 'undefined' ) { + var customClustererParams = _this.settings.markerCluster; + + new markerClusterer.MarkerClusterer({ + markers, + map: _this.map, + customClustererParams + }); + } } // Handle clicks from the list @@ -3016,6 +3956,22 @@ // Visible markers list _this.visibleMarkersList(_this.map, markers); + // Fill in form values from query string parameters. + if (_this.settings.querystringParams === true) { + var $addressInput = $('#' + _this.settings.addressID); + var $searchInput = $('#' + _this.settings.searchID); + + // Address field. + if (typeof mappingObj !== 'undefined' && mappingObj.hasOwnProperty('origin') && $addressInput.val() === '') { + $addressInput.val(mappingObj.origin); + } + + // Name search field. + if (typeof mappingObj !== 'undefined' && mappingObj.hasOwnProperty('name') && $searchInput.val() === '') { + $searchInput.val(mappingObj.name); + } + } + // Modal ready callback if (_this.settings.modal === true && _this.settings.callbackModalReady) { _this.settings.callbackModalReady.call(this, mappingObject); diff --git a/dist/assets/js/plugins/storeLocator/jquery.storelocator.min.js b/dist/assets/js/plugins/storeLocator/jquery.storelocator.min.js index a050bbd..ba38032 100644 --- a/dist/assets/js/plugins/storeLocator/jquery.storelocator.min.js +++ b/dist/assets/js/plugins/storeLocator/jquery.storelocator.min.js @@ -1,6 +1,5 @@ -/*! jQuery Google Maps Store Locator - v3.0.1 - 2018-09-29 +/*! jQuery Google Maps Store Locator - v3.4.1 - 2024-12-20 * http://www.bjornblog.com/web/jquery-store-locator-plugin -* Copyright (c) 2018 Bjorn Holine; Licensed MIT */ +* Copyright (c) 2024 Bjorn Holine; Licensed MIT */ -!function(a,b,c,d){"use strict";function e(b,c){g=a(b),this.element=b,this.settings=a.extend({},H,c),this._defaults=H,this._name=f,this.init()}var f="storeLocator";if("undefined"==typeof a.fn[f]&&"undefined"!=typeof google){var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z=[],A=[],B=[],C=[],D={},E={},F={},G={},H={ajaxData:null,altDistanceNoResult:!1,autoComplete:!1,autoCompleteDisableListener:!1,autoCompleteOptions:{},autoGeocode:!1,bounceMarker:!0,catMarkers:null,dataLocation:"data/locations.json",dataRaw:null,dataType:"json",debug:!1,defaultLat:null,defaultLng:null,defaultLoc:!1,disableAlphaMarkers:!1,distanceAlert:60,dragSearch:!1,exclusiveFiltering:!1,exclusiveTax:null,featuredLocations:!1,fullMapStart:!1,fullMapStartBlank:!1,fullMapStartListLimit:!1,infoBubble:null,inlineDirections:!1,lengthUnit:"m",listColor1:"#ffffff",listColor2:"#eeeeee",loading:!1,locationsPerPage:10,mapSettings:{mapTypeId:google.maps.MapTypeId.ROADMAP,zoom:12},markerCluster:null,markerImg:null,markerDim:null,maxDistance:!1,modal:!1,nameAttribute:"name",nameSearch:!1,noForm:!1,openNearest:!1,originMarker:!1,originMarkerDim:null,originMarkerImg:null,pagination:!1,querystringParams:!1,selectedMarkerImg:null,selectedMarkerImgDim:null,sessionStorage:!1,slideMap:!0,sortBy:null,storeLimit:26,taxonomyFilters:null,visibleMarkersList:!1,xmlElement:"marker",addressID:"bh-sl-address",closeIcon:"bh-sl-close-icon",formContainer:"bh-sl-form-container",formID:"bh-sl-user-location",geocodeID:null,lengthSwapID:"bh-sl-length-swap",loadingContainer:"bh-sl-loading",locationList:"bh-sl-loc-list",mapID:"bh-sl-map",maxDistanceID:"bh-sl-maxdistance",modalContent:"bh-sl-modal-content",modalWindow:"bh-sl-modal-window",orderID:"bh-sl-order",overlay:"bh-sl-overlay",regionID:"bh-sl-region",searchID:"bh-sl-search",sortID:"bh-sl-sort",taxonomyFiltersContainer:"bh-sl-filters-container",infowindowTemplatePath:"assets/js/plugins/storeLocator/templates/infowindow-description.html",listTemplatePath:"assets/js/plugins/storeLocator/templates/location-list-description.html",KMLinfowindowTemplatePath:"assets/js/plugins/storeLocator/templates/kml-infowindow-description.html",KMLlistTemplatePath:"assets/js/plugins/storeLocator/templates/kml-location-list-description.html",listTemplateID:null,infowindowTemplateID:null,callbackAutoGeoSuccess:null,callbackBeforeSend:null,callbackCloseDirections:null,callbackCreateMarker:null,callbackDirectionsRequest:null,callbackFilters:null,callbackFormVals:null,callbackGeocodeRestrictions:null,callbackJsonp:null,callbackListClick:null,callbackMapSet:null,callbackMarkerClick:null,callbackModalClose:null,callbackModalOpen:null,callbackModalReady:null,callbackNearestLoc:null,callbackNoResults:null,callbackNotify:null,callbackOrder:null,callbackPageChange:null,callbackRegion:null,callbackSorting:null,callbackSuccess:null,addressErrorAlert:"Unable to find address",autoGeocodeErrorAlert:"Automatic location detection failed. Please fill in your address or zip code.",distanceErrorAlert:"Unfortunately, our closest location is more than ",kilometerLang:"kilometer",kilometersLang:"kilometers",mileLang:"mile",milesLang:"miles",noResultsTitle:"No results",noResultsDesc:"No locations were found with the given criteria. Please modify your selections or input.",nextPage:"Next »",prevPage:"« Prev"};a.extend(e.prototype,{init:function(){var b=this;if(this.writeDebug("init"),"km"===this.settings.lengthUnit?F.EarthRadius=6367:F.EarthRadius=3956,j="kml"===this.settings.dataType?"xml":this.settings.dataType,this.settings.inlineDirections===!0&&a("."+this.settings.locationList).prepend('
    '),m=this.settings.mapSettings.zoom,Handlebars.registerHelper("niceURL",function(a){return a?a.replace("https://","").replace("http://",""):void 0}),null!==this.settings.taxonomyFilters&&this.taxonomyFiltering(),this.sorting(),this.order(),this.settings.modal===!0&&(null!==this.settings.taxonomyFilters&&a("."+this.settings.taxonomyFiltersContainer).clone(!0,!0).prependTo(g),g.wrap('
    '),a("."+this.settings.modalWindow).prepend('
    '),a("."+this.settings.overlay).hide()),this.settings.autoComplete===!0){var d=c.getElementById(this.settings.addressID),e=new google.maps.places.Autocomplete(d,this.settings.autoCompleteOptions);this.settings.autoComplete===!0&&this.settings.autoCompleteDisableListener!==!0&&e.addListener("place_changed",function(a){b.processForm(a)})}this._loadTemplates()},destroy:function(){this.writeDebug("destroy"),this.reset();var b=a("#"+this.settings.mapID);if(C.length)for(var d=0;d<=C.length;d++)google.maps.event.removeListener(C[d]);a("."+this.settings.locationList+" ul").empty(),b.hasClass("bh-sl-map-open")&&b.empty().removeClass("bh-sl-map-open"),this.settings.modal===!0&&a(". "+this.settings.overlay).remove(),b.attr("style",""),g.hide(),a.removeData(g.get(0)),a(c).off(f),g.unbind()},reset:function(){if(this.writeDebug("reset"),A=[],z=[],B=[],C=[],x=!1,a(c).off("click."+f,"."+this.settings.locationList+" li"),a("."+this.settings.locationList+" .bh-sl-close-directions-container").length&&a(".bh-sl-close-directions-container").remove(),this.settings.inlineDirections===!0){var b=a("."+this.settings.locationList+" .adp");b.length>0&&(b.remove(),a("."+this.settings.locationList+" ul").fadeIn()),a(c).off("click","."+this.settings.locationList+" li .loc-directions a")}this.settings.pagination===!0&&a(c).off("click."+f,".bh-sl-pagination li")},formFiltersReset:function(){if(this.writeDebug("formFiltersReset"),null!==this.settings.taxonomyFilters){var b=a("."+this.settings.taxonomyFiltersContainer+" input"),c=a("."+this.settings.taxonomyFiltersContainer+" select");"object"==typeof b&&(b.each(function(){(a(this).is('input[type="checkbox"]')||a(this).is('input[type="radio"]'))&&a(this).prop("checked",!1)}),c.each(function(){a(this).prop("selectedIndex",0)}))}},mapReload:function(){this.writeDebug("mapReload"),this.reset(),y=!0,null!==this.settings.taxonomyFilters&&(this.formFiltersReset(),this.taxonomyFiltersInit()),q&&r?(this.settings.mapSettings.zoom=m,this.processForm()):this.mapping(G)},notify:function(a){this.writeDebug("notify",a),this.settings.callbackNotify?this.settings.callbackNotify.call(this,a):alert(a)},geoCodeCalcToRadian:function(a){return this.writeDebug("geoCodeCalcToRadian",a),a*(Math.PI/180)},geoCodeCalcDiffRadian:function(a,b){return this.writeDebug("geoCodeCalcDiffRadian",arguments),this.geoCodeCalcToRadian(b)-this.geoCodeCalcToRadian(a)},geoCodeCalcCalcDistance:function(a,b,c,d,e){return this.writeDebug("geoCodeCalcCalcDistance",arguments),2*e*Math.asin(Math.min(1,Math.sqrt(Math.pow(Math.sin(this.geoCodeCalcDiffRadian(a,c)/2),2)+Math.cos(this.geoCodeCalcToRadian(a))*Math.cos(this.geoCodeCalcToRadian(c))*Math.pow(Math.sin(this.geoCodeCalcDiffRadian(b,d)/2),2))))},getQueryString:function(a){if(this.writeDebug("getQueryString",a),a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))}},getMap:function(){return this.map},_loadTemplates:function(){this.writeDebug("_loadTemplates");var b,c=this,d='
    Error: Could not load plugin templates. Check the paths and ensure they have been uploaded. Paths will be wrong if you do not run this from a web server.
    ';"kml"===this.settings.dataType&&null===this.settings.listTemplateID&&null===this.settings.infowindowTemplateID?a.when(a.get(this.settings.KMLinfowindowTemplatePath,function(a){b=a,i=Handlebars.compile(b)}),a.get(this.settings.KMLlistTemplatePath,function(a){b=a,h=Handlebars.compile(b)})).then(function(){c.locator()},function(){throw a("."+c.settings.formContainer).append(d),new Error("Could not load storeLocator plugin templates")}):null!==this.settings.listTemplateID&&null!==this.settings.infowindowTemplateID?(i=Handlebars.compile(a("#"+this.settings.infowindowTemplateID).html()),h=Handlebars.compile(a("#"+this.settings.listTemplateID).html()),c.locator()):a.when(a.get(this.settings.infowindowTemplatePath,function(a){b=a,i=Handlebars.compile(b)}),a.get(this.settings.listTemplatePath,function(a){b=a,h=Handlebars.compile(b)})).then(function(){c.locator()},function(){throw a("."+c.settings.formContainer).append(d),new Error("Could not load storeLocator plugin templates")})},locator:function(){this.writeDebug("locator"),this.settings.slideMap===!0&&g.hide(),this._start(),this._formEventHandler()},_formEventHandler:function(){this.writeDebug("_formEventHandler");var b=this;this.settings.noForm===!0?(a(c).on("click."+f,"."+this.settings.formContainer+" button",function(a){b.processForm(a)}),a(c).on("keydown."+f,function(c){13===c.keyCode&&a("#"+b.settings.addressID).is(":focus")&&b.processForm(c)})):a(c).on("submit."+f,"#"+this.settings.formID,function(a){b.processForm(a)}),a(".bh-sl-reset").length&&a("#"+this.settings.mapID).length&&a(c).on("click."+f,".bh-sl-reset",function(){b.mapReload()})},_getData:function(b,c,d,e,f){this.writeDebug("_getData",arguments);var g=this,h="",i="",k="";if("undefined"!=typeof e&&"undefined"!=typeof e.geometry.bounds&&(k=e.formatted_address,h=JSON.stringify(e.geometry.bounds.getNorthEast()),i=JSON.stringify(e.geometry.bounds.getSouthWest())),this.settings.callbackBeforeSend&&this.settings.callbackBeforeSend.call(this,b,c,d,k,h,i,f),null===g.settings.dataRaw){var l=a.Deferred();this.settings.loading===!0&&a("."+this.settings.formContainer).append('
    ');var m={origLat:b,origLng:c,origAddress:d,formattedAddress:k,boundsNorthEast:h,boundsSouthWest:i};return null!==this.settings.ajaxData&&"object"==typeof this.settings.ajaxData&&a.extend(m,this.settings.ajaxData),a.ajax({type:"GET",url:this.settings.dataLocation+("jsonp"===this.settings.dataType?(this.settings.dataLocation.match(/\?/)?"&":"?")+"callback=?":""),data:m,dataType:j,jsonpCallback:"jsonp"===this.settings.dataType?this.settings.callbackJsonp:null}).done(function(b){l.resolve(b),g.settings.loading===!0&&a("."+g.settings.formContainer+" ."+g.settings.loadingContainer).remove()}).fail(l.reject),l.promise()}return"xml"===j?a.parseXML(g.settings.dataRaw):"json"===j?Array.isArray&&Array.isArray(g.settings.dataRaw)?g.settings.dataRaw:"string"==typeof g.settings.dataRaw?JSON.parse(g.settings.dataRaw):[]:void 0},_start:function(){this.writeDebug("_start");var d,e=this,g=this.settings.autoGeocode;if(e.settings.fullMapStartBlank!==!1){var h=a("#"+e.settings.mapID);h.addClass("bh-sl-map-open");var i=e.settings.mapSettings;i.zoom=e.settings.fullMapStartBlank,d=new google.maps.LatLng(this.settings.defaultLat,this.settings.defaultLng),i.center=d,e.map=new google.maps.Map(c.getElementById(e.settings.mapID),i),google.maps.event.addDomListener(b,"resize",function(){var a=e.map.getCenter();google.maps.event.trigger(e.map,"resize"),e.map.setCenter(a)}),e.settings.fullMapStartBlank=!1,i.zoom=m}else this.settings.defaultLoc===!0&&this.defaultLocation(),""!==a.trim(a("#"+this.settings.addressID).val())?(e.writeDebug("Using Address Field"),e.processForm(null),g=!1):this.settings.fullMapStart===!0&&(this.settings.querystringParams===!0&&this.getQueryString(this.settings.addressID)||this.settings.querystringParams===!0&&this.getQueryString(this.settings.searchID)||this.settings.querystringParams===!0&&this.getQueryString(this.settings.maxDistanceID)?(e.writeDebug("Using Query String"),this.processForm(null),g=!1):this.mapping(null));this.settings.autoGeocode===!0&&g===!0&&(e.writeDebug("Auto Geo"),e.htmlGeocode()),null!==this.settings.autoGeocode&&(e.writeDebug("Button Geo"),a(c).on("click."+f,"#"+this.settings.geocodeID,function(){e.htmlGeocode()}))},htmlGeocode:function(){this.writeDebug("htmlGeocode",arguments);var a=this;return a.settings.sessionStorage===!0&&b.sessionStorage&&b.sessionStorage.getItem("myGeo")?(a.writeDebug("Using Session Saved Values for GEO"),a.autoGeocodeQuery(JSON.parse(b.sessionStorage.getItem("myGeo"))),!1):void(navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(c){a.writeDebug("Current Position Result");var d={coords:{latitude:c.coords.latitude,longitude:c.coords.longitude,accuracy:c.coords.accuracy}};a.settings.sessionStorage===!0&&b.sessionStorage&&b.sessionStorage.setItem("myGeo",JSON.stringify(d)),a.settings.callbackAutoGeoSuccess&&a.settings.callbackAutoGeoSuccess.call(this,d),a.autoGeocodeQuery(d)},function(b){a._autoGeocodeError(b)}))},googleGeocode:function(a){a.writeDebug("googleGeocode",arguments);var b=new google.maps.Geocoder;this.geocode=function(a,c){b.geocode(a,function(a,b){if(b!==google.maps.GeocoderStatus.OK)throw c(null),new Error("Geocode was not successful for the following reason: "+b);var d={};d.latitude=a[0].geometry.location.lat(),d.longitude=a[0].geometry.location.lng(),d.geocodeResult=a[0],c(d)})}},reverseGoogleGeocode:function(a){a.writeDebug("reverseGoogleGeocode",arguments);var b=new google.maps.Geocoder;this.geocode=function(a,c){b.geocode(a,function(a,b){if(b!==google.maps.GeocoderStatus.OK)throw c(null),new Error("Reverse geocode was not successful for the following reason: "+b);if(a[0]){var d={};d.address=a[0].formatted_address,c(d)}})}},roundNumber:function(a,b){return this.writeDebug("roundNumber",arguments),Math.round(a*Math.pow(10,b))/Math.pow(10,b)},isEmptyObject:function(a){this.writeDebug("isEmptyObject",arguments);for(var b in a)if(a.hasOwnProperty(b))return!1;return!0},hasEmptyObjectVals:function(a){this.writeDebug("hasEmptyObjectVals",arguments);var b=!0;for(var c in a)a.hasOwnProperty(c)&&""!==a[c]&&0!==a[c].length&&(b=!1);return b},modalClose:function(){this.writeDebug("modalClose"),this.settings.callbackModalClose&&this.settings.callbackModalClose.call(this),D={},a("."+this.settings.overlay+" select").prop("selectedIndex",0),a("."+this.settings.overlay+" input").prop("checked",!1),a("."+this.settings.overlay).hide()},_createLocationVariables:function(a){this.writeDebug("_createLocationVariables",arguments);var b;E={};for(var c in A[a])A[a].hasOwnProperty(c)&&(b=A[a][c],("distance"===c||"altdistance"===c)&&(b=this.roundNumber(b,2)),E[c]=b)},sortAlpha:function(a){this.writeDebug("sortAlpha",arguments);var b=this.settings.sortBy.hasOwnProperty("prop")&&"undefined"!=typeof this.settings.sortBy.prop?this.settings.sortBy.prop:"name";this.settings.sortBy.hasOwnProperty("order")&&"desc"===this.settings.sortBy.order.toString()?a.sort(function(a,c){return c[b].toLowerCase().localeCompare(a[b].toLowerCase())}):a.sort(function(a,c){return a[b].toLowerCase().localeCompare(c[b].toLowerCase())})},sortDate:function(a){this.writeDebug("sortDate",arguments);var b=this.settings.sortBy.hasOwnProperty("prop")&&"undefined"!=typeof this.settings.sortBy.prop?this.settings.sortBy.prop:"date";this.settings.sortBy.hasOwnProperty("order")&&"desc"===this.settings.sortBy.order.toString()?a.sort(function(a,c){return new Date(c[b]).getTime()-new Date(a[b]).getTime()}):a.sort(function(a,c){return new Date(a[b]).getTime()-new Date(c[b]).getTime()})},sortNumerically:function(a){this.writeDebug("sortNumerically",arguments);var b=null!==this.settings.sortBy&&this.settings.sortBy.hasOwnProperty("prop")&&"undefined"!=typeof this.settings.sortBy.prop?this.settings.sortBy.prop:"distance";null!==this.settings.sortBy&&this.settings.sortBy.hasOwnProperty("order")&&"desc"===this.settings.sortBy.order.toString()?a.sort(function(a,c){return c[b]a[b]?1:0}):a.sort(function(a,c){return a[b]c[b]?1:0})},sortCustom:function(a){this.writeDebug("sortCustom",arguments),this.settings.sortBy.hasOwnProperty("method")&&"alpha"===this.settings.sortBy.method.toString()?this.sortAlpha(a):this.settings.sortBy.hasOwnProperty("method")&&"date"===this.settings.sortBy.method.toString()?this.sortDate(a):this.sortNumerically(a)},filterData:function(a,b){this.writeDebug("filterData",arguments);var c=!0;for(var d in b)if(b.hasOwnProperty(d))if(this.settings.exclusiveFiltering===!0||null!==this.settings.exclusiveTax&&Array.isArray(this.settings.exclusiveTax)&&-1!==this.settings.exclusiveTax.indexOf(d)){var e=b[d],f=[];if("undefined"!=typeof a[d])for(var g=0;g0&&(c+='
  • '+this.settings.prevPage+"
  • ");for(var f=0;f'+g+"":'
  • '+g+"
  • "}return b>d&&(c+='
  • '+this.settings.nextPage+"
  • "),c},paginationSetup:function(b){this.writeDebug("paginationSetup",arguments);var c,d="",e=a(".bh-sl-pagination-container .bh-sl-pagination");c=-1===this.settings.storeLimit||A.length26||null!==this.settings.catMarkers||null!==this.settings.markerImg||this.settings.fullMapStart===!0&&x===!0&&(isNaN(this.settings.fullMapStartListLimit)||this.settings.fullMapStartListLimit>26||-1===this.settings.fullMapStartListLimit)?g=new google.maps.Marker({position:a,map:e,draggable:!1,icon:h}):(i={url:"https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-b.png&text="+d+"&psize=16&font=fonts/Roboto-Regular.ttf&color=ff333333&ax=44&ay=48"},g=new google.maps.Marker({position:a,map:e,icon:i,draggable:!1})),g},_defineLocationData:function(b,c,d){this.writeDebug("_defineLocationData",arguments);var e="";this._createLocationVariables(b.get("id"));var f,g;E.distance<=1?"km"===this.settings.lengthUnit?(g=this.settings.kilometerLang,f=this.settings.mileLang):(g=this.settings.mileLang,f=this.settings.kilometerLang):"km"===this.settings.lengthUnit?(g=this.settings.kilometersLang,f=this.settings.milesLang):(g=this.settings.milesLang,f=this.settings.kilometersLang);var h=b.get("id");return e=this.settings.disableAlphaMarkers===!0||-1===this.settings.storeLimit||this.settings.storeLimit>26||this.settings.fullMapStart===!0&&x===!0&&(isNaN(this.settings.fullMapStartListLimit)||this.settings.fullMapStartListLimit>26||-1===this.settings.fullMapStartListLimit)?h+1:d>0?String.fromCharCode("A".charCodeAt(0)+(c+h)):String.fromCharCode("A".charCodeAt(0)+h),{location:[a.extend(E,{markerid:h,marker:e,altlength:f,length:g,origin:k})]}},listSetup:function(b,c,d){this.writeDebug("listSetup",arguments);var e=this._defineLocationData(b,c,d),f=h(e);a("."+this.settings.locationList+" > ul").append(f)},changeSelectedMarker:function(a){var b;"undefined"!=typeof w&&w.setIcon(v),b=null===this.settings.selectedMarkerImgDim?this.markerImage(this.settings.selectedMarkerImg):this.markerImage(this.settings.selectedMarkerImg,this.settings.selectedMarkerImgDim.width,this.settings.selectedMarkerImgDim.height),v=a.icon,a.setIcon(b),w=a},createInfowindow:function(b,c,d,e,f){this.writeDebug("createInfowindow",arguments);var g=this,h=this._defineLocationData(b,e,f),j=i(h);"left"===c?(d.setContent(j),d.open(b.get("map"),b)):google.maps.event.addListener(b,"click",function(){d.setContent(j),d.open(b.get("map"),b);var c=b.get("id"),e=a("."+g.settings.locationList+" li[data-markerid="+c+"]");if(e.length>0){g.settings.callbackMarkerClick&&g.settings.callbackMarkerClick.call(this,b,c,e,A[c]),a("."+g.settings.locationList+" li").removeClass("list-focus"),e.addClass("list-focus");var f=a("."+g.settings.locationList);f.animate({scrollTop:e.offset().top-f.offset().top+f.scrollTop()})}null!==g.settings.selectedMarkerImg&&g.changeSelectedMarker(b)})},autoGeocodeQuery:function(b){this.writeDebug("autoGeocodeQuery",arguments);var c,d=this,e=null,f=a("#"+this.settings.maxDistanceID);this.settings.querystringParams===!0&&this.getQueryString(this.settings.maxDistanceID)?(e=this.getQueryString(this.settings.maxDistanceID),""!==f.val()&&(e=f.val())):this.settings.maxDistance===!0&&(e=f.val()||"");var g=new this.reverseGoogleGeocode(this),h=new google.maps.LatLng(b.coords.latitude,b.coords.longitude);g.geocode({latLng:h},function(f){null!==f?(c=p=f.address,q=G.lat=b.coords.latitude,r=G.lng=b.coords.longitude,G.origin=c,G.distance=e,d.mapping(G),"undefined"!=typeof c&&a("#"+d.settings.addressID).val(c)):d.notify(d.settings.addressErrorAlert)})},_autoGeocodeError:function(){this.writeDebug("_autoGeocodeError"),this.notify(this.settings.autoGeocodeErrorAlert)},defaultLocation:function(){this.writeDebug("defaultLocation");var b,c=this,d=null,e=a("#"+this.settings.maxDistanceID);this.settings.querystringParams===!0&&this.getQueryString(this.settings.maxDistanceID)?(d=this.getQueryString(this.settings.maxDistanceID),""!==e.val()&&(d=e.val())):this.settings.maxDistance===!0&&(d=e.val()||"");var f=new this.reverseGoogleGeocode(this),g=new google.maps.LatLng(this.settings.defaultLat,this.settings.defaultLng);f.geocode({latLng:g},function(a){null!==a?(b=p=a.address,q=G.lat=c.settings.defaultLat,r=G.lng=c.settings.defaultLng,G.distance=d,G.origin=b,c.mapping(G)):c.notify(c.settings.addressErrorAlert)})},paginationChange:function(a){this.writeDebug("paginationChange",arguments),this.settings.callbackPageChange&&this.settings.callbackPageChange.call(this,a),G.page=a,this.mapping(G)},getAddressByMarker:function(a){this.writeDebug("getAddressByMarker",arguments);var b="";return A[a].address&&(b+=A[a].address+" "),A[a].address2&&(b+=A[a].address2+" "),A[a].city&&(b+=A[a].city+", "),A[a].state&&(b+=A[a].state+" "),A[a].postal&&(b+=A[a].postal+" "),A[a].country&&(b+=A[a].country+" "),b},clearMarkers:function(){this.writeDebug("clearMarkers");var a=null;a=A.lengthb;b++)C[b].setMap(null)},directionsRequest:function(b,d,e){this.writeDebug("directionsRequest",arguments),this.settings.callbackDirectionsRequest&&this.settings.callbackDirectionsRequest.call(this,b,d,e,A[d]);var f=this.getAddressByMarker(d);if(f){a("."+this.settings.locationList+" ul").hide(),this.clearMarkers(),null!==t&&"undefined"!=typeof t&&(t.setMap(null),t=null),t=new google.maps.DirectionsRenderer,u=new google.maps.DirectionsService,t.setMap(e),t.setPanel(a(".bh-sl-directions-panel").get(0));var g={origin:b,destination:f,travelMode:google.maps.TravelMode.DRIVING};u.route(g,function(a,b){b===google.maps.DirectionsStatus.OK&&t.setDirections(a)}),a("."+this.settings.locationList).prepend('
    ')}a(c).off("click","."+this.settings.locationList+" li .loc-directions a")},closeDirections:function(){this.writeDebug("closeDirections"),this.settings.callbackCloseDirections&&this.settings.callbackCloseDirections.call(this),this.reset(),q&&r&&(0===this.countFilters()?this.settings.mapSettings.zoom=m:this.settings.mapSettings.zoom=0,this.processForm(null)),a(c).off("click."+f,"."+this.settings.locationList+" .bh-sl-close-icon")},lengthUnitSwap:function(b){this.writeDebug("lengthUnitSwap",arguments),"alt-distance"===b.val()?(a("."+this.settings.locationList+" .loc-alt-dist").show(),a("."+this.settings.locationList+" .loc-default-dist").hide()):"default-distance"===b.val()&&(a("."+this.settings.locationList+" .loc-default-dist").show(),a("."+this.settings.locationList+" .loc-alt-dist").hide())},processForm:function(b){this.writeDebug("processForm",arguments);var c=this,d=null,e={},f=a("#"+this.settings.addressID),g=a("#"+this.settings.searchID),h=a("#"+this.settings.maxDistanceID),i="";if("undefined"!=typeof b&&null!==b&&b.preventDefault(),a("."+c.settings.formContainer+" input, ."+c.settings.formContainer+" select").blur(),this.settings.querystringParams===!0&&(this.getQueryString(this.settings.addressID)||this.getQueryString(this.settings.searchID)||this.getQueryString(this.settings.maxDistanceID))?(p=this.getQueryString(this.settings.addressID),o=this.getQueryString(this.settings.searchID),d=this.getQueryString(this.settings.maxDistanceID),""!==f.val()&&(p=f.val()),""!==g.val()&&(o=g.val()),""!==h.val()&&(d=h.val())):(p=f.val()||"",o=g.val()||"",this.settings.maxDistance===!0&&(d=h.val()||"")),i=this.settings.callbackRegion?this.settings.callbackRegion.call(this,p,o,d):a("#"+this.settings.regionID).val(),this.settings.callbackFormVals&&this.settings.callbackFormVals.call(this,p,o,d,i),"undefined"!=typeof i&&(e={country:i}),"function"==typeof this.settings.callbackGeocodeRestrictions&&(e=this.settings.callbackGeocodeRestrictions.call(this,p,o,d)),""===p&&""===o&&this.settings.autoGeocode!==!0)this._start();else if(""!==p)if("undefined"!=typeof k&&"undefined"!=typeof q&&"undefined"!=typeof r&&p===k)G.lat=q,G.lng=r,G.origin=p,G.name=o,G.distance=d,c.mapping(G);else{var j=new this.googleGeocode(this);j.geocode({address:p,componentRestrictions:e,region:i},function(a){null!==a?(q=a.latitude,r=a.longitude,G.lat=q,G.lng=r,G.origin=p,G.name=o,G.distance=d,G.geocodeResult=a.geocodeResult,c.mapping(G)):c.notify(c.settings.addressErrorAlert)})}else""!==o?(""===p&&delete G.origin,G.name=o,c.mapping(G)):this.settings.autoGeocode===!0&&(G.lat=q,G.lng=r,G.origin=p,G.name=o,G.distance=d,c.mapping(G))},locationsSetup:function(a,b,c,d,e){if(this.writeDebug("locationsSetup",arguments),"undefined"!=typeof d&&(a.distance||(a.distance=this.geoCodeCalcCalcDistance(b,c,a.lat,a.lng,F.EarthRadius),"m"===this.settings.lengthUnit?a.altdistance=1.609344*parseFloat(a.distance):"km"===this.settings.lengthUnit&&(a.altdistance=parseFloat(a.distance)/1.609344))),this.settings.maxDistance===!0&&"undefined"!=typeof e&&null!==e){if(!(a.distance<=e))return;A.push(a)}else if(this.settings.maxDistance===!0&&this.settings.querystringParams===!0&&"undefined"!=typeof e&&null!==e){if(!(a.distance<=e))return;A.push(a)}else A.push(a)},sorting:function(){this.writeDebug("sorting",arguments);var b=this,c=a("#"+b.settings.mapID),d=a("#"+b.settings.sortID);0!==d.length&&d.on("change."+f,function(d){d.stopPropagation(),b.settings.pagination===!0&&b.paginationChange(0);var e,f;e="undefined"!=typeof a(this).find(":selected").attr("data-method")?a(this).find(":selected").attr("data-method"):"distance",f=a(this).val(),b.settings.sortBy.method=e,b.settings.sortBy.prop=f,b.settings.callbackSorting&&b.settings.callbackSorting.call(this,b.settings.sortBy),c.hasClass("bh-sl-map-open")&&b.mapping(G)})},order:function(){this.writeDebug("order",arguments);var b=this,c=a("#"+b.settings.mapID),d=a("#"+b.settings.orderID);0!==d.length&&d.on("change."+f,function(d){d.stopPropagation(),b.settings.pagination===!0&&b.paginationChange(0),b.settings.sortBy.order=a(this).val(),b.settings.callbackOrder&&b.settings.callbackOrder.call(this,b.settings.order),c.hasClass("bh-sl-map-open")&&b.mapping(G)})},countFilters:function(){this.writeDebug("countFilters");var a=0;if(!this.isEmptyObject(D))for(var b in D)D.hasOwnProperty(b)&&(a+=D[b].length);return a},_existingCheckedFilters:function(b){this.writeDebug("_existingCheckedFilters",arguments),a("#"+this.settings.taxonomyFilters[b]+" input[type=checkbox]").each(function(){if(a(this).prop("checked")){var c=a(this).val();"undefined"!=typeof c&&""!==c&&-1===D[b].indexOf(c)&&D[b].push(c)}})},_existingSelectedFilters:function(b){this.writeDebug("_existingSelectedFilters",arguments),a("#"+this.settings.taxonomyFilters[b]+" select").each(function(){var c=a(this).val();"undefined"!=typeof c&&""!==c&&-1===D[b].indexOf(c)&&(D[b]=[c])})},_existingRadioFilters:function(b){this.writeDebug("_existingRadioFilters",arguments),a("#"+this.settings.taxonomyFilters[b]+" input[type=radio]").each(function(){if(a(this).prop("checked")){var c=a(this).val();"undefined"!=typeof c&&""!==c&&-1===D[b].indexOf(c)&&(D[b]=[c])}})},checkFilters:function(){this.writeDebug("checkFilters");for(var a in this.settings.taxonomyFilters)this.settings.taxonomyFilters.hasOwnProperty(a)&&(this._existingCheckedFilters(a),this._existingSelectedFilters(a),this._existingRadioFilters(a))},selectQueryStringFilters:function(b,c){this.writeDebug("selectQueryStringFilters",arguments);var d=a("#"+this.settings.taxonomyFilters[b]);if(d.find('input[type="checkbox"]').length)for(var e=0;e-1&&(D[f].splice(g,1),a("#"+b.settings.mapID).hasClass("bh-sl-map-open")===!0&&(q&&r?(0===b.countFilters()?b.settings.mapSettings.zoom=m:b.settings.mapSettings.zoom=0,b.processForm()):b.mapping(G)))}}else(a(this).is("select")||a(this).is('input[type="radio"]'))&&(b.checkFilters(),d=a(this).val(),e=a(this).closest(".bh-sl-filters").attr("id"),f=b.getFilterKey(e),d?f&&(D[f]=[d],a("#"+b.settings.mapID).hasClass("bh-sl-map-open")===!0&&(q&&r?(b.settings.mapSettings.zoom=0, -b.processForm()):b.mapping(G))):(f&&(D[f]=[]),b.reset(),q&&r?(b.settings.mapSettings.zoom=m,b.processForm()):b.mapping(G)))})},checkVisibleMarkers:function(b,c){this.writeDebug("checkVisibleMarkers",arguments);var d,e,f=this;a("."+this.settings.locationList+" ul").empty(),a(b).each(function(b,g){c.getBounds().contains(g.getPosition())&&(f.listSetup(g,0,0),e=h(d),a("."+f.settings.locationList+" > ul").append(e))}),a("."+this.settings.locationList+" ul li:even").css("background",this.settings.listColor1),a("."+this.settings.locationList+" ul li:odd").css("background",this.settings.listColor2)},dragSearch:function(a){this.writeDebug("dragSearch",arguments);var b,c=a.getCenter(),d=this;this.settings.mapSettings.zoom=a.getZoom(),q=G.lat=c.lat(),r=G.lng=c.lng();var e=new this.reverseGoogleGeocode(this);b=new google.maps.LatLng(G.lat,G.lng),e.geocode({latLng:b},function(a){null!==a?(G.origin=p=a.address,d.mapping(G)):d.notify(d.settings.addressErrorAlert)})},emptyResult:function(){this.writeDebug("emptyResult",arguments);var b,d,e=a("."+this.settings.locationList+" ul"),f=this.settings.mapSettings;this.map=new google.maps.Map(c.getElementById(this.settings.mapID),f),this.settings.callbackNoResults&&this.settings.callbackNoResults.call(this,this.map,f),e.empty(),d=a('
  • '+this.settings.noResultsTitle+'

    '+this.settings.noResultsDesc+"
  • ").hide().fadeIn(),e.append(d),b=q&&r?new google.maps.LatLng(q,r):new google.maps.LatLng(0,0),this.map.setCenter(b),m&&this.map.setZoom(m)},originMarker:function(a,b,c){if(this.writeDebug("originMarker",arguments),this.settings.originMarker===!0){var d,e="";"undefined"!=typeof b&&(e=null!==this.settings.originMarkerImg?null===this.settings.originMarkerDim?this.markerImage(this.settings.originMarkerImg):this.markerImage(this.settings.originMarkerImg,this.settings.originMarkerDim.width,this.settings.originMarkerDim.height):{url:"https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png"},d=new google.maps.Marker({position:c,map:a,icon:e,draggable:!1}))}},modalWindow:function(){if(this.writeDebug("modalWindow"),this.settings.modal===!0){var b=this;b.settings.callbackModalOpen&&b.settings.callbackModalOpen.call(this),a("."+b.settings.overlay).fadeIn(),a(c).on("click."+f,"."+b.settings.closeIcon+", ."+b.settings.overlay,function(){b.modalClose()}),a(c).on("click."+f,"."+b.settings.modalWindow,function(a){a.stopPropagation()}),a(c).on("keyup."+f,function(a){27===a.keyCode&&b.modalClose()})}},openNearestLocation:function(b,c,d,e){if(this.writeDebug("openNearestLocation",arguments),!(this.settings.openNearest!==!0||"undefined"==typeof b||this.settings.fullMapStart===!0&&x===!0||this.settings.defaultLoc===!0&&x===!0)){var f=this;f.settings.callbackNearestLoc&&f.settings.callbackNearestLoc.call(this,f.map,b,c,d,e);var g=0,h=C[g];f.createInfowindow(h,"left",c,d,e);var i=a("."+f.settings.locationList),j=a("."+f.settings.locationList+" li[data-markerid="+g+"]");a("."+f.settings.locationList+" li").removeClass("list-focus"),j.addClass("list-focus"),i.animate({scrollTop:j.offset().top-i.offset().top+i.scrollTop()})}},listClick:function(b,d,e,g){this.writeDebug("listClick",arguments);var h=this;a(c).on("click."+f,"."+h.settings.locationList+" li",function(){var c=a(this).data("markerid"),f=C[c];h.settings.callbackListClick&&h.settings.callbackListClick.call(this,c,f,A[c],b),b.panTo(f.getPosition());var i="left";h.settings.bounceMarker===!0?(f.setAnimation(google.maps.Animation.BOUNCE),setTimeout(function(){f.setAnimation(null),h.createInfowindow(f,i,d,e,g)},700)):h.createInfowindow(f,i,d,e,g),null!==h.settings.selectedMarkerImg&&h.changeSelectedMarker(f),a("."+h.settings.locationList+" li").removeClass("list-focus"),a("."+h.settings.locationList+" li[data-markerid="+c+"]").addClass("list-focus")}),a(c).on("click."+f,"."+h.settings.locationList+" li a",function(a){a.stopPropagation()})},resultsTotalCount:function(b){this.writeDebug("resultsTotalCount",arguments);var c=a(".bh-sl-total-results");"undefined"==typeof b||0>=b||0===c.length||c.text(b)},inlineDirections:function(b,d){if(this.writeDebug("inlineDirections",arguments),this.settings.inlineDirections===!0&&"undefined"!=typeof d){var e=this;a(c).on("click."+f,"."+e.settings.locationList+" li .loc-directions a",function(g){g.preventDefault();var h=a(this).closest("li").attr("data-markerid");e.directionsRequest(d,parseInt(h),b),a(c).on("click."+f,"."+e.settings.locationList+" .bh-sl-close-icon",function(){e.closeDirections()})})}},visibleMarkersList:function(a,b){if(this.writeDebug("visibleMarkersList",arguments),this.settings.visibleMarkersList===!0){var c=this;google.maps.event.addListenerOnce(a,"idle",function(){c.checkVisibleMarkers(b,a)}),google.maps.event.addListener(a,"center_changed",function(){c.checkVisibleMarkers(b,a)}),google.maps.event.addListener(a,"zoom_changed",function(){c.checkVisibleMarkers(b,a)})}},mapping:function(a){this.writeDebug("mapping",arguments);var b,c,d,e,f,g,h=this;this.isEmptyObject(a)||(b=a.lat,c=a.lng,d=a.geocodeResult,e=a.origin,g=a.page),h.settings.pagination===!0&&("undefined"==typeof g||k!==p)&&(g=0),"undefined"==typeof e&&this.settings.nameSearch===!0?n=h._getData():(f=new google.maps.LatLng(b,c),"undefined"!=typeof k&&e===k&&"undefined"!=typeof l?(e=k,n=l):n=h._getData(q,r,e,d,a)),null!==h.settings.taxonomyFilters&&h.hasEmptyObjectVals(D)&&h.checkFilters(),null!==h.settings.dataRaw?h.processData(a,f,n,g):n.done(function(b){h.processData(a,f,b,g)})},processData:function(d,e,h,i){this.writeDebug("processData",arguments);var j,p,q,r,t,u,v,w,E,F,G,H,I,J,K=this,L=0,M={},N=a("#"+K.settings.lengthSwapID);this.isEmptyObject(d)||(j=d.lat,p=d.lng,q=d.origin,r=d.name,t=d.distance);var O=a("#"+K.settings.mapID),P="km"===K.settings.lengthUnit?K.settings.kilometersLang:K.settings.milesLang;if(l=n,"undefined"!=typeof q&&(k=q),K.settings.callbackSuccess&&K.settings.callbackSuccess.call(this,d,e,h,i),H=O.hasClass("bh-sl-map-open"),K.settings.fullMapStart===!0&&H===!1||K.settings.autoGeocode===!0&&H===!1||K.settings.defaultLoc===!0&&H===!1||y===!0?x=!0:K.reset(),O.addClass("bh-sl-map-open"),"json"===K.settings.dataType||"jsonp"===K.settings.dataType)for(var Q=0;L0)for(var V=0;Vt)&&K.notify(K.settings.distanceErrorAlert+t+" "+P);else{if("undefined"==typeof A[0])throw new Error("No locations found. Please check the dataLocation setting and path.");-1!==K.settings.distanceAlert&&A[0].distance>K.settings.distanceAlert&&(K.notify(K.settings.distanceErrorAlert+K.settings.distanceAlert+" "+P),G=!0)}"undefined"!=typeof A[0]&&(J=A[0])}if(K.settings.featuredLocations===!0&&(z=a.grep(A,function(a){return"true"===a.featured}),B=a.grep(A,function(a){return"true"!==a.featured}),A=[],A=z.concat(B)),K.settings.slideMap===!0&&g.slideDown(),K.settings.pagination===!0&&K.paginationSetup(i),K.settings.altDistanceNoResult===!0&&J.distance>K.settings.distanceAlert)return void K.emptyResult();if(K.isEmptyObject(A)||"none"===A[0].result)return void K.emptyResult();if(K.modalWindow(),s=-1===K.settings.storeLimit||A.length26||-1===this.settings.fullMapStartListLimit)?A.length:K.settings.storeLimit,K.settings.pagination===!0?(E=K.settings.locationsPerPage,w=i*K.settings.locationsPerPage,w+E>A.length&&(E=K.settings.locationsPerPage-(w+E-A.length)),A=A.slice(w,w+E),s=A.length):(E=s,w=0),K.resultsTotalCount(A.length),K.settings.fullMapStart===!0&&x===!0&&K.settings.querystringParams!==!0||0===K.settings.mapSettings.zoom||"undefined"==typeof q||G===!0)F=K.settings.mapSettings,v=new google.maps.LatLngBounds;else if(K.settings.pagination===!0){var W=new google.maps.LatLng(A[0].lat,A[0].lng);0===i?(K.settings.mapSettings.center=e,F=K.settings.mapSettings):(K.settings.mapSettings.center=W,F=K.settings.mapSettings)}else K.settings.mapSettings.center=e,F=K.settings.mapSettings;if(K.map=new google.maps.Map(c.getElementById(K.settings.mapID),F),google.maps.event.addDomListener(b,"resize",function(){var a=K.map.getCenter();google.maps.event.trigger(K.map,"resize"),K.map.setCenter(a)}),K.settings.dragSearch===!0&&K.map.addListener("dragend",function(){K.dragSearch(K.map)}),g.data(K.settings.mapID.replace("#",""),K.map),K.settings.callbackMapSet&&K.settings.callbackMapSet.call(this,K.map,e,m,F),"undefined"!=typeof InfoBubble&&null!==K.settings.infoBubble){var X=K.settings.infoBubble;X.map=K.map,I=new InfoBubble(X)}else I=new google.maps.InfoWindow;K.originMarker(K.map,q,e),a(c).on("click."+f,".bh-sl-pagination li",function(b){b.preventDefault(),K.paginationChange(a(this).attr("data-page"))}),K.inlineDirections(K.map,q);for(var Y=0;E-1>=Y;Y++){var Z="";Z=i>0?String.fromCharCode("A".charCodeAt(0)+(w+Y)):String.fromCharCode("A".charCodeAt(0)+Y);var $=new google.maps.LatLng(A[Y].lat,A[Y].lng);u=K.createMarker($,A[Y].name,A[Y].address,Z,K.map,A[Y].category),u.set("id",Y),C[Y]=u,(K.settings.fullMapStart===!0&&x===!0&&K.settings.querystringParams!==!0||0===K.settings.mapSettings.zoom||"undefined"==typeof q||G===!0)&&v.extend($),K.createInfowindow(u,null,I,w,i)}(K.settings.fullMapStart===!0&&x===!0&&K.settings.querystringParams!==!0||0===K.settings.mapSettings.zoom||"undefined"==typeof q||G===!0)&&K.map.fitBounds(v);var _=a("."+K.settings.locationList+" ul");if(_.empty(),x&&K.settings.fullMapStartListLimit!==!1&&!isNaN(K.settings.fullMapStartListLimit)&&-1!==K.settings.fullMapStartListLimit)for(var aa=0;aa li:even").css("background",K.settings.listColor1),a("."+K.settings.locationList+" ul > li:odd").css("background",K.settings.listColor2),K.visibleMarkersList(K.map,C),K.settings.modal===!0&&K.settings.callbackModalReady&&K.settings.callbackModalReady.call(this,d),K.settings.callbackFilters&&K.settings.callbackFilters.call(this,D,d)},writeDebug:function(){b.console&&this.settings.debug&&(Function.prototype.bind?this.writeDebug=Function.prototype.bind.call(console.log,console,"StoreLocator :"):this.writeDebug=function(){arguments[0]="StoreLocator : "+arguments[0],Function.prototype.apply.call(console.log,console,arguments)},this.writeDebug.apply(this,arguments))}}),a.fn[f]=function(b){var c=arguments;if(b===d||"object"==typeof b)return this.each(function(){a.data(this,"plugin_"+f)||a.data(this,"plugin_"+f,new e(this,b))});if("string"==typeof b&&"_"!==b[0]&&"init"!==b){var g;return this.each(function(){var d=a.data(this,"plugin_"+f);d instanceof e&&"function"==typeof d[b]&&(g=d[b].apply(d,Array.prototype.slice.call(c,1))),"destroy"===b&&a.data(this,"plugin_"+f,null)}),g!==d?g:this}}}}(jQuery,window,document); \ No newline at end of file +!function(B,N,j,t){"use strict";var _,a,i,c,z,Q,V,q,U,K,g,h,H,n,m,f,s,W,J,$,o,Z,X,Y,tt,et,st,r,l,it,u,d,nt="storeLocator",b=!1,e=null;function p(t,s){var i,e;_=B(t),this.element=t,this.settings=B.extend({},d,s),this._defaults=d,this._name=nt,""!==this.settings.mapSettingsID&&(this.settings.mapSettings.mapId=this.settings.mapSettingsID),this.settings.lazyLoadMap&&null!==this.settings.apiKey&&"undefined"==typeof google?(i=this,e={},e.libraries="marker",!0===this.settings.autoComplete&&(e.libraries="places,marker"),this.settings.callbackBeforeMapInject?new Promise(function(t,e){i.settings.callbackBeforeMapInject.call(this,s,t)}).then(function(){i.triggerMapLoad(e)}):i.triggerMapLoad(e)):this.init()}void 0===B.fn[nt]&&(d={ajaxData:null,altDistanceNoResult:!(u={}),apiKey:null,autoComplete:!(it={}),autoCompleteDisableListener:!(l={}),autoCompleteOptions:{},autoGeocode:!(r={}),bounceMarker:!0,catMarkers:null,dataLocation:"data/locations.json",dataRaw:null,dataType:"json",debug:!(st={}),defaultLat:null,defaultLng:null,defaultLoc:!(et=[]),disableAlphaMarkers:!(tt=[]),distanceAlert:60,dragSearch:!(Y=[]),exclusiveFiltering:!(X=[]),exclusiveTax:null,featuredDistance:null,featuredLocations:!1,fullMapStart:!1,fullMapStartBlank:!1,fullMapStartListLimit:!1,infoBubble:null,inlineDirections:!1,lazyLoadMap:!1,lengthUnit:"m",listColor1:"#ffffff",listColor2:"#eeeeee",loading:!1,locationsPerPage:10,mapSettings:{mapTypeId:"roadmap",zoom:12},mapSettingsID:"",markerCluster:null,markerImg:null,markerDim:null,maxDistance:!1,modal:!1,nameAttribute:"name",nameSearch:!1,noForm:!1,openNearest:!1,originMarker:!1,originMarkerDim:null,originMarkerImg:null,pagination:!1,querystringParams:!1,selectedMarkerImg:null,selectedMarkerImgDim:null,sessionStorage:!1,slideMap:!0,sortBy:null,storeLimit:26,taxonomyFilters:null,visibleMarkersList:!1,xmlElement:"marker",addressID:"bh-sl-address",closeIcon:"bh-sl-close-icon",formContainer:"bh-sl-form-container",formID:"bh-sl-user-location",geocodeID:null,lengthSwapID:"bh-sl-length-swap",loadingContainer:"bh-sl-loading",locationList:"bh-sl-loc-list",mapID:"bh-sl-map",maxDistanceID:"bh-sl-maxdistance",modalContent:"bh-sl-modal-content",modalWindow:"bh-sl-modal-window",orderID:"bh-sl-order",overlay:"bh-sl-overlay",regionID:"bh-sl-region",searchID:"bh-sl-search",sortID:"bh-sl-sort",taxonomyFiltersContainer:"bh-sl-filters-container",infowindowTemplatePath:"assets/js/plugins/storeLocator/templates/infowindow-description.html",listTemplatePath:"assets/js/plugins/storeLocator/templates/location-list-description.html",KMLinfowindowTemplatePath:"assets/js/plugins/storeLocator/templates/kml-infowindow-description.html",KMLlistTemplatePath:"assets/js/plugins/storeLocator/templates/kml-location-list-description.html",listTemplateID:null,infowindowTemplateID:null,callbackAutoGeoSuccess:null,callbackBeforeMapInject:null,callbackBeforeSend:null,callbackCloseDirections:null,callbackCreateMarker:null,callbackDirectionsRequest:null,callbackFilters:null,callbackFormVals:null,callbackGeocodeRestrictions:null,callbackJsonp:null,callbackListClick:null,callbackMapSet:null,callbackMarkerClick:null,callbackModalClose:null,callbackModalOpen:null,callbackModalReady:null,callbackNearestLoc:null,callbackNoResults:null,callbackNotify:null,callbackOrder:null,callbackPageChange:null,callbackRegion:null,callbackSorting:null,callbackSuccess:null,addressErrorAlert:"Unable to find address",autoGeocodeErrorAlert:"Automatic location detection failed. Please fill in your address or zip code.",distanceErrorAlert:"Unfortunately, our closest location is more than ",kilometerLang:"kilometer",kilometersLang:"kilometers",mileLang:"mile",milesLang:"miles",noResultsTitle:"No results",noResultsDesc:"No locations were found with the given criteria. Please modify your selections or input.",nextPage:"Next »",prevPage:"« Prev"},B.extend(p.prototype,{init:function(){var t,e=this;this.writeDebug("init"),"km"===this.settings.lengthUnit?l.EarthRadius=6367:l.EarthRadius=3956,c="kml"===this.settings.dataType?"xml":this.settings.dataType,!0===this.settings.inlineDirections&&B("."+this.settings.locationList).prepend('
    '),V=this.settings.mapSettings.zoom,Handlebars.registerHelper("niceURL",function(t){if(t)return t.replace("https://","").replace("http://","")}),!0===this.settings.maxDistance&&this.distanceFiltering(),null!==this.settings.taxonomyFilters&&this.taxonomyFiltering(),this.sorting(),this.order(),!0===this.settings.modal&&(null!==this.settings.taxonomyFilters&&B("."+this.settings.taxonomyFiltersContainer).clone(!0,!0).prependTo(_),_.wrap('
    '),B("."+this.settings.modalWindow).prepend('
    '),B("."+this.settings.overlay).hide()),!0===this.settings.autoComplete&&(t=j.getElementById(this.settings.addressID),t=new google.maps.places.Autocomplete(t,this.settings.autoCompleteOptions),!0===this.settings.autoComplete)&&!0!==this.settings.autoCompleteDisableListener&&t.addListener("place_changed",function(t){e.processForm(t)}),this._loadTemplates()},triggerMapLoad:function(t){this.writeDebug("triggerMapLoad");var e=this;this.loadMapsAPI(this.settings.apiKey,t).then(function(t){e.map=t,e.init()})},injectGoogleMapsScript:function(e){if(this.writeDebug("injectGoogleMapsScript"),e=void 0!==e?e:{},b)throw new Error("Google Maps API is already loaded.");var t="https://maps.googleapis.com/maps/api/js?"+Object.keys(e).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t])).join("&"),s=j.createElement("script");s.setAttribute("src",t),s.setAttribute("async",""),s.setAttribute("defer",""),j.head.appendChild(s),b=!0},loadMapsAPI:function(s,i){this.writeDebug("loadMapsAPI"),i=void 0!==i?i:{};var n=this;return e=e||new Promise(function(t,e){try{N.onGoogleMapsAPILoaded=t,n.injectGoogleMapsScript({key:s,loading:"async",callback:"onGoogleMapsAPILoaded",...i})}catch(t){e(t)}}).then(function(){N.google.maps})},destroy:function(){this.writeDebug("destroy"),this.reset();var t=B("#"+this.settings.mapID);if(et.length)for(var e=0;e<=et.length;e++)google.maps.event.removeListener(et[e]);B("."+this.settings.locationList+" ul").empty(),t.hasClass("bh-sl-map-open")&&t.empty().removeClass("bh-sl-map-open"),!0===this.settings.modal&&B(". "+this.settings.overlay).remove(),t.attr("style",""),_.hide(),B.removeData(_.get(0)),B(j).off(nt),_.unbind()},reset:function(){var t;this.writeDebug("reset"),Y=[],X=[],tt=[],W=!(et=[]),B(j).off("click."+nt,"."+this.settings.locationList+" li"),B("."+this.settings.locationList+" .bh-sl-close-directions-container").length&&B(".bh-sl-close-directions-container").remove(),!0===this.settings.inlineDirections&&(0<(t=B("."+this.settings.locationList+" .adp")).length&&(t.remove(),B("."+this.settings.locationList+" ul").fadeIn()),B(j).off("click","."+this.settings.locationList+" li .loc-directions a")),!0===this.settings.pagination&&B(j).off("click."+nt,".bh-sl-pagination li a")},formFiltersReset:function(){var t,e;this.writeDebug("formFiltersReset"),null!==this.settings.taxonomyFilters&&(t=B("."+this.settings.taxonomyFiltersContainer+" input"),e=B("."+this.settings.taxonomyFiltersContainer+" select"),"object"==typeof t)&&(t.each(function(){(B(this).is('input[type="checkbox"]')||B(this).is('input[type="radio"]'))&&B(this).prop("checked",!1)}),e.each(function(){B(this).prop("selectedIndex",0)}))},mapReload:function(){this.writeDebug("mapReload"),this.reset(),J=!0,null!==this.settings.taxonomyFilters&&(this.formFiltersReset(),this.resetDisabledFilterVals(),this.taxonomyFiltersInit()),g&&h?(this.settings.mapSettings.zoom=V,this.processForm()):this.mapping(it)},notify:function(t){this.writeDebug("notify",t),this.settings.callbackNotify?this.settings.callbackNotify.call(this,t):alert(t)},geoCodeCalcToRadian:function(t){return this.writeDebug("geoCodeCalcToRadian",t),t*(Math.PI/180)},geoCodeCalcDiffRadian:function(t,e){return this.writeDebug("geoCodeCalcDiffRadian",arguments),this.geoCodeCalcToRadian(e)-this.geoCodeCalcToRadian(t)},geoCodeCalcCalcDistance:function(t,e,s,i,n){return this.writeDebug("geoCodeCalcCalcDistance",arguments),2*n*Math.asin(Math.min(1,Math.sqrt(Math.pow(Math.sin(this.geoCodeCalcDiffRadian(t,s)/2),2)+Math.cos(this.geoCodeCalcToRadian(t))*Math.cos(this.geoCodeCalcToRadian(s))*Math.pow(Math.sin(this.geoCodeCalcDiffRadian(e,i)/2),2))))},inRange:function(t,e,s){return this.writeDebug("inRange",arguments),e=Math.abs(e),isFinite(e)&&t<=e&&e<=s},coordinatesInRange:function(t,e){return this.writeDebug("coordinatesInRange",arguments),this.inRange(-90,t,90)&&this.inRange(-180,e,180)},getQueryString:function(t){if(this.writeDebug("getQueryString",t),t)return t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),null===(t=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(location.search))?"":decodeURIComponent(t[1].replace(/\+/g," "))},getMap:function(){return this.map},_loadTemplates:function(){this.writeDebug("_loadTemplates");var e,t=this,s='
    Error: Could not load plugin templates. Check the paths and ensure they have been uploaded. Paths will be wrong if you do not run this from a web server.
    ';"kml"===this.settings.dataType&&null===this.settings.listTemplateID&&null===this.settings.infowindowTemplateID?B.when(B.get(this.settings.KMLinfowindowTemplatePath,function(t){e=t,i=Handlebars.compile(e)}),B.get(this.settings.KMLlistTemplatePath,function(t){e=t,a=Handlebars.compile(e)})).then(function(){t.locator()},function(){throw B("."+t.settings.formContainer).append(s),new Error("Could not load storeLocator plugin templates")}):null!==this.settings.listTemplateID&&null!==this.settings.infowindowTemplateID?(i=Handlebars.compile(B("#"+this.settings.infowindowTemplateID).html()),a=Handlebars.compile(B("#"+this.settings.listTemplateID).html()),t.locator()):B.when(B.get(this.settings.infowindowTemplatePath,function(t){e=t,i=Handlebars.compile(e)}),B.get(this.settings.listTemplatePath,function(t){e=t,a=Handlebars.compile(e)})).then(function(){t.locator()},function(){throw B("."+t.settings.formContainer).append(s),new Error("Could not load storeLocator plugin templates")})},locator:function(){this.writeDebug("locator"),!0===this.settings.slideMap&&_.hide(),this._start(),this._formEventHandler()},_formEventHandler:function(){this.writeDebug("_formEventHandler");var e=this;!0===this.settings.noForm?(B(j).on("click."+nt,"."+this.settings.formContainer+" button",function(t){e.processForm(t)}),B(j).on("keydown."+nt,function(t){13===t.keyCode&&B("#"+e.settings.addressID).is(":focus")&&e.processForm(t)})):B(j).on("submit."+nt,"#"+this.settings.formID,function(t){e.processForm(t)}),B(".bh-sl-reset").length&&B("#"+this.settings.mapID).length&&B(j).on("click."+nt,".bh-sl-reset",function(){e.mapReload()}),B("#"+this.settings.addressID).on("change."+nt,function(){o=t,u={},""!==B.trim(B("#"+e.settings.addressID).val())||void 0!==U&&""!==U||null!==e.settings.taxonomyFilters&&!1===e.settings.exclusiveFiltering&&(z=h=g=t,it={},e.resetDisabledFilterVals(),e.taxonomyFiltersInit(),e.mapping(null))})},_getData:function(t,e,s,i,n){this.writeDebug("_getData",arguments);var a,o=this,r="",l="",g="";return void 0!==i&&void 0!==i.geometry.bounds&&(g=i.formatted_address,r=JSON.stringify(i.geometry.bounds.getNorthEast()),l=JSON.stringify(i.geometry.bounds.getSouthWest())),this.settings.callbackBeforeSend&&this.settings.callbackBeforeSend.call(this,t,e,s,g,r,l,n),null!==o.settings.dataRaw?"xml"===c?B.parseXML(o.settings.dataRaw):"json"===c?Array.isArray&&Array.isArray(o.settings.dataRaw)?o.settings.dataRaw:"string"==typeof o.settings.dataRaw?JSON.parse(o.settings.dataRaw):[]:void 0:(a=B.Deferred(),!0===this.settings.loading&&B("."+this.settings.formContainer).append('
    '),i={origLat:t,origLng:e,origAddress:s,formattedAddress:g,boundsNorthEast:r,boundsSouthWest:l},null!==this.settings.ajaxData&&"object"==typeof this.settings.ajaxData&&B.extend(i,this.settings.ajaxData),B.ajax({type:"GET",url:this.settings.dataLocation+("jsonp"===this.settings.dataType?(this.settings.dataLocation.match(/\?/)?"&":"?")+"callback=?":""),data:i,dataType:c,jsonpCallback:"jsonp"===this.settings.dataType?this.settings.callbackJsonp:null}).done(function(t){a.resolve(t),!0===o.settings.loading&&B("."+o.settings.formContainer+" ."+o.settings.loadingContainer).remove()}).fail(a.reject),a.promise())},_start:function(){this.writeDebug("_start");var t,e,s=this,i=this.settings.autoGeocode;!1!==s.settings.fullMapStartBlank?(B("#"+s.settings.mapID).addClass("bh-sl-map-open"),(e=s.settings.mapSettings).zoom=s.settings.fullMapStartBlank,t=new google.maps.LatLng(this.settings.defaultLat,this.settings.defaultLng),e.center=t,s.map=new google.maps.Map(j.getElementById(s.settings.mapID),e),N.addEventListener("resize",function(){var t=s.map.getCenter();google.maps.event.trigger(s.map,"resize"),s.map.setCenter(t)}),s.settings.fullMapStartBlank=!1,e.zoom=V):(!0===this.settings.defaultLoc&&this.defaultLocation(),""!==B.trim(B("#"+this.settings.addressID).val())?(s.writeDebug("Using Address Field"),s.processForm(null),i=!1):!0===this.settings.fullMapStart&&!1===this.settings.defaultLoc&&(!0===this.settings.querystringParams&&this.getQueryString(this.settings.addressID)||!0===this.settings.querystringParams&&this.getQueryString(this.settings.searchID)||!0===this.settings.querystringParams&&this.getQueryString(this.settings.maxDistanceID)?(s.writeDebug("Using Query String"),this.processForm(null),i=!1):this.mapping(null))),!0===this.settings.autoGeocode&&!0===i&&(s.writeDebug("Auto Geo"),s.htmlGeocode()),null!==this.settings.autoGeocode&&(s.writeDebug("Button Geo"),B(j).on("click."+nt,"#"+this.settings.geocodeID,function(){s.htmlGeocode()}))},htmlGeocode:function(){this.writeDebug("htmlGeocode",arguments);var e=this;if(!0===e.settings.sessionStorage&&N.sessionStorage&&N.sessionStorage.getItem("myGeo"))return e.writeDebug("Using Session Saved Values for GEO"),e.autoGeocodeQuery(JSON.parse(N.sessionStorage.getItem("myGeo"))),!1;navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(t){e.writeDebug("Current Position Result");t={coords:{latitude:t.coords.latitude,longitude:t.coords.longitude,accuracy:t.coords.accuracy}};!0===e.settings.sessionStorage&&N.sessionStorage&&N.sessionStorage.setItem("myGeo",JSON.stringify(t)),e.settings.callbackAutoGeoSuccess&&e.settings.callbackAutoGeoSuccess.call(this,t),e.autoGeocodeQuery(t)},function(t){e._autoGeocodeError(t)})},googleGeocode:function(t){t.writeDebug("googleGeocode",arguments);var e=new google.maps.Geocoder;this.geocode=function(t,s){e.geocode(t,function(t,e){if(e!==google.maps.GeocoderStatus.OK)throw s(null),new Error("Geocode was not successful for the following reason: "+e);e={};e.latitude=t[0].geometry.location.lat(),e.longitude=t[0].geometry.location.lng(),e.geocodeResult=t[0],s(e)})}},reverseGoogleGeocode:function(t){t.writeDebug("reverseGoogleGeocode",arguments);var e=new google.maps.Geocoder;this.geocode=function(t,s){e.geocode(t,function(t,e){if(e!==google.maps.GeocoderStatus.OK)throw s(null),new Error("Reverse geocode was not successful for the following reason: "+e);t[0]&&((e={}).address=t[0].formatted_address,e.fullResult=t[0],s(e))})}},roundNumber:function(t,e){return this.writeDebug("roundNumber",arguments),Math.round(t*Math.pow(10,e))/Math.pow(10,e)},isEmptyObject:function(t){for(var e in this.writeDebug("isEmptyObject",arguments),t)if(t.hasOwnProperty(e))return!1;return!0},hasEmptyObjectVals:function(t){this.writeDebug("hasEmptyObjectVals",arguments);var e,s=!0;for(e in t)t.hasOwnProperty(e)&&""!==t[e]&&0!==t[e].length&&(s=!1);return s},hasSingleGroupFilterVal:function(t,e){this.writeDebug("hasSingleGroupFilterVal",arguments);t=Object.assign({},t);return!this.hasEmptyObjectVals(t[e])},modalClose:function(){this.writeDebug("modalClose"),this.settings.callbackModalClose&&this.settings.callbackModalClose.call(this),st={},B("."+this.settings.overlay+" select").prop("selectedIndex",0),B("."+this.settings.overlay+" input").prop("checked",!1),B("."+this.settings.overlay).hide()},_createLocationVariables:function(t){var e,s;for(s in this.writeDebug("_createLocationVariables",arguments),r={},Y[t])Y[t].hasOwnProperty(s)&&(e=Y[t][s],"distance"!==s&&"altdistance"!==s||(e=this.roundNumber(e,2)),r[s]=e)},sortAlpha:function(t){this.writeDebug("sortAlpha",arguments);var s=this.settings.sortBy.hasOwnProperty("prop")&&void 0!==this.settings.sortBy.prop?this.settings.sortBy.prop:"name";this.settings.sortBy.hasOwnProperty("order")&&"desc"===this.settings.sortBy.order.toString()?t.sort(function(t,e){return e[s].toLowerCase().localeCompare(t[s].toLowerCase())}):t.sort(function(t,e){return t[s].toLowerCase().localeCompare(e[s].toLowerCase())})},sortDate:function(t){this.writeDebug("sortDate",arguments);var s=this.settings.sortBy.hasOwnProperty("prop")&&void 0!==this.settings.sortBy.prop?this.settings.sortBy.prop:"date";this.settings.sortBy.hasOwnProperty("order")&&"desc"===this.settings.sortBy.order.toString()?t.sort(function(t,e){return new Date(e[s]).getTime()-new Date(t[s]).getTime()}):t.sort(function(t,e){return new Date(t[s]).getTime()-new Date(e[s]).getTime()})},sortNumerically:function(t,e){this.writeDebug("sortNumerically",arguments);var s=null!==this.settings.sortBy&&this.settings.sortBy.hasOwnProperty("prop")&&void 0!==this.settings.sortBy.prop?this.settings.sortBy.prop:"distance";void 0!==e&&!0===e&&(s="distance"),null!==this.settings.sortBy&&this.settings.sortBy.hasOwnProperty("order")&&"desc"===this.settings.sortBy.order.toString()?t.sort(function(t,e){return e[s]t[s]?1:0}):t.sort(function(t,e){return t[s]e[s]?1:0})},sortCustom:function(t){this.writeDebug("sortCustom",arguments),this.settings.sortBy.hasOwnProperty("method")&&"alpha"===this.settings.sortBy.method.toString()?this.sortAlpha(t):this.settings.sortBy.hasOwnProperty("method")&&"date"===this.settings.sortBy.method.toString()?this.sortDate(t):this.sortNumerically(t)},filterMatching:function(t,e,s){return this.writeDebug("inclusiveFilter",arguments),void 0!==e&&(s=!0===(s=void 0===s||s)?t.join(""):t.join("|"),!!new RegExp(s,"i").test(e.replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g,"")))},filterData:function(t,e){this.writeDebug("filterData",arguments);var s,i=!0;for(s in e)if(e.hasOwnProperty(s)){for(var n=[],a=0;a')+''+this.settings.prevPage+""),5<=t+1&&5
  • 1
  • ');for(var g=s;g')+''+c+"":(i+='
  • ')+''+c+"
  • ";return t+o<=e&&5
  • ')+'
  • ')+''+e+"
  • "),i=n
  • ')+''+this.settings.nextPage+"
  • ":i},paginationReset:function(){this.writeDebug("paginationReset",arguments);var t=N.location.href,t=new URL(t);t.searchParams.delete("bhsl-page"),history.pushState&&N.history.pushState({path:t.href},"",t.href)},totalPages:function(){return this.writeDebug("totalPages",arguments),!(void 0!==z&&0this.settings.storeLimit)&&(-1===this.settings.storeLimit||Y.length ul").append(e)},changeSelectedMarker:function(t){var e;void 0!==s&&s.setIcon(f),e=null===this.settings.selectedMarkerImgDim?this.markerImage(this.settings.selectedMarkerImg):this.markerImage(this.settings.selectedMarkerImg,this.settings.selectedMarkerImgDim.width,this.settings.selectedMarkerImgDim.height),f=t.icon,t.setIcon(e),s=t},createInfowindow:function(n,t,a,e,s){this.writeDebug("createInfowindow",arguments);var o=this,e=this._defineLocationData(n,e,s),r=i(e);"left"===t?(a.setContent(r),this.useLegacyMarkers()?a.open(n.get("map"),n):a.open(n.map,n)):this.useLegacyMarkers()?google.maps.event.addListener(n,"click",function(){a.setContent(r),a.open(n.get("map"),n);var t=n.get("id"),e=B("."+o.settings.locationList+" li[data-markerid="+t+"]");0
    ')),B(j).off("click","."+this.settings.locationList+" li .loc-directions a")},closeDirections:function(){this.writeDebug("closeDirections"),this.settings.callbackCloseDirections&&this.settings.callbackCloseDirections.call(this),this.reset(),g&&h&&(0===this.countFilters()?this.settings.mapSettings.zoom=V:this.settings.mapSettings.zoom=0,this.processForm(null)),B(j).off("click."+nt,"."+this.settings.locationList+" .bh-sl-close-icon")},lengthUnitSwap:function(t){this.writeDebug("lengthUnitSwap",arguments),"alt-distance"===t.val()?(B("."+this.settings.locationList+" .loc-alt-dist").show(),B("."+this.settings.locationList+" .loc-default-dist").hide()):"default-distance"===t.val()&&(B("."+this.settings.locationList+" .loc-default-dist").show(),B("."+this.settings.locationList+" .loc-alt-dist").hide())},processForm:function(t){this.writeDebug("processForm",arguments);var e=this,s=null,i={},n=B("#"+this.settings.addressID),a=B("#"+this.settings.searchID),o=B("#"+this.settings.maxDistanceID),r="";null!=t&&t.preventDefault(),B("."+e.settings.formContainer+" input, ."+e.settings.formContainer+" select").blur(),!0===this.settings.querystringParams&&(this.getQueryString(this.settings.addressID)||this.getQueryString(this.settings.searchID)||this.getQueryString(this.settings.maxDistanceID))?(K=this.getQueryString(this.settings.addressID),U=this.getQueryString(this.settings.searchID),(s=this.getQueryString(this.settings.maxDistanceID))&&B("#"+this.settings.maxDistanceID+" option[value="+s+"]").length&&o.val(s),K&&s&&(e.settings.mapSettings.zoom=0),""!==n.val()&&(K=n.val()),""!==a.val()&&(U=a.val()),""!==o.val()&&(s=o.val())):(K=n.val()||"",U=a.val()||"",!0===this.settings.maxDistance&&(s=o.val()||"")),r=this.settings.callbackRegion?this.settings.callbackRegion.call(this,K,U,s):B("#"+this.settings.regionID).val(),this.settings.callbackFormVals&&this.settings.callbackFormVals.call(this,K,U,s,r),void 0!==r&&(i={country:r}),"function"==typeof this.settings.callbackGeocodeRestrictions&&(i=this.settings.callbackGeocodeRestrictions.call(this,K,U,s)),""===K&&""===U&&!0!==this.settings.autoGeocode?this._start():""!==K?(""===U&&st.hasOwnProperty("name")&&delete st.name,void 0!==z&&void 0!==g&&void 0!==h&&K===z?(it.lat=g,it.lng=h,it.origin=K,it.name=U,it.distance=s,e.mapping(it)):new this.googleGeocode(this).geocode({address:K,componentRestrictions:i,region:r},function(t){null!==t?(g=t.latitude,h=t.longitude,it.lat=g,it.lng=h,it.origin=K,it.name=U,it.distance=s,it.geocodeResult=t.geocodeResult,e.mapping(it)):e.notify(e.settings.addressErrorAlert)})):""!==U?(""===K&&delete it.origin,it.name=U,e.mapping(it)):!0===this.settings.autoGeocode&&(it.lat=g,it.lng=h,it.origin=K,it.name=U,it.distance=s,e.mapping(it)),void 0!==z&&K!==z&&this.paginationReset()},locationsSetup:function(t,e,s,i,n){this.writeDebug("locationsSetup",arguments),void 0===i||t.distance||(t.distance=this.geoCodeCalcCalcDistance(e,s,t.lat,t.lng,l.EarthRadius),"m"===this.settings.lengthUnit?t.altdistance=1.609344*parseFloat(t.distance):"km"===this.settings.lengthUnit&&(t.altdistance=parseFloat(t.distance)/1.609344)),this.coordinatesInRange(t.lat,t.lng)?!0===this.settings.maxDistance&&null!=n?t.distance<=n?Y.push(t):this.writeDebug("locationsSetup","location ignored because it is out of maxDistance: "+n,t):!0!==this.settings.maxDistance||!0!==this.settings.querystringParams||null==n||t.distance<=n?Y.push(t):this.writeDebug("locationsSetup","location ignored because it is out of maxDistance: "+n,t):this.writeDebug("locationsSetup","location ignored because coordinates out of range: "+n,t)},sorting:function(){this.writeDebug("sorting",arguments);var s=this,i=B("#"+s.settings.mapID),t=B("#"+s.settings.sortID);0!==t.length&&t.on("change."+nt,function(t){var e;t.stopPropagation(),!0===s.settings.pagination&&s.paginationChange(0),t=void 0!==B(this).find(":selected").attr("data-method")?B(this).find(":selected").attr("data-method"):"distance",e=B(this).val(),s.settings.sortBy.method=t,s.settings.sortBy.prop=e,s.settings.callbackSorting&&s.settings.callbackSorting.call(this,s.settings.sortBy),i.hasClass("bh-sl-map-open")&&s.mapping(it)})},order:function(){this.writeDebug("order",arguments);var e=this,s=B("#"+e.settings.mapID),t=B("#"+e.settings.orderID);0!==t.length&&t.on("change."+nt,function(t){t.stopPropagation(),!0===e.settings.pagination&&e.paginationChange(0),e.settings.sortBy.order=B(this).val(),e.settings.callbackOrder&&e.settings.callbackOrder.call(this,e.settings.order),s.hasClass("bh-sl-map-open")&&e.mapping(it)})},distanceFiltering:function(){this.writeDebug("distanceFiltering");var e=this;B("#"+this.settings.maxDistanceID).on("change."+nt,function(t){t.stopPropagation(),!0===e.settings.querystringParams&&(t=N.location.href,(t=new URL(t)).searchParams.set(e.settings.maxDistanceID,this.value),history.pushState?N.history.pushState({path:t.href},"",t.href):N.location.replace(t.href)),!0===B("#"+e.settings.mapID).hasClass("bh-sl-map-open")&&(g&&h?(e.settings.mapSettings.zoom=0,e.processForm()):e.mapping(it))})},countFilters:function(){this.writeDebug("countFilters");var t=0;if(!this.isEmptyObject(st))for(var e in st)st.hasOwnProperty(e)&&(t+=st[e].length);return t},_existingCheckedFilters:function(e){this.writeDebug("_existingCheckedFilters",arguments),B("#"+this.settings.taxonomyFilters[e]+" input[type=checkbox]").each(function(){var t;B(this).prop("checked")&&void 0!==(t=B(this).val())&&""!==t&&-1===st[e].indexOf(t)&&st[e].push(t)})},_existingSelectedFilters:function(e){this.writeDebug("_existingSelectedFilters",arguments),B("#"+this.settings.taxonomyFilters[e]+" select").each(function(){var t=B(this).val();void 0!==t&&""!==t&&-1===st[e].indexOf(t)&&(st[e]=[t])})},_existingRadioFilters:function(e){this.writeDebug("_existingRadioFilters",arguments),B("#"+this.settings.taxonomyFilters[e]+" input[type=radio]").each(function(){var t;B(this).prop("checked")&&void 0!==(t=B(this).val())&&""!==t&&-1===st[e].indexOf(t)&&(st[e]=[t])})},checkFilters:function(){for(var t in this.writeDebug("checkFilters"),this.settings.taxonomyFilters)this.settings.taxonomyFilters.hasOwnProperty(t)&&(this._existingCheckedFilters(t),this._existingSelectedFilters(t),this._existingRadioFilters(t))},selectQueryStringFilters:function(t,e){this.writeDebug("selectQueryStringFilters",arguments);var s=B("#"+this.settings.taxonomyFilters[t]);if(s.find('input[type="checkbox"]').length)for(var i=0;i ul").append(i)):s.getBounds().contains(e.position)&&(n.listSetup(e,0,0),i=a(void 0),B("."+n.settings.locationList+" > ul").append(i))}),B("."+this.settings.locationList+" ul li:even").css("background",this.settings.listColor1),B("."+this.settings.locationList+" ul li:odd").css("background",this.settings.listColor2)},dragSearch:function(t){this.writeDebug("dragSearch",arguments);var e=t.getCenter(),s=this,t=(this.settings.mapSettings.zoom=t.getZoom(),g=it.lat=e.lat(),h=it.lng=e.lng(),new this.reverseGoogleGeocode(this)),e=new google.maps.LatLng(it.lat,it.lng);t.geocode({latLng:e},function(t){null!==t?(it.origin=K=t.address,s.mapping(it)):s.notify(s.settings.addressErrorAlert)})},emptyResult:function(){this.writeDebug("emptyResult",arguments);var t=B("."+this.settings.locationList+" ul"),e=this.settings.mapSettings;this.map=new google.maps.Map(j.getElementById(this.settings.mapID),e),this.settings.callbackNoResults&&this.settings.callbackNoResults.call(this,this.map,e),t.empty(),e=B('
  • '+this.settings.noResultsTitle+'

    '+this.settings.noResultsDesc+"
  • ").hide().fadeIn(),t.append(e),t=g&&h?new google.maps.LatLng(g,h):new google.maps.LatLng(0,0),this.map.setCenter(t),V&&this.map.setZoom(V)},originMarker:function(t,e,s){var i;this.writeDebug("originMarker",arguments),!0===this.settings.originMarker&&void 0!==e&&(this.useLegacyMarkers()?(i=null!==this.settings.originMarkerImg?null===this.settings.originMarkerDim?this.markerImage(this.settings.originMarkerImg):this.markerImage(this.settings.originMarkerImg,this.settings.originMarkerDim.width,this.settings.originMarkerDim.height):{url:"https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png"},new google.maps.Marker({position:s,map:t,icon:i,draggable:!1})):(e=new google.maps.marker.PinElement({background:"#39b25e",borderColor:"#177d3d",glyphColor:"#177d3c"}),e=new google.maps.marker.AdvancedMarkerElement({content:e.element,draggable:!1,map:t,position:s,title:name}),null!==this.settings.originMarkerImg&&(i=j.createElement("img"),null===this.settings.originMarkerDim?i.src=this.settings.originMarkerImg:i=this.markerImage(this.settings.originMarkerImg,this.settings.originMarkerDim.width,this.settings.originMarkerDim.height),e.content=i)))},modalWindow:function(){var e;this.writeDebug("modalWindow"),!0===this.settings.modal&&((e=this).settings.callbackModalOpen&&e.settings.callbackModalOpen.call(this),B("."+e.settings.overlay).fadeIn(),B(j).on("click."+nt,"."+e.settings.closeIcon+", ."+e.settings.overlay,function(){e.modalClose()}),B(j).on("click."+nt,"."+e.settings.modalWindow,function(t){t.stopPropagation()}),B(j).on("keyup."+nt,function(t){27===t.keyCode&&e.modalClose()}))},openNearestLocation:function(t,e,s,i){var n,a;this.writeDebug("openNearestLocation",arguments),!0!==this.settings.openNearest||void 0===t||void 0===z||!0===this.settings.fullMapStart&&!0===W&&!1===this.settings.querystringParams||!0===this.settings.defaultLoc&&!0===W&&!1===this.settings.querystringParams||((n=this).settings.callbackNearestLoc&&n.settings.callbackNearestLoc.call(this,n.map,t,e,s,i),t=t.hasOwnProperty("markerid")?t.markerid:0,a=et[t],n.createInfowindow(a,"left",e,s,i),a=B("."+n.settings.locationList),e=B("."+n.settings.locationList+" li[data-markerid="+t+"]"),B("."+n.settings.locationList+" li").removeClass("list-focus"),e.addClass("list-focus"),a.animate({scrollTop:e.offset().top-a.offset().top+a.scrollTop()}))},listClick:function(s,i,n,a){this.writeDebug("listClick",arguments);var o=this;B(j).on("click."+nt,"."+o.settings.locationList+" li",function(){var t=B(this).data("markerid"),e=et[t];o.settings.callbackListClick&&o.settings.callbackListClick.call(this,t,e,Y[t],s),o.useLegacyMarkers()?s.panTo(e.getPosition()):s.panTo(e.position);o.createInfowindow(e,"left",i,n,a),null!==o.settings.selectedMarkerImg&&o.changeSelectedMarker(e),B("."+o.settings.locationList+" li").removeClass("list-focus"),B("."+o.settings.locationList+" li[data-markerid="+t+"]").addClass("list-focus")}),B(j).on("click."+nt,"."+o.settings.locationList+" li a",function(t){t.stopPropagation()})},resultsTotalCount:function(t){this.writeDebug("resultsTotalCount",arguments);var e=B(".bh-sl-total-results");void 0===t||t<=0||0===e.length||e.text(t)},inlineDirections:function(e,s){var i;this.writeDebug("inlineDirections",arguments),!0===this.settings.inlineDirections&&void 0!==s&&(i=this,B(j).on("click."+nt,"."+i.settings.locationList+" li .loc-directions a",function(t){t.preventDefault();t=B(this).closest("li").attr("data-markerid");i.directionsRequest(s,parseInt(t),e),B(j).on("click."+nt,"."+i.settings.locationList+" .bh-sl-close-icon",function(){i.closeDirections()})}))},visibleMarkersList:function(t,e){var s;this.writeDebug("visibleMarkersList",arguments),!0===this.settings.visibleMarkersList&&(s=this,google.maps.event.addListenerOnce(t,"idle",function(){s.checkVisibleMarkers(e,t)}),google.maps.event.addListener(t,"center_changed",function(){s.checkVisibleMarkers(e,t)}),google.maps.event.addListener(t,"zoom_changed",function(){s.checkVisibleMarkers(e,t)}))},featuredDistanceRestriction:function(){this.writeDebug("featuredDistanceRestriction",arguments);var e=this;return X=B.grep(X,function(t){if(t.hasOwnProperty("distance"))return parseFloat(t.distance)<=parseFloat(e.settings.featuredDistance)})},featuredRestrictions:function(t){return this.writeDebug("featuredRestrictions",arguments),X=null!==this.settings.featuredDistance&&null!==this.settings.featuredDistance?this.featuredDistanceRestriction(t):X},mapping:function(e){this.writeDebug("mapping",arguments);var t,s,i,n,a,o,r=this,l=(this.isEmptyObject(e)||(t=e.lat,s=e.lng,i=e.geocodeResult,n=e.origin,o=e.page),!0===r.settings.pagination&&(Z=o=void 0!==o&&z===K?o:0),r.getQueryString("bhsl-page"));""!==l&&(o=Z=parseInt(l)-1),q=void 0===n&&!0===this.settings.nameSearch?r._getData():(a=new google.maps.LatLng(t,s),void 0!==z&&n===z&&void 0!==Q&&!0!==this.settings.pagination?(n=z,Q):r._getData(g,h,n,i,e)),null!==r.settings.taxonomyFilters&&r.hasEmptyObjectVals(st)&&r.checkFilters(),null!==r.settings.dataRaw?r.processData(e,a,q,o):q.done(function(t){r.processData(e,a,t,o)})},resetDisabledFilterVals:function(){for(var t in this.writeDebug("resetDisabledFilterVals"),this.settings.taxonomyFilters)if(this.settings.taxonomyFilters.hasOwnProperty(t))for(var e=0;er)&&p.notify(p.settings.distanceErrorAlert+r+" "+v);else{if(void 0===Y[0])throw p.emptyResult(),new Error("No locations found. Please check the dataLocation setting and path.");-1!==p.settings.distanceAlert&&Y[0].distance>p.settings.distanceAlert&&(void 0===Z||1===parseInt(Z))&&(p.notify(p.settings.distanceErrorAlert+p.settings.distanceAlert+" "+v),h=!0)}void 0!==Y[0]&&(d=Y[0])}if(!0===p.settings.featuredLocations&&(X=B.grep(Y,function(t){if(t.hasOwnProperty("featured"))return"true"===t.featured}),X=p.featuredRestrictions(t),tt=B.grep(Y,function(t){if(t.hasOwnProperty("featured"))return"true"!==t.featured}),Y=[],Y=X.concat(tt)),(!0!==W&&!1===p.settings.exclusiveFiltering||!0===p.settings.fullMapStart&&!1===p.settings.exclusiveFiltering||!0===p.settings.defaultLoc&&!1===p.settings.exclusiveFiltering)&&p.maybeDisableFilterOptions(),!0===p.settings.slideMap&&_.slideDown(),!0===p.settings.pagination&&p.paginationSetup(i),!0===p.settings.altDistanceNoResult&&d.distance>p.settings.distanceAlert)p.emptyResult();else if(p.isEmptyObject(Y)||"none"===Y[0].result)p.emptyResult();else{p.modalWindow(),H=-1===p.settings.storeLimit||Y.lengthY.length&&(c=p.settings.locationsPerPage-(g+c-Y.length)),Y=Y.slice(g,g+c),H=Y.length):(c=H,g=0),p.resultsTotalCount(Y.length),!0===p.settings.fullMapStart&&!0===W&&!0!==p.settings.querystringParams||0===p.settings.mapSettings.zoom||void 0===o||!0===h||!0===p.settings.maxDistance&&!1===W&&0p.settings.fullMapStartListLimit)for(var G=0;G li:even").css("background",p.settings.listColor1),B("."+p.settings.locationList+" ul > li:odd").css("background",p.settings.listColor2),p.visibleMarkersList(p.map,et),!0===p.settings.querystringParams&&(F=B("#"+p.settings.addressID),P=B("#"+p.settings.searchID),void 0!==it&&it.hasOwnProperty("origin")&&""===F.val()&&F.val(it.origin),void 0!==it)&&it.hasOwnProperty("name")&&""===P.val()&&P.val(it.name),!0===p.settings.modal&&p.settings.callbackModalReady&&p.settings.callbackModalReady.call(this,t),p.settings.callbackFilters&&p.settings.callbackFilters.call(this,st,t)}},writeDebug:function(){N.console&&this.settings.debug&&(Function.prototype.bind?this.writeDebug=Function.prototype.bind.call(console.log,console,"StoreLocator :"):this.writeDebug=function(){arguments[0]="StoreLocator : "+arguments[0],Function.prototype.apply.call(console.log,console,arguments)},this.writeDebug.apply(this,arguments))}}),B.fn[nt]=function(e){var s,i=arguments;return e===t||"object"==typeof e?this.each(function(){B.data(this,"plugin_"+nt)||B.data(this,"plugin_"+nt,new p(this,e))}):"string"==typeof e&&"_"!==e[0]&&"init"!==e?(this.each(function(){var t=B.data(this,"plugin_"+nt);t instanceof p&&"function"==typeof t[e]&&(s=t[e].apply(t,Array.prototype.slice.call(i,1))),"destroy"===e&&B.data(this,"plugin_"+nt,null)}),s!==t?s:this):void 0})}(jQuery,window,document); \ No newline at end of file diff --git a/dist/assets/js/plugins/storeLocator/templates/location-list-description.html b/dist/assets/js/plugins/storeLocator/templates/location-list-description.html index 951970f..ab1f455 100644 --- a/dist/assets/js/plugins/storeLocator/templates/location-list-description.html +++ b/dist/assets/js/plugins/storeLocator/templates/location-list-description.html @@ -18,7 +18,7 @@ {{#if distance}}
    {{distance}} {{length}}
    {{#if altdistance}}
    {{altdistance}} {{altlength}}
    {{/if}} - + {{/if}}
    diff --git a/dist/autocomplete-example.html b/dist/autocomplete-example.html index 0455e75..d94d30f 100644 --- a/dist/autocomplete-example.html +++ b/dist/autocomplete-example.html @@ -1,5 +1,5 @@ - + Autocomplete Example @@ -22,7 +22,7 @@

    Using Chipotle as an Example

    - +
    @@ -34,14 +34,16 @@

    Using Chipotle as an Example

    - + - + diff --git a/dist/autogeocode-example.html b/dist/autogeocode-example.html index 54c0ae6..3249ebc 100755 --- a/dist/autogeocode-example.html +++ b/dist/autogeocode-example.html @@ -1,5 +1,5 @@ - + Map Example - Auto geocoding @@ -22,7 +22,7 @@

    Using Chipotle as an Example

    - + @@ -34,13 +34,17 @@

    Using Chipotle as an Example

    - + - + diff --git a/dist/bootstrap-example.html b/dist/bootstrap-example.html index 7f35706..0a2c3c4 100644 --- a/dist/bootstrap-example.html +++ b/dist/bootstrap-example.html @@ -1,5 +1,5 @@ - + Map Example @@ -48,23 +48,25 @@

    Using Chipotle as an Example

    - - - + + + - + diff --git a/dist/categories-example.html b/dist/categories-example.html index 530f795..36a5d03 100644 --- a/dist/categories-example.html +++ b/dist/categories-example.html @@ -1,5 +1,5 @@ - + Map Example - Categories @@ -28,7 +28,7 @@

    Using Chipotle as an Example

    - +
      @@ -97,19 +97,34 @@

      Using Chipotle as an Example

    +
      +
    • State

    • +
    • + +
    • +
    +
    • Zip

    • - 55416 + +
    • - 55343 + +
    • - 55402 + +
    • - 55317 + +
    @@ -125,20 +140,24 @@

    Using Chipotle as an Example

    - + - + diff --git a/dist/category-markers-example.html b/dist/category-markers-example.html index 101ec6c..306518c 100644 --- a/dist/category-markers-example.html +++ b/dist/category-markers-example.html @@ -1,5 +1,5 @@ - + Map Example - Category Markers @@ -12,8 +12,7 @@
    @@ -23,7 +22,7 @@

    Using Chipotle as an Example

    - + @@ -35,9 +34,9 @@

    Using Chipotle as an Example

    - + - + diff --git a/dist/cluster-example.html b/dist/cluster-example.html index bad80dc..5df6df5 100644 --- a/dist/cluster-example.html +++ b/dist/cluster-example.html @@ -1,5 +1,5 @@ - + Cluster Example @@ -12,7 +12,7 @@
    @@ -22,7 +22,7 @@

    Using Chipotle as an Example

    - + @@ -34,16 +34,16 @@

    Using Chipotle as an Example

    - + - + + - + diff --git a/dist/fullmapstartblank-example.html b/dist/fullmapstartblank-example.html index 748c2ed..7394d0e 100644 --- a/dist/fullmapstartblank-example.html +++ b/dist/fullmapstartblank-example.html @@ -1,5 +1,5 @@ - + Map Example - fullMapStartBlank @@ -22,7 +22,7 @@

    Using Chipotle as an Example

    - + @@ -34,9 +34,9 @@

    Using Chipotle as an Example

    - + - + diff --git a/dist/geocode.html b/dist/geocode.html index 0737860..7068a87 100755 --- a/dist/geocode.html +++ b/dist/geocode.html @@ -1,5 +1,5 @@ - + Geocode @@ -36,8 +36,8 @@

    Simple geocoding form

    - - + + diff --git a/dist/index.html b/dist/index.html index 36a8baa..01976b3 100755 --- a/dist/index.html +++ b/dist/index.html @@ -1,5 +1,5 @@ - + Map Example @@ -22,7 +22,7 @@

    Using Chipotle as an Example

    - + @@ -34,13 +34,16 @@

    Using Chipotle as an Example

    - + - + diff --git a/dist/infobubble-example.html b/dist/infobubble-example.html index be2e87b..319e823 100644 --- a/dist/infobubble-example.html +++ b/dist/infobubble-example.html @@ -1,5 +1,5 @@ - + Infobubble Example @@ -22,7 +22,7 @@

    Using Chipotle as an Example

    - + @@ -34,10 +34,10 @@

    Using Chipotle as an Example

    - + - + + - + diff --git a/dist/json-example.html b/dist/json-example.html index 7046f48..3d70edb 100755 --- a/dist/json-example.html +++ b/dist/json-example.html @@ -1,5 +1,5 @@ - + Map Example - JSON Data @@ -22,7 +22,7 @@

    Using Chipotle as an Example

    - + @@ -34,18 +34,20 @@

    Using Chipotle as an Example

    - + - + - + diff --git a/dist/kml-example.html b/dist/kml-example.html index f94eb2c..c6bb566 100755 --- a/dist/kml-example.html +++ b/dist/kml-example.html @@ -1,5 +1,5 @@ - + Map Example - KML Data @@ -22,7 +22,7 @@

    Using Chipotle as an Example

    - + @@ -34,18 +34,20 @@

    Using Chipotle as an Example

    - + - + - + diff --git a/dist/lazy-load-example.html b/dist/lazy-load-example.html new file mode 100644 index 0000000..df72247 --- /dev/null +++ b/dist/lazy-load-example.html @@ -0,0 +1,64 @@ + + + + Map Example + + + + + + +
    + + + + +
    +
    +
    + + +
    + + +
    +
    + +
    +
    +
    +
      +
      +
      +
      + + + + + + + + + diff --git a/dist/length-unit-swap-example.html b/dist/length-unit-swap-example.html index fd945ac..a21613e 100644 --- a/dist/length-unit-swap-example.html +++ b/dist/length-unit-swap-example.html @@ -1,5 +1,5 @@ - + Length Unit Swap Example @@ -28,7 +28,7 @@

      Using Chipotle as an Example

      - + @@ -40,14 +40,17 @@

      Using Chipotle as an Example

      - + - + diff --git a/dist/maxdistance-example.html b/dist/maxdistance-example.html index 31e27b5..59130bf 100755 --- a/dist/maxdistance-example.html +++ b/dist/maxdistance-example.html @@ -1,5 +1,5 @@ - + Map Example - Maximum Distance @@ -28,7 +28,7 @@

      Using Chipotle as an Example

      - + @@ -40,13 +40,17 @@

      Using Chipotle as an Example

      - + - + diff --git a/dist/modal-example.html b/dist/modal-example.html index 5b0bc03..c5d17a9 100755 --- a/dist/modal-example.html +++ b/dist/modal-example.html @@ -1,5 +1,5 @@ - + Map Example - Modal Window @@ -22,7 +22,7 @@

      Using Chipotle as an Example

      - + @@ -34,18 +34,20 @@

      Using Chipotle as an Example

      - + - + - + diff --git a/dist/namesearch-example.html b/dist/namesearch-example.html index f2fe117..d427962 100644 --- a/dist/namesearch-example.html +++ b/dist/namesearch-example.html @@ -1,5 +1,5 @@ - + NameSearch Example @@ -26,7 +26,7 @@

      Using Chipotle as an Example

      - + @@ -38,13 +38,17 @@

      Using Chipotle as an Example

      - + - + diff --git a/dist/noform-example.html b/dist/noform-example.html index 65142db..dd2bedc 100755 --- a/dist/noform-example.html +++ b/dist/noform-example.html @@ -1,5 +1,5 @@ - + Map Example - No Form for ASP.net @@ -20,7 +20,7 @@

      Using Chipotle as an Example

      - +
      @@ -31,15 +31,19 @@

      Using Chipotle as an Example

      - + - + - + diff --git a/dist/pagination-example.html b/dist/pagination-example.html index 062bb59..c82b04d 100644 --- a/dist/pagination-example.html +++ b/dist/pagination-example.html @@ -1,5 +1,5 @@ - + Map Example - Pagination @@ -22,7 +22,7 @@

      Using Chipotle as an Example

      - + @@ -37,13 +37,17 @@

      Using Chipotle as an Example

      - + - + diff --git a/dist/query-string-example/index.html b/dist/query-string-example/index.html index 938f33d..9eaf051 100644 --- a/dist/query-string-example/index.html +++ b/dist/query-string-example/index.html @@ -1,5 +1,5 @@ - + Map Example @@ -22,10 +22,10 @@

      Using Chipotle as an Example

      - + - \ No newline at end of file + diff --git a/dist/query-string-example/submit.html b/dist/query-string-example/submit.html index 5e23aeb..bc983c6 100644 --- a/dist/query-string-example/submit.html +++ b/dist/query-string-example/submit.html @@ -1,5 +1,5 @@ - + Map Example @@ -18,11 +18,14 @@

      Using Chipotle as an Example

      + + +
      - +
      @@ -34,19 +37,22 @@

      Using Chipotle as an Example

      - + - + diff --git a/dist/rawdata-example.php b/dist/rawdata-example.php index 59a34fa..d1b38f3 100644 --- a/dist/rawdata-example.php +++ b/dist/rawdata-example.php @@ -28,7 +28,7 @@ ?> - + Map Example - Raw Data @@ -51,7 +51,7 @@ - + @@ -63,15 +63,17 @@ - + - + diff --git a/dist/sort-example.html b/dist/sort-example.html index 5e4ebeb..aa23600 100644 --- a/dist/sort-example.html +++ b/dist/sort-example.html @@ -1,5 +1,5 @@ - + Sorting Example @@ -36,7 +36,7 @@

      Using Chipotle as an Example

      - + @@ -48,9 +48,9 @@

      Using Chipotle as an Example

      - + - + diff --git a/libs/handlebars/handlebars-4.7.7.js b/libs/handlebars/handlebars-4.7.7.js new file mode 100644 index 0000000..fb23399 --- /dev/null +++ b/libs/handlebars/handlebars-4.7.7.js @@ -0,0 +1,29 @@ +/**! + + @license + handlebars v4.7.7 + + Copyright (C) 2011-2019 by Yehuda Katz + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + */ +!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a.parseWithoutProcessing=j.parseWithoutProcessing,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(45),i=e(h),j=c(46),k=c(51),l=c(52),m=e(l),n=c(49),o=e(n),p=c(44),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(37),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(38),p=e(o),q=c(44),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(10),j=c(30),k=c(32),l=e(k),m=c(33),n="4.7.7";b.VERSION=n;var o=8;b.COMPILER_REVISION=o;var p=7;b.LAST_COMPATIBLE_COMPILER_REVISION=p;var q={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){(function(d){"use strict";var e=c(13)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(5),h=c(6),i=f(h);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){l&&(l.key=b,l.index=c,l.first=0===c,l.last=!!d,m&&(l.contextPath=m+b)),k+=f(a[b],{data:l,blockParams:g.blockParams([a[b],b],[m+b,null])})}if(!b)throw new i["default"]("Must pass iterator to #each");var f=b.fn,h=b.inverse,j=0,k="",l=void 0,m=void 0;if(b.data&&b.ids&&(m=g.appendContextPath(b.data.contextPath,b.ids[0])+"."),g.isFunction(a)&&(a=a.call(this)),b.data&&(l=g.createFrame(b.data)),a&&"object"==typeof a)if(g.isArray(a))for(var n=a.length;j=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(49),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=m.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(m.isArray(a)&&m.isArray(b)&&a.length===b.length){for(var c=0;c1)throw new l["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,o["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=o["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f0&&(c+=", "+d.join(", "));var e=0;g(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var h=this.mergeSource(c);return a?(f.push(h),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;cthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '== 1.x.x', - 5: '== 2.0.0-alpha.x', - 6: '>= 2.0.0-beta.1', - 7: '>= 4.0.0' - }; - - exports.REVISION_CHANGES = REVISION_CHANGES; - var objectType = '[object Object]'; - - function HandlebarsEnvironment(helpers, partials, decorators) { - this.helpers = helpers || {}; - this.partials = partials || {}; - this.decorators = decorators || {}; - - _helpers.registerDefaultHelpers(this); - _decorators.registerDefaultDecorators(this); - } - - HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: _logger2['default'], - log: _logger2['default'].log, - - registerHelper: function registerHelper(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _exception2['default']('Arg not supported with multiple helpers'); - } - _utils.extend(this.helpers, name); - } else { - this.helpers[name] = fn; - } - }, - unregisterHelper: function unregisterHelper(name) { - delete this.helpers[name]; - }, - - registerPartial: function registerPartial(name, partial) { - if (_utils.toString.call(name) === objectType) { - _utils.extend(this.partials, name); - } else { - if (typeof partial === 'undefined') { - throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); - } - this.partials[name] = partial; - } - }, - unregisterPartial: function unregisterPartial(name) { - delete this.partials[name]; - }, - - registerDecorator: function registerDecorator(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _exception2['default']('Arg not supported with multiple decorators'); - } - _utils.extend(this.decorators, name); - } else { - this.decorators[name] = fn; - } - }, - unregisterDecorator: function unregisterDecorator(name) { - delete this.decorators[name]; - } - }; - - var log = _logger2['default'].log; - - exports.log = log; - exports.createFrame = _utils.createFrame; - exports.logger = _logger2['default']; - -/***/ }, -/* 5 */ -/***/ function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - exports.extend = extend; - exports.indexOf = indexOf; - exports.escapeExpression = escapeExpression; - exports.isEmpty = isEmpty; - exports.createFrame = createFrame; - exports.blockParams = blockParams; - exports.appendContextPath = appendContextPath; - var escape = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`', - '=': '=' - }; - - var badChars = /[&<>"'`=]/g, - possible = /[&<>"'`=]/; - - function escapeChar(chr) { - return escape[chr]; - } - - function extend(obj /* , ...source */) { - for (var i = 1; i < arguments.length; i++) { - for (var key in arguments[i]) { - if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { - obj[key] = arguments[i][key]; - } - } - } - - return obj; - } - - var toString = Object.prototype.toString; - - exports.toString = toString; - // Sourced from lodash - // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt - /* eslint-disable func-style */ - var isFunction = function isFunction(value) { - return typeof value === 'function'; - }; - // fallback for older versions of Chrome and Safari - /* istanbul ignore next */ - if (isFunction(/x/)) { - exports.isFunction = isFunction = function (value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; - } - exports.isFunction = isFunction; - - /* eslint-enable func-style */ - - /* istanbul ignore next */ - var isArray = Array.isArray || function (value) { - return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; - }; - - exports.isArray = isArray; - // Older IE versions do not directly support indexOf so we must implement our own, sadly. - - function indexOf(array, value) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - return -1; - } - - function escapeExpression(string) { - if (typeof string !== 'string') { - // don't escape SafeStrings, since they're already safe - if (string && string.toHTML) { - return string.toHTML(); - } else if (string == null) { - return ''; - } else if (!string) { - return string + ''; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = '' + string; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); - } - - function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } - } - - function createFrame(object) { - var frame = extend({}, object); - frame._parent = object; - return frame; - } - - function blockParams(params, ids) { - params.path = ids; - return params; - } - - function appendContextPath(contextPath, id) { - return (contextPath ? contextPath + '.' : '') + id; - } - -/***/ }, -/* 6 */ -/***/ function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - - var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; - - function Exception(message, node) { - var loc = node && node.loc, - line = undefined, - column = undefined; - if (loc) { - line = loc.start.line; - column = loc.start.column; - - message += ' - ' + line + ':' + column; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - /* istanbul ignore else */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, Exception); - } - - if (loc) { - this.lineNumber = line; - this.column = column; - } - } - - Exception.prototype = new Error(); - - exports['default'] = Exception; - module.exports = exports['default']; - -/***/ }, -/* 7 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.registerDefaultHelpers = registerDefaultHelpers; - - var _helpersBlockHelperMissing = __webpack_require__(8); - - var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); - - var _helpersEach = __webpack_require__(9); - - var _helpersEach2 = _interopRequireDefault(_helpersEach); - - var _helpersHelperMissing = __webpack_require__(10); - - var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); - - var _helpersIf = __webpack_require__(11); - - var _helpersIf2 = _interopRequireDefault(_helpersIf); - - var _helpersLog = __webpack_require__(12); - - var _helpersLog2 = _interopRequireDefault(_helpersLog); - - var _helpersLookup = __webpack_require__(13); - - var _helpersLookup2 = _interopRequireDefault(_helpersLookup); - - var _helpersWith = __webpack_require__(14); - - var _helpersWith2 = _interopRequireDefault(_helpersWith); - - function registerDefaultHelpers(instance) { - _helpersBlockHelperMissing2['default'](instance); - _helpersEach2['default'](instance); - _helpersHelperMissing2['default'](instance); - _helpersIf2['default'](instance); - _helpersLog2['default'](instance); - _helpersLookup2['default'](instance); - _helpersWith2['default'](instance); - } - -/***/ }, -/* 8 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - exports['default'] = function (instance) { - instance.registerHelper('blockHelperMissing', function (context, options) { - var inverse = options.inverse, - fn = options.fn; - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (_utils.isArray(context)) { - if (context.length > 0) { - if (options.ids) { - options.ids = [options.name]; - } - - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - if (options.data && options.ids) { - var data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); - options = { data: data }; - } - - return fn(context, options); - } - }); - }; - - module.exports = exports['default']; - -/***/ }, -/* 9 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - exports['default'] = function (instance) { - instance.registerHelper('each', function (context, options) { - if (!options) { - throw new _exception2['default']('Must pass iterator to #each'); - } - - var fn = options.fn, - inverse = options.inverse, - i = 0, - ret = '', - data = undefined, - contextPath = undefined; - - if (options.data && options.ids) { - contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; - } - - if (_utils.isFunction(context)) { - context = context.call(this); - } - - if (options.data) { - data = _utils.createFrame(options.data); - } - - function execIteration(field, index, last) { - if (data) { - data.key = field; - data.index = index; - data.first = index === 0; - data.last = !!last; - - if (contextPath) { - data.contextPath = contextPath + field; - } - } - - ret = ret + fn(context[field], { - data: data, - blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) - }); - } - - if (context && typeof context === 'object') { - if (_utils.isArray(context)) { - for (var j = context.length; i < j; i++) { - if (i in context) { - execIteration(i, i, i === context.length - 1); - } - } - } else { - var priorKey = undefined; - - for (var key in context) { - if (context.hasOwnProperty(key)) { - // We're running the iterations one step out of sync so we can detect - // the last iteration without have to scan the object twice and create - // an itermediate keys array. - if (priorKey !== undefined) { - execIteration(priorKey, i - 1); - } - priorKey = key; - i++; - } - } - if (priorKey !== undefined) { - execIteration(priorKey, i - 1, true); - } - } - } - - if (i === 0) { - ret = inverse(this); - } - - return ret; - }); - }; - - module.exports = exports['default']; - -/***/ }, -/* 10 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - exports['default'] = function (instance) { - instance.registerHelper('helperMissing', function () /* [args, ]options */{ - if (arguments.length === 1) { - // A missing field in a {{foo}} construct. - return undefined; - } else { - // Someone is actually trying to call something, blow up. - throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); - } - }); - }; - - module.exports = exports['default']; - -/***/ }, -/* 11 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - exports['default'] = function (instance) { - instance.registerHelper('if', function (conditional, options) { - if (_utils.isFunction(conditional)) { - conditional = conditional.call(this); - } - - // Default behavior is to render the positive path if the value is truthy and not empty. - // The `includeZero` option may be set to treat the condtional as purely not empty based on the - // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. - if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - instance.registerHelper('unless', function (conditional, options) { - return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); - }); - }; - - module.exports = exports['default']; - -/***/ }, -/* 12 */ -/***/ function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - - exports['default'] = function (instance) { - instance.registerHelper('log', function () /* message, options */{ - var args = [undefined], - options = arguments[arguments.length - 1]; - for (var i = 0; i < arguments.length - 1; i++) { - args.push(arguments[i]); - } - - var level = 1; - if (options.hash.level != null) { - level = options.hash.level; - } else if (options.data && options.data.level != null) { - level = options.data.level; - } - args[0] = level; - - instance.log.apply(instance, args); - }); - }; - - module.exports = exports['default']; - -/***/ }, -/* 13 */ -/***/ function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - - exports['default'] = function (instance) { - instance.registerHelper('lookup', function (obj, field) { - return obj && obj[field]; - }); - }; - - module.exports = exports['default']; - -/***/ }, -/* 14 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - exports['default'] = function (instance) { - instance.registerHelper('with', function (context, options) { - if (_utils.isFunction(context)) { - context = context.call(this); - } - - var fn = options.fn; - - if (!_utils.isEmpty(context)) { - var data = options.data; - if (options.data && options.ids) { - data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); - } - - return fn(context, { - data: data, - blockParams: _utils.blockParams([context], [data && data.contextPath]) - }); - } else { - return options.inverse(this); - } - }); - }; - - module.exports = exports['default']; - -/***/ }, -/* 15 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.registerDefaultDecorators = registerDefaultDecorators; - - var _decoratorsInline = __webpack_require__(16); - - var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); - - function registerDefaultDecorators(instance) { - _decoratorsInline2['default'](instance); - } - -/***/ }, -/* 16 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - exports['default'] = function (instance) { - instance.registerDecorator('inline', function (fn, props, container, options) { - var ret = fn; - if (!props.partials) { - props.partials = {}; - ret = function (context, options) { - // Create a new partials stack frame prior to exec. - var original = container.partials; - container.partials = _utils.extend({}, original, props.partials); - var ret = fn(context, options); - container.partials = original; - return ret; - }; - } - - props.partials[options.args[0]] = options.fn; - - return ret; - }); - }; - - module.exports = exports['default']; - -/***/ }, -/* 17 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - var logger = { - methodMap: ['debug', 'info', 'warn', 'error'], - level: 'info', - - // Maps a given level value to the `methodMap` indexes above. - lookupLevel: function lookupLevel(level) { - if (typeof level === 'string') { - var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); - if (levelMap >= 0) { - level = levelMap; - } else { - level = parseInt(level, 10); - } - } - - return level; - }, - - // Can be overridden in the host environment - log: function log(level) { - level = logger.lookupLevel(level); - - if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { - var method = logger.methodMap[level]; - if (!console[method]) { - // eslint-disable-line no-console - method = 'log'; - } - - for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - message[_key - 1] = arguments[_key]; - } - - console[method].apply(console, message); // eslint-disable-line no-console - } - } - }; - - exports['default'] = logger; - module.exports = exports['default']; - -/***/ }, -/* 18 */ -/***/ function(module, exports) { - - // Build out our basic SafeString type - 'use strict'; - - exports.__esModule = true; - function SafeString(string) { - this.string = string; - } - - SafeString.prototype.toString = SafeString.prototype.toHTML = function () { - return '' + this.string; - }; - - exports['default'] = SafeString; - module.exports = exports['default']; - -/***/ }, -/* 19 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireWildcard = __webpack_require__(3)['default']; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.checkRevision = checkRevision; - exports.template = template; - exports.wrapProgram = wrapProgram; - exports.resolvePartial = resolvePartial; - exports.invokePartial = invokePartial; - exports.noop = noop; - - var _utils = __webpack_require__(5); - - var Utils = _interopRequireWildcard(_utils); - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - var _base = __webpack_require__(4); - - function checkRevision(compilerInfo) { - var compilerRevision = compilerInfo && compilerInfo[0] || 1, - currentRevision = _base.COMPILER_REVISION; - - if (compilerRevision !== currentRevision) { - if (compilerRevision < currentRevision) { - var runtimeVersions = _base.REVISION_CHANGES[currentRevision], - compilerVersions = _base.REVISION_CHANGES[compilerRevision]; - throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); - } - } - } - - function template(templateSpec, env) { - /* istanbul ignore next */ - if (!env) { - throw new _exception2['default']('No environment passed to template'); - } - if (!templateSpec || !templateSpec.main) { - throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); - } - - templateSpec.main.decorator = templateSpec.main_d; - - // Note: Using env.VM references rather than local var references throughout this section to allow - // for external users to override these as psuedo-supported APIs. - env.VM.checkRevision(templateSpec.compiler); - - function invokePartialWrapper(partial, context, options) { - if (options.hash) { - context = Utils.extend({}, context, options.hash); - if (options.ids) { - options.ids[0] = true; - } - } - - partial = env.VM.resolvePartial.call(this, partial, context, options); - var result = env.VM.invokePartial.call(this, partial, context, options); - - if (result == null && env.compile) { - options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); - result = options.partials[options.name](context, options); - } - if (result != null) { - if (options.indent) { - var lines = result.split('\n'); - for (var i = 0, l = lines.length; i < l; i++) { - if (!lines[i] && i + 1 === l) { - break; - } - - lines[i] = options.indent + lines[i]; - } - result = lines.join('\n'); - } - return result; - } else { - throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); - } - } - - // Just add water - var container = { - strict: function strict(obj, name) { - if (!(name in obj)) { - throw new _exception2['default']('"' + name + '" not defined in ' + obj); - } - return obj[name]; - }, - lookup: function lookup(depths, name) { - var len = depths.length; - for (var i = 0; i < len; i++) { - if (depths[i] && depths[i][name] != null) { - return depths[i][name]; - } - } - }, - lambda: function lambda(current, context) { - return typeof current === 'function' ? current.call(context) : current; - }, - - escapeExpression: Utils.escapeExpression, - invokePartial: invokePartialWrapper, - - fn: function fn(i) { - var ret = templateSpec[i]; - ret.decorator = templateSpec[i + '_d']; - return ret; - }, - - programs: [], - program: function program(i, data, declaredBlockParams, blockParams, depths) { - var programWrapper = this.programs[i], - fn = this.fn(i); - if (data || depths || blockParams || declaredBlockParams) { - programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); - } else if (!programWrapper) { - programWrapper = this.programs[i] = wrapProgram(this, i, fn); - } - return programWrapper; - }, - - data: function data(value, depth) { - while (value && depth--) { - value = value._parent; - } - return value; - }, - merge: function merge(param, common) { - var obj = param || common; - - if (param && common && param !== common) { - obj = Utils.extend({}, common, param); - } - - return obj; - }, - - noop: env.VM.noop, - compilerInfo: templateSpec.compiler - }; - - function ret(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var data = options.data; - - ret._setup(options); - if (!options.partial && templateSpec.useData) { - data = initData(context, data); - } - var depths = undefined, - blockParams = templateSpec.useBlockParams ? [] : undefined; - if (templateSpec.useDepths) { - if (options.depths) { - depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths; - } else { - depths = [context]; - } - } - - function main(context /*, options*/) { - return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); - } - main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); - return main(context, options); - } - ret.isTop = true; - - ret._setup = function (options) { - if (!options.partial) { - container.helpers = container.merge(options.helpers, env.helpers); - - if (templateSpec.usePartial) { - container.partials = container.merge(options.partials, env.partials); - } - if (templateSpec.usePartial || templateSpec.useDecorators) { - container.decorators = container.merge(options.decorators, env.decorators); - } - } else { - container.helpers = options.helpers; - container.partials = options.partials; - container.decorators = options.decorators; - } - }; - - ret._child = function (i, data, blockParams, depths) { - if (templateSpec.useBlockParams && !blockParams) { - throw new _exception2['default']('must pass block params'); - } - if (templateSpec.useDepths && !depths) { - throw new _exception2['default']('must pass parent depths'); - } - - return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); - }; - return ret; - } - - function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { - function prog(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var currentDepths = depths; - if (depths && context !== depths[0]) { - currentDepths = [context].concat(depths); - } - - return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); - } - - prog = executeDecorators(fn, prog, container, depths, data, blockParams); - - prog.program = i; - prog.depth = depths ? depths.length : 0; - prog.blockParams = declaredBlockParams || 0; - return prog; - } - - function resolvePartial(partial, context, options) { - if (!partial) { - if (options.name === '@partial-block') { - partial = options.data['partial-block']; - } else { - partial = options.partials[options.name]; - } - } else if (!partial.call && !options.name) { - // This is a dynamic partial that returned a string - options.name = partial; - partial = options.partials[partial]; - } - return partial; - } - - function invokePartial(partial, context, options) { - options.partial = true; - if (options.ids) { - options.data.contextPath = options.ids[0] || options.data.contextPath; - } - - var partialBlock = undefined; - if (options.fn && options.fn !== noop) { - options.data = _base.createFrame(options.data); - partialBlock = options.data['partial-block'] = options.fn; - - if (partialBlock.partials) { - options.partials = Utils.extend({}, options.partials, partialBlock.partials); - } - } - - if (partial === undefined && partialBlock) { - partial = partialBlock; - } - - if (partial === undefined) { - throw new _exception2['default']('The partial ' + options.name + ' could not be found'); - } else if (partial instanceof Function) { - return partial(context, options); - } - } - - function noop() { - return ''; - } - - function initData(context, data) { - if (!data || !('root' in data)) { - data = data ? _base.createFrame(data) : {}; - data.root = context; - } - return data; - } - - function executeDecorators(fn, prog, container, depths, data, blockParams) { - if (fn.decorator) { - var props = {}; - prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); - Utils.extend(prog, props); - } - return prog; - } - -/***/ }, -/* 20 */ -/***/ function(module, exports) { - - /* WEBPACK VAR INJECTION */(function(global) {/* global window */ - 'use strict'; - - exports.__esModule = true; - - exports['default'] = function (Handlebars) { - /* istanbul ignore next */ - var root = typeof global !== 'undefined' ? global : window, - $Handlebars = root.Handlebars; - /* istanbul ignore next */ - Handlebars.noConflict = function () { - if (root.Handlebars === Handlebars) { - root.Handlebars = $Handlebars; - } - return Handlebars; - }; - }; - - module.exports = exports['default']; - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }, -/* 21 */ -/***/ function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - var AST = { - // Public API used to evaluate derived attributes regarding AST nodes - helpers: { - // a mustache is definitely a helper if: - // * it is an eligible helper, and - // * it has at least one parameter or hash segment - helperExpression: function helperExpression(node) { - return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); - }, - - scopedId: function scopedId(path) { - return (/^\.|this\b/.test(path.original) - ); - }, - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - simpleId: function simpleId(path) { - return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; - } - } - }; - - // Must be exported as an object rather than the root of the module as the jison lexer - // must modify the object to operate properly. - exports['default'] = AST; - module.exports = exports['default']; - -/***/ }, -/* 22 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - var _interopRequireWildcard = __webpack_require__(3)['default']; - - exports.__esModule = true; - exports.parse = parse; - - var _parser = __webpack_require__(23); - - var _parser2 = _interopRequireDefault(_parser); - - var _whitespaceControl = __webpack_require__(24); - - var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); - - var _helpers = __webpack_require__(26); - - var Helpers = _interopRequireWildcard(_helpers); - - var _utils = __webpack_require__(5); - - exports.parser = _parser2['default']; - - var yy = {}; - _utils.extend(yy, Helpers); - - function parse(input, options) { - // Just return if an already-compiled AST was passed in. - if (input.type === 'Program') { - return input; - } - - _parser2['default'].yy = yy; - - // Altering the shared object here, but this is ok as parser is a sync operation - yy.locInfo = function (locInfo) { - return new yy.SourceLocation(options && options.srcName, locInfo); - }; - - var strip = new _whitespaceControl2['default'](options); - return strip.accept(_parser2['default'].parse(input)); - } - -/***/ }, -/* 23 */ -/***/ function(module, exports) { - - /* istanbul ignore next */ - /* Jison generated parser */ - "use strict"; - - var handlebars = (function () { - var parser = { trace: function trace() {}, - yy: {}, - symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, - productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$ - /**/) { - - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1]; - break; - case 2: - this.$ = yy.prepareProgram($$[$0]); - break; - case 3: - this.$ = $$[$0]; - break; - case 4: - this.$ = $$[$0]; - break; - case 5: - this.$ = $$[$0]; - break; - case 6: - this.$ = $$[$0]; - break; - case 7: - this.$ = $$[$0]; - break; - case 8: - this.$ = $$[$0]; - break; - case 9: - this.$ = { - type: 'CommentStatement', - value: yy.stripComment($$[$0]), - strip: yy.stripFlags($$[$0], $$[$0]), - loc: yy.locInfo(this._$) - }; - - break; - case 10: - this.$ = { - type: 'ContentStatement', - original: $$[$0], - value: $$[$0], - loc: yy.locInfo(this._$) - }; - - break; - case 11: - this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 12: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; - break; - case 13: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); - break; - case 14: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); - break; - case 15: - this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 16: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 17: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 18: - this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; - break; - case 19: - var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), - program = yy.prepareProgram([inverse], $$[$0 - 1].loc); - program.chained = true; - - this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; - - break; - case 20: - this.$ = $$[$0]; - break; - case 21: - this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; - break; - case 22: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 23: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 24: - this.$ = { - type: 'PartialStatement', - name: $$[$0 - 3], - params: $$[$0 - 2], - hash: $$[$0 - 1], - indent: '', - strip: yy.stripFlags($$[$0 - 4], $$[$0]), - loc: yy.locInfo(this._$) - }; - - break; - case 25: - this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 26: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; - break; - case 27: - this.$ = $$[$0]; - break; - case 28: - this.$ = $$[$0]; - break; - case 29: - this.$ = { - type: 'SubExpression', - path: $$[$0 - 3], - params: $$[$0 - 2], - hash: $$[$0 - 1], - loc: yy.locInfo(this._$) - }; - - break; - case 30: - this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 31: - this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 32: - this.$ = yy.id($$[$0 - 1]); - break; - case 33: - this.$ = $$[$0]; - break; - case 34: - this.$ = $$[$0]; - break; - case 35: - this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 36: - this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; - break; - case 37: - this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; - break; - case 38: - this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; - break; - case 39: - this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; - break; - case 40: - this.$ = $$[$0]; - break; - case 41: - this.$ = $$[$0]; - break; - case 42: - this.$ = yy.preparePath(true, $$[$0], this._$); - break; - case 43: - this.$ = yy.preparePath(false, $$[$0], this._$); - break; - case 44: - $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; - break; - case 45: - this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; - break; - case 46: - this.$ = []; - break; - case 47: - $$[$0 - 1].push($$[$0]); - break; - case 48: - this.$ = [$$[$0]]; - break; - case 49: - $$[$0 - 1].push($$[$0]); - break; - case 50: - this.$ = []; - break; - case 51: - $$[$0 - 1].push($$[$0]); - break; - case 58: - this.$ = []; - break; - case 59: - $$[$0 - 1].push($$[$0]); - break; - case 64: - this.$ = []; - break; - case 65: - $$[$0 - 1].push($$[$0]); - break; - case 70: - this.$ = []; - break; - case 71: - $$[$0 - 1].push($$[$0]); - break; - case 78: - this.$ = []; - break; - case 79: - $$[$0 - 1].push($$[$0]); - break; - case 82: - this.$ = []; - break; - case 83: - $$[$0 - 1].push($$[$0]); - break; - case 86: - this.$ = []; - break; - case 87: - $$[$0 - 1].push($$[$0]); - break; - case 90: - this.$ = []; - break; - case 91: - $$[$0 - 1].push($$[$0]); - break; - case 94: - this.$ = []; - break; - case 95: - $$[$0 - 1].push($$[$0]); - break; - case 98: - this.$ = [$$[$0]]; - break; - case 99: - $$[$0 - 1].push($$[$0]); - break; - case 100: - this.$ = [$$[$0]]; - break; - case 101: - $$[$0 - 1].push($$[$0]); - break; - } - }, - table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], - defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] }, - parseError: function parseError(str, hash) { - throw new Error(str); - }, - parse: function parse(input) { - var self = this, - stack = [0], - vstack = [null], - lstack = [], - table = this.table, - yytext = "", - yylineno = 0, - yyleng = 0, - recovering = 0, - TERROR = 2, - EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, - preErrorSymbol, - state, - action, - a, - r, - yyval = {}, - p, - len, - newState, - expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - /* Jison generated lexer */ - var lexer = (function () { - var lexer = { EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - setInput: function setInput(input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; - if (this.options.ranges) this.yylloc.range = [0, 0]; - this.offset = 0; - return this; - }, - input: function input() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, - unput: function unput(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) this.yylineno -= lines.length - 1; - var r = this.yylloc.range; - - this.yylloc = { first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, - more: function more() { - this._more = true; - return this; - }, - less: function less(n) { - this.unput(this.match.slice(n)); - }, - pastInput: function pastInput() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); - }, - upcomingInput: function upcomingInput() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - showPosition: function showPosition() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - next: function next() { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, match, tempMatch, index, col, lines; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = { first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) this.done = false; - if (token) return token;else return; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); - } - }, - lex: function lex() { - var r = this.next(); - if (typeof r !== 'undefined') { - return r; - } else { - return this.lex(); - } - }, - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - popState: function popState() { - return this.conditionStack.pop(); - }, - _currentRules: function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - }, - topState: function topState() { - return this.conditionStack[this.conditionStack.length - 2]; - }, - pushState: function begin(condition) { - this.begin(condition); - } }; - lexer.options = {}; - lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START - /**/) { - - function strip(start, end) { - return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end); - } - - var YYSTATE = YY_START; - switch ($avoiding_name_collisions) { - case 0: - if (yy_.yytext.slice(-2) === "\\\\") { - strip(0, 1); - this.begin("mu"); - } else if (yy_.yytext.slice(-1) === "\\") { - strip(0, 1); - this.begin("emu"); - } else { - this.begin("mu"); - } - if (yy_.yytext) return 15; - - break; - case 1: - return 15; - break; - case 2: - this.popState(); - return 15; - - break; - case 3: - this.begin('raw');return 15; - break; - case 4: - this.popState(); - // Should be using `this.topState()` below, but it currently - // returns the second top instead of the first top. Opened an - // issue about it at https://github.com/zaach/jison/issues/291 - if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { - return 15; - } else { - yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9); - return 'END_RAW_BLOCK'; - } - - break; - case 5: - return 15; - break; - case 6: - this.popState(); - return 14; - - break; - case 7: - return 65; - break; - case 8: - return 68; - break; - case 9: - return 19; - break; - case 10: - this.popState(); - this.begin('raw'); - return 23; - - break; - case 11: - return 55; - break; - case 12: - return 60; - break; - case 13: - return 29; - break; - case 14: - return 47; - break; - case 15: - this.popState();return 44; - break; - case 16: - this.popState();return 44; - break; - case 17: - return 34; - break; - case 18: - return 39; - break; - case 19: - return 51; - break; - case 20: - return 48; - break; - case 21: - this.unput(yy_.yytext); - this.popState(); - this.begin('com'); - - break; - case 22: - this.popState(); - return 14; - - break; - case 23: - return 48; - break; - case 24: - return 73; - break; - case 25: - return 72; - break; - case 26: - return 72; - break; - case 27: - return 87; - break; - case 28: - // ignore whitespace - break; - case 29: - this.popState();return 54; - break; - case 30: - this.popState();return 33; - break; - case 31: - yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; - break; - case 32: - yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; - break; - case 33: - return 85; - break; - case 34: - return 82; - break; - case 35: - return 82; - break; - case 36: - return 83; - break; - case 37: - return 84; - break; - case 38: - return 81; - break; - case 39: - return 75; - break; - case 40: - return 77; - break; - case 41: - return 72; - break; - case 42: - yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; - break; - case 43: - return 'INVALID'; - break; - case 44: - return 5; - break; - } - }; - lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; - lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; - return lexer; - })(); - parser.lexer = lexer; - function Parser() { - this.yy = {}; - }Parser.prototype = parser;parser.Parser = Parser; - return new Parser(); - })();exports.__esModule = true; - exports['default'] = handlebars; - -/***/ }, -/* 24 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _visitor = __webpack_require__(25); - - var _visitor2 = _interopRequireDefault(_visitor); - - function WhitespaceControl() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - this.options = options; - } - WhitespaceControl.prototype = new _visitor2['default'](); - - WhitespaceControl.prototype.Program = function (program) { - var doStandalone = !this.options.ignoreStandalone; - - var isRoot = !this.isRootSeen; - this.isRootSeen = true; - - var body = program.body; - for (var i = 0, l = body.length; i < l; i++) { - var current = body[i], - strip = this.accept(current); - - if (!strip) { - continue; - } - - var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), - _isNextWhitespace = isNextWhitespace(body, i, isRoot), - openStandalone = strip.openStandalone && _isPrevWhitespace, - closeStandalone = strip.closeStandalone && _isNextWhitespace, - inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; - - if (strip.close) { - omitRight(body, i, true); - } - if (strip.open) { - omitLeft(body, i, true); - } - - if (doStandalone && inlineStandalone) { - omitRight(body, i); - - if (omitLeft(body, i)) { - // If we are on a standalone node, save the indent info for partials - if (current.type === 'PartialStatement') { - // Pull out the whitespace from the final line - current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; - } - } - } - if (doStandalone && openStandalone) { - omitRight((current.program || current.inverse).body); - - // Strip out the previous content node if it's whitespace only - omitLeft(body, i); - } - if (doStandalone && closeStandalone) { - // Always strip the next node - omitRight(body, i); - - omitLeft((current.inverse || current.program).body); - } - } - - return program; - }; - - WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { - this.accept(block.program); - this.accept(block.inverse); - - // Find the inverse program that is involed with whitespace stripping. - var program = block.program || block.inverse, - inverse = block.program && block.inverse, - firstInverse = inverse, - lastInverse = inverse; - - if (inverse && inverse.chained) { - firstInverse = inverse.body[0].program; - - // Walk the inverse chain to find the last inverse that is actually in the chain. - while (lastInverse.chained) { - lastInverse = lastInverse.body[lastInverse.body.length - 1].program; - } - } - - var strip = { - open: block.openStrip.open, - close: block.closeStrip.close, - - // Determine the standalone candiacy. Basically flag our content as being possibly standalone - // so our parent can determine if we actually are standalone - openStandalone: isNextWhitespace(program.body), - closeStandalone: isPrevWhitespace((firstInverse || program).body) - }; - - if (block.openStrip.close) { - omitRight(program.body, null, true); - } - - if (inverse) { - var inverseStrip = block.inverseStrip; - - if (inverseStrip.open) { - omitLeft(program.body, null, true); - } - - if (inverseStrip.close) { - omitRight(firstInverse.body, null, true); - } - if (block.closeStrip.open) { - omitLeft(lastInverse.body, null, true); - } - - // Find standalone else statments - if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { - omitLeft(program.body); - omitRight(firstInverse.body); - } - } else if (block.closeStrip.open) { - omitLeft(program.body, null, true); - } - - return strip; - }; - - WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { - return mustache.strip; - }; - - WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { - /* istanbul ignore next */ - var strip = node.strip || {}; - return { - inlineStandalone: true, - open: strip.open, - close: strip.close - }; - }; - - function isPrevWhitespace(body, i, isRoot) { - if (i === undefined) { - i = body.length; - } - - // Nodes that end with newlines are considered whitespace (but are special - // cased for strip operations) - var prev = body[i - 1], - sibling = body[i - 2]; - if (!prev) { - return isRoot; - } - - if (prev.type === 'ContentStatement') { - return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); - } - } - function isNextWhitespace(body, i, isRoot) { - if (i === undefined) { - i = -1; - } - - var next = body[i + 1], - sibling = body[i + 2]; - if (!next) { - return isRoot; - } - - if (next.type === 'ContentStatement') { - return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); - } - } - - // Marks the node to the right of the position as omitted. - // I.e. {{foo}}' ' will mark the ' ' node as omitted. - // - // If i is undefined, then the first child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitRight(body, i, multiple) { - var current = body[i == null ? 0 : i + 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { - return; - } - - var original = current.value; - current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); - current.rightStripped = current.value !== original; - } - - // Marks the node to the left of the position as omitted. - // I.e. ' '{{foo}} will mark the ' ' node as omitted. - // - // If i is undefined then the last child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitLeft(body, i, multiple) { - var current = body[i == null ? body.length - 1 : i - 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { - return; - } - - // We omit the last node if it's whitespace only and not preceeded by a non-content node. - var original = current.value; - current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); - current.leftStripped = current.value !== original; - return current.leftStripped; - } - - exports['default'] = WhitespaceControl; - module.exports = exports['default']; - -/***/ }, -/* 25 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - function Visitor() { - this.parents = []; - } - - Visitor.prototype = { - constructor: Visitor, - mutating: false, - - // Visits a given value. If mutating, will replace the value if necessary. - acceptKey: function acceptKey(node, name) { - var value = this.accept(node[name]); - if (this.mutating) { - // Hacky sanity check: This may have a few false positives for type for the helper - // methods but will generally do the right thing without a lot of overhead. - if (value && !Visitor.prototype[value.type]) { - throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); - } - node[name] = value; - } - }, - - // Performs an accept operation with added sanity check to ensure - // required keys are not removed. - acceptRequired: function acceptRequired(node, name) { - this.acceptKey(node, name); - - if (!node[name]) { - throw new _exception2['default'](node.type + ' requires ' + name); - } - }, - - // Traverses a given array. If mutating, empty respnses will be removed - // for child elements. - acceptArray: function acceptArray(array) { - for (var i = 0, l = array.length; i < l; i++) { - this.acceptKey(array, i); - - if (!array[i]) { - array.splice(i, 1); - i--; - l--; - } - } - }, - - accept: function accept(object) { - if (!object) { - return; - } - - /* istanbul ignore next: Sanity code */ - if (!this[object.type]) { - throw new _exception2['default']('Unknown type: ' + object.type, object); - } - - if (this.current) { - this.parents.unshift(this.current); - } - this.current = object; - - var ret = this[object.type](object); - - this.current = this.parents.shift(); - - if (!this.mutating || ret) { - return ret; - } else if (ret !== false) { - return object; - } - }, - - Program: function Program(program) { - this.acceptArray(program.body); - }, - - MustacheStatement: visitSubExpression, - Decorator: visitSubExpression, - - BlockStatement: visitBlock, - DecoratorBlock: visitBlock, - - PartialStatement: visitPartial, - PartialBlockStatement: function PartialBlockStatement(partial) { - visitPartial.call(this, partial); - - this.acceptKey(partial, 'program'); - }, - - ContentStatement: function ContentStatement() /* content */{}, - CommentStatement: function CommentStatement() /* comment */{}, - - SubExpression: visitSubExpression, - - PathExpression: function PathExpression() /* path */{}, - - StringLiteral: function StringLiteral() /* string */{}, - NumberLiteral: function NumberLiteral() /* number */{}, - BooleanLiteral: function BooleanLiteral() /* bool */{}, - UndefinedLiteral: function UndefinedLiteral() /* literal */{}, - NullLiteral: function NullLiteral() /* literal */{}, - - Hash: function Hash(hash) { - this.acceptArray(hash.pairs); - }, - HashPair: function HashPair(pair) { - this.acceptRequired(pair, 'value'); - } - }; - - function visitSubExpression(mustache) { - this.acceptRequired(mustache, 'path'); - this.acceptArray(mustache.params); - this.acceptKey(mustache, 'hash'); - } - function visitBlock(block) { - visitSubExpression.call(this, block); - - this.acceptKey(block, 'program'); - this.acceptKey(block, 'inverse'); - } - function visitPartial(partial) { - this.acceptRequired(partial, 'name'); - this.acceptArray(partial.params); - this.acceptKey(partial, 'hash'); - } - - exports['default'] = Visitor; - module.exports = exports['default']; - -/***/ }, -/* 26 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.SourceLocation = SourceLocation; - exports.id = id; - exports.stripFlags = stripFlags; - exports.stripComment = stripComment; - exports.preparePath = preparePath; - exports.prepareMustache = prepareMustache; - exports.prepareRawBlock = prepareRawBlock; - exports.prepareBlock = prepareBlock; - exports.prepareProgram = prepareProgram; - exports.preparePartialBlock = preparePartialBlock; - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - function validateClose(open, close) { - close = close.path ? close.path.original : close; - - if (open.path.original !== close) { - var errorNode = { loc: open.path.loc }; - - throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode); - } - } - - function SourceLocation(source, locInfo) { - this.source = source; - this.start = { - line: locInfo.first_line, - column: locInfo.first_column - }; - this.end = { - line: locInfo.last_line, - column: locInfo.last_column - }; - } - - function id(token) { - if (/^\[.*\]$/.test(token)) { - return token.substr(1, token.length - 2); - } else { - return token; - } - } - - function stripFlags(open, close) { - return { - open: open.charAt(2) === '~', - close: close.charAt(close.length - 3) === '~' - }; - } - - function stripComment(comment) { - return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, ''); - } - - function preparePath(data, parts, loc) { - loc = this.locInfo(loc); - - var original = data ? '@' : '', - dig = [], - depth = 0, - depthString = ''; - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i].part, - - // If we have [] syntax then we do not treat path references as operators, - // i.e. foo.[this] resolves to approximately context.foo['this'] - isLiteral = parts[i].original !== part; - original += (parts[i].separator || '') + part; - - if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { - if (dig.length > 0) { - throw new _exception2['default']('Invalid path: ' + original, { loc: loc }); - } else if (part === '..') { - depth++; - depthString += '../'; - } - } else { - dig.push(part); - } - } - - return { - type: 'PathExpression', - data: data, - depth: depth, - parts: dig, - original: original, - loc: loc - }; - } - - function prepareMustache(path, params, hash, open, strip, locInfo) { - // Must use charAt to support IE pre-10 - var escapeFlag = open.charAt(3) || open.charAt(2), - escaped = escapeFlag !== '{' && escapeFlag !== '&'; - - var decorator = /\*/.test(open); - return { - type: decorator ? 'Decorator' : 'MustacheStatement', - path: path, - params: params, - hash: hash, - escaped: escaped, - strip: strip, - loc: this.locInfo(locInfo) - }; - } - - function prepareRawBlock(openRawBlock, contents, close, locInfo) { - validateClose(openRawBlock, close); - - locInfo = this.locInfo(locInfo); - var program = { - type: 'Program', - body: contents, - strip: {}, - loc: locInfo - }; - - return { - type: 'BlockStatement', - path: openRawBlock.path, - params: openRawBlock.params, - hash: openRawBlock.hash, - program: program, - openStrip: {}, - inverseStrip: {}, - closeStrip: {}, - loc: locInfo - }; - } - - function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { - if (close && close.path) { - validateClose(openBlock, close); - } - - var decorator = /\*/.test(openBlock.open); - - program.blockParams = openBlock.blockParams; - - var inverse = undefined, - inverseStrip = undefined; - - if (inverseAndProgram) { - if (decorator) { - throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram); - } - - if (inverseAndProgram.chain) { - inverseAndProgram.program.body[0].closeStrip = close.strip; - } - - inverseStrip = inverseAndProgram.strip; - inverse = inverseAndProgram.program; - } - - if (inverted) { - inverted = inverse; - inverse = program; - program = inverted; - } - - return { - type: decorator ? 'DecoratorBlock' : 'BlockStatement', - path: openBlock.path, - params: openBlock.params, - hash: openBlock.hash, - program: program, - inverse: inverse, - openStrip: openBlock.strip, - inverseStrip: inverseStrip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; - } - - function prepareProgram(statements, loc) { - if (!loc && statements.length) { - var firstLoc = statements[0].loc, - lastLoc = statements[statements.length - 1].loc; - - /* istanbul ignore else */ - if (firstLoc && lastLoc) { - loc = { - source: firstLoc.source, - start: { - line: firstLoc.start.line, - column: firstLoc.start.column - }, - end: { - line: lastLoc.end.line, - column: lastLoc.end.column - } - }; - } - } - - return { - type: 'Program', - body: statements, - strip: {}, - loc: loc - }; - } - - function preparePartialBlock(open, program, close, locInfo) { - validateClose(open, close); - - return { - type: 'PartialBlockStatement', - name: open.path, - params: open.params, - hash: open.hash, - program: program, - openStrip: open.strip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; - } - -/***/ }, -/* 27 */ -/***/ function(module, exports, __webpack_require__) { - - /* eslint-disable new-cap */ - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.Compiler = Compiler; - exports.precompile = precompile; - exports.compile = compile; - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - var _utils = __webpack_require__(5); - - var _ast = __webpack_require__(21); - - var _ast2 = _interopRequireDefault(_ast); - - var slice = [].slice; - - function Compiler() {} - - // the foundHelper register will disambiguate helper lookup from finding a - // function in a context. This is necessary for mustache compatibility, which - // requires that context functions in blocks are evaluated by blockHelperMissing, - // and then proceed as if the resulting value was provided to blockHelperMissing. - - Compiler.prototype = { - compiler: Compiler, - - equals: function equals(other) { - var len = this.opcodes.length; - if (other.opcodes.length !== len) { - return false; - } - - for (var i = 0; i < len; i++) { - var opcode = this.opcodes[i], - otherOpcode = other.opcodes[i]; - if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { - return false; - } - } - - // We know that length is the same between the two arrays because they are directly tied - // to the opcode behavior above. - len = this.children.length; - for (var i = 0; i < len; i++) { - if (!this.children[i].equals(other.children[i])) { - return false; - } - } - - return true; - }, - - guid: 0, - - compile: function compile(program, options) { - this.sourceNode = []; - this.opcodes = []; - this.children = []; - this.options = options; - this.stringParams = options.stringParams; - this.trackIds = options.trackIds; - - options.blockParams = options.blockParams || []; - - // These changes will propagate to the other compiler components - var knownHelpers = options.knownHelpers; - options.knownHelpers = { - 'helperMissing': true, - 'blockHelperMissing': true, - 'each': true, - 'if': true, - 'unless': true, - 'with': true, - 'log': true, - 'lookup': true - }; - if (knownHelpers) { - for (var _name in knownHelpers) { - /* istanbul ignore else */ - if (_name in knownHelpers) { - options.knownHelpers[_name] = knownHelpers[_name]; - } - } - } - - return this.accept(program); - }, - - compileProgram: function compileProgram(program) { - var childCompiler = new this.compiler(), - // eslint-disable-line new-cap - result = childCompiler.compile(program, this.options), - guid = this.guid++; - - this.usePartial = this.usePartial || result.usePartial; - - this.children[guid] = result; - this.useDepths = this.useDepths || result.useDepths; - - return guid; - }, - - accept: function accept(node) { - /* istanbul ignore next: Sanity code */ - if (!this[node.type]) { - throw new _exception2['default']('Unknown type: ' + node.type, node); - } - - this.sourceNode.unshift(node); - var ret = this[node.type](node); - this.sourceNode.shift(); - return ret; - }, - - Program: function Program(program) { - this.options.blockParams.unshift(program.blockParams); - - var body = program.body, - bodyLength = body.length; - for (var i = 0; i < bodyLength; i++) { - this.accept(body[i]); - } - - this.options.blockParams.shift(); - - this.isSimple = bodyLength === 1; - this.blockParams = program.blockParams ? program.blockParams.length : 0; - - return this; - }, - - BlockStatement: function BlockStatement(block) { - transformLiteralToPath(block); - - var program = block.program, - inverse = block.inverse; - - program = program && this.compileProgram(program); - inverse = inverse && this.compileProgram(inverse); - - var type = this.classifySexpr(block); - - if (type === 'helper') { - this.helperSexpr(block, program, inverse); - } else if (type === 'simple') { - this.simpleSexpr(block); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('blockValue', block.path.original); - } else { - this.ambiguousSexpr(block, program, inverse); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('ambiguousBlockValue'); - } - - this.opcode('append'); - }, - - DecoratorBlock: function DecoratorBlock(decorator) { - var program = decorator.program && this.compileProgram(decorator.program); - var params = this.setupFullMustacheParams(decorator, program, undefined), - path = decorator.path; - - this.useDecorators = true; - this.opcode('registerDecorator', params.length, path.original); - }, - - PartialStatement: function PartialStatement(partial) { - this.usePartial = true; - - var program = partial.program; - if (program) { - program = this.compileProgram(partial.program); - } - - var params = partial.params; - if (params.length > 1) { - throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial); - } else if (!params.length) { - if (this.options.explicitPartialContext) { - this.opcode('pushLiteral', 'undefined'); - } else { - params.push({ type: 'PathExpression', parts: [], depth: 0 }); - } - } - - var partialName = partial.name.original, - isDynamic = partial.name.type === 'SubExpression'; - if (isDynamic) { - this.accept(partial.name); - } - - this.setupFullMustacheParams(partial, program, undefined, true); - - var indent = partial.indent || ''; - if (this.options.preventIndent && indent) { - this.opcode('appendContent', indent); - indent = ''; - } - - this.opcode('invokePartial', isDynamic, partialName, indent); - this.opcode('append'); - }, - PartialBlockStatement: function PartialBlockStatement(partialBlock) { - this.PartialStatement(partialBlock); - }, - - MustacheStatement: function MustacheStatement(mustache) { - this.SubExpression(mustache); - - if (mustache.escaped && !this.options.noEscape) { - this.opcode('appendEscaped'); - } else { - this.opcode('append'); - } - }, - Decorator: function Decorator(decorator) { - this.DecoratorBlock(decorator); - }, - - ContentStatement: function ContentStatement(content) { - if (content.value) { - this.opcode('appendContent', content.value); - } - }, - - CommentStatement: function CommentStatement() {}, - - SubExpression: function SubExpression(sexpr) { - transformLiteralToPath(sexpr); - var type = this.classifySexpr(sexpr); - - if (type === 'simple') { - this.simpleSexpr(sexpr); - } else if (type === 'helper') { - this.helperSexpr(sexpr); - } else { - this.ambiguousSexpr(sexpr); - } - }, - ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { - var path = sexpr.path, - name = path.parts[0], - isBlock = program != null || inverse != null; - - this.opcode('getContext', path.depth); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - path.strict = true; - this.accept(path); - - this.opcode('invokeAmbiguous', name, isBlock); - }, - - simpleSexpr: function simpleSexpr(sexpr) { - var path = sexpr.path; - path.strict = true; - this.accept(path); - this.opcode('resolvePossibleLambda'); - }, - - helperSexpr: function helperSexpr(sexpr, program, inverse) { - var params = this.setupFullMustacheParams(sexpr, program, inverse), - path = sexpr.path, - name = path.parts[0]; - - if (this.options.knownHelpers[name]) { - this.opcode('invokeKnownHelper', params.length, name); - } else if (this.options.knownHelpersOnly) { - throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); - } else { - path.strict = true; - path.falsy = true; - - this.accept(path); - this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path)); - } - }, - - PathExpression: function PathExpression(path) { - this.addDepth(path.depth); - this.opcode('getContext', path.depth); - - var name = path.parts[0], - scoped = _ast2['default'].helpers.scopedId(path), - blockParamId = !path.depth && !scoped && this.blockParamIndex(name); - - if (blockParamId) { - this.opcode('lookupBlockParam', blockParamId, path.parts); - } else if (!name) { - // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` - this.opcode('pushContext'); - } else if (path.data) { - this.options.data = true; - this.opcode('lookupData', path.depth, path.parts, path.strict); - } else { - this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); - } - }, - - StringLiteral: function StringLiteral(string) { - this.opcode('pushString', string.value); - }, - - NumberLiteral: function NumberLiteral(number) { - this.opcode('pushLiteral', number.value); - }, - - BooleanLiteral: function BooleanLiteral(bool) { - this.opcode('pushLiteral', bool.value); - }, - - UndefinedLiteral: function UndefinedLiteral() { - this.opcode('pushLiteral', 'undefined'); - }, - - NullLiteral: function NullLiteral() { - this.opcode('pushLiteral', 'null'); - }, - - Hash: function Hash(hash) { - var pairs = hash.pairs, - i = 0, - l = pairs.length; - - this.opcode('pushHash'); - - for (; i < l; i++) { - this.pushParam(pairs[i].value); - } - while (i--) { - this.opcode('assignToHash', pairs[i].key); - } - this.opcode('popHash'); - }, - - // HELPERS - opcode: function opcode(name) { - this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc }); - }, - - addDepth: function addDepth(depth) { - if (!depth) { - return; - } - - this.useDepths = true; - }, - - classifySexpr: function classifySexpr(sexpr) { - var isSimple = _ast2['default'].helpers.simpleId(sexpr.path); - - var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); - - // a mustache is an eligible helper if: - // * its id is simple (a single part, not `this` or `..`) - var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr); - - // if a mustache is an eligible helper but not a definite - // helper, it is ambiguous, and will be resolved in a later - // pass or at runtime. - var isEligible = !isBlockParam && (isHelper || isSimple); - - // if ambiguous, we can possibly resolve the ambiguity now - // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. - if (isEligible && !isHelper) { - var _name2 = sexpr.path.parts[0], - options = this.options; - - if (options.knownHelpers[_name2]) { - isHelper = true; - } else if (options.knownHelpersOnly) { - isEligible = false; - } - } - - if (isHelper) { - return 'helper'; - } else if (isEligible) { - return 'ambiguous'; - } else { - return 'simple'; - } - }, - - pushParams: function pushParams(params) { - for (var i = 0, l = params.length; i < l; i++) { - this.pushParam(params[i]); - } - }, - - pushParam: function pushParam(val) { - var value = val.value != null ? val.value : val.original || ''; - - if (this.stringParams) { - if (value.replace) { - value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); - } - - if (val.depth) { - this.addDepth(val.depth); - } - this.opcode('getContext', val.depth || 0); - this.opcode('pushStringParam', value, val.type); - - if (val.type === 'SubExpression') { - // SubExpressions get evaluated and passed in - // in string params mode. - this.accept(val); - } - } else { - if (this.trackIds) { - var blockParamIndex = undefined; - if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) { - blockParamIndex = this.blockParamIndex(val.parts[0]); - } - if (blockParamIndex) { - var blockParamChild = val.parts.slice(1).join('.'); - this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); - } else { - value = val.original || value; - if (value.replace) { - value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); - } - - this.opcode('pushId', val.type, value); - } - } - this.accept(val); - } - }, - - setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { - var params = sexpr.params; - this.pushParams(params); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - if (sexpr.hash) { - this.accept(sexpr.hash); - } else { - this.opcode('emptyHash', omitEmpty); - } - - return params; - }, - - blockParamIndex: function blockParamIndex(name) { - for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { - var blockParams = this.options.blockParams[depth], - param = blockParams && _utils.indexOf(blockParams, name); - if (blockParams && param >= 0) { - return [depth, param]; - } - } - } - }; - - function precompile(input, options, env) { - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); - } - - options = options || {}; - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options); - return new env.JavaScriptCompiler().compile(environment, options); - } - - function compile(input, options, env) { - if (options === undefined) options = {}; - - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); - } - - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var compiled = undefined; - - function compileInput() { - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options), - templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); - return env.template(templateSpec); - } - - // Template is only compiled on first use and cached after that point. - function ret(context, execOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled.call(this, context, execOptions); - } - ret._setup = function (setupOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._setup(setupOptions); - }; - ret._child = function (i, data, blockParams, depths) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._child(i, data, blockParams, depths); - }; - return ret; - } - - function argEquals(a, b) { - if (a === b) { - return true; - } - - if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { - for (var i = 0; i < a.length; i++) { - if (!argEquals(a[i], b[i])) { - return false; - } - } - return true; - } - } - - function transformLiteralToPath(sexpr) { - if (!sexpr.path.parts) { - var literal = sexpr.path; - // Casting to string here to make false and 0 literal values play nicely with the rest - // of the system. - sexpr.path = { - type: 'PathExpression', - data: false, - depth: 0, - parts: [literal.original + ''], - original: literal.original + '', - loc: literal.loc - }; - } - } - -/***/ }, -/* 28 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _base = __webpack_require__(4); - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - var _utils = __webpack_require__(5); - - var _codeGen = __webpack_require__(29); - - var _codeGen2 = _interopRequireDefault(_codeGen); - - function Literal(value) { - this.value = value; - } - - function JavaScriptCompiler() {} - - JavaScriptCompiler.prototype = { - // PUBLIC API: You can override these methods in a subclass to provide - // alternative compiled forms for name lookup and buffering semantics - nameLookup: function nameLookup(parent, name /* , type*/) { - if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { - return [parent, '.', name]; - } else { - return [parent, '[', JSON.stringify(name), ']']; - } - }, - depthedLookup: function depthedLookup(name) { - return [this.aliasable('container.lookup'), '(depths, "', name, '")']; - }, - - compilerInfo: function compilerInfo() { - var revision = _base.COMPILER_REVISION, - versions = _base.REVISION_CHANGES[revision]; - return [revision, versions]; - }, - - appendToBuffer: function appendToBuffer(source, location, explicit) { - // Force a source as this simplifies the merge logic. - if (!_utils.isArray(source)) { - source = [source]; - } - source = this.source.wrap(source, location); - - if (this.environment.isSimple) { - return ['return ', source, ';']; - } else if (explicit) { - // This is a case where the buffer operation occurs as a child of another - // construct, generally braces. We have to explicitly output these buffer - // operations to ensure that the emitted code goes in the correct location. - return ['buffer += ', source, ';']; - } else { - source.appendToBuffer = true; - return source; - } - }, - - initializeBuffer: function initializeBuffer() { - return this.quotedString(''); - }, - // END PUBLIC API - - compile: function compile(environment, options, context, asObject) { - this.environment = environment; - this.options = options; - this.stringParams = this.options.stringParams; - this.trackIds = this.options.trackIds; - this.precompile = !asObject; - - this.name = this.environment.name; - this.isChild = !!context; - this.context = context || { - decorators: [], - programs: [], - environments: [] - }; - - this.preamble(); - - this.stackSlot = 0; - this.stackVars = []; - this.aliases = {}; - this.registers = { list: [] }; - this.hashes = []; - this.compileStack = []; - this.inlineStack = []; - this.blockParams = []; - - this.compileChildren(environment, options); - - this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; - this.useBlockParams = this.useBlockParams || environment.useBlockParams; - - var opcodes = environment.opcodes, - opcode = undefined, - firstLoc = undefined, - i = undefined, - l = undefined; - - for (i = 0, l = opcodes.length; i < l; i++) { - opcode = opcodes[i]; - - this.source.currentLocation = opcode.loc; - firstLoc = firstLoc || opcode.loc; - this[opcode.opcode].apply(this, opcode.args); - } - - // Flush any trailing content that might be pending. - this.source.currentLocation = firstLoc; - this.pushSource(''); - - /* istanbul ignore next */ - if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { - throw new _exception2['default']('Compile completed with content left on stack'); - } - - if (!this.decorators.isEmpty()) { - this.useDecorators = true; - - this.decorators.prepend('var decorators = container.decorators;\n'); - this.decorators.push('return fn;'); - - if (asObject) { - this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); - } else { - this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); - this.decorators.push('}\n'); - this.decorators = this.decorators.merge(); - } - } else { - this.decorators = undefined; - } - - var fn = this.createFunctionContext(asObject); - if (!this.isChild) { - var ret = { - compiler: this.compilerInfo(), - main: fn - }; - - if (this.decorators) { - ret.main_d = this.decorators; // eslint-disable-line camelcase - ret.useDecorators = true; - } - - var _context = this.context; - var programs = _context.programs; - var decorators = _context.decorators; - - for (i = 0, l = programs.length; i < l; i++) { - if (programs[i]) { - ret[i] = programs[i]; - if (decorators[i]) { - ret[i + '_d'] = decorators[i]; - ret.useDecorators = true; - } - } - } - - if (this.environment.usePartial) { - ret.usePartial = true; - } - if (this.options.data) { - ret.useData = true; - } - if (this.useDepths) { - ret.useDepths = true; - } - if (this.useBlockParams) { - ret.useBlockParams = true; - } - if (this.options.compat) { - ret.compat = true; - } - - if (!asObject) { - ret.compiler = JSON.stringify(ret.compiler); - - this.source.currentLocation = { start: { line: 1, column: 0 } }; - ret = this.objectLiteral(ret); - - if (options.srcName) { - ret = ret.toStringWithSourceMap({ file: options.destName }); - ret.map = ret.map && ret.map.toString(); - } else { - ret = ret.toString(); - } - } else { - ret.compilerOptions = this.options; - } - - return ret; - } else { - return fn; - } - }, - - preamble: function preamble() { - // track the last context pushed into place to allow skipping the - // getContext opcode when it would be a noop - this.lastContext = 0; - this.source = new _codeGen2['default'](this.options.srcName); - this.decorators = new _codeGen2['default'](this.options.srcName); - }, - - createFunctionContext: function createFunctionContext(asObject) { - var varDeclarations = ''; - - var locals = this.stackVars.concat(this.registers.list); - if (locals.length > 0) { - varDeclarations += ', ' + locals.join(', '); - } - - // Generate minimizer alias mappings - // - // When using true SourceNodes, this will update all references to the given alias - // as the source nodes are reused in situ. For the non-source node compilation mode, - // aliases will not be used, but this case is already being run on the client and - // we aren't concern about minimizing the template size. - var aliasCount = 0; - for (var alias in this.aliases) { - // eslint-disable-line guard-for-in - var node = this.aliases[alias]; - - if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) { - varDeclarations += ', alias' + ++aliasCount + '=' + alias; - node.children[0] = 'alias' + aliasCount; - } - } - - var params = ['container', 'depth0', 'helpers', 'partials', 'data']; - - if (this.useBlockParams || this.useDepths) { - params.push('blockParams'); - } - if (this.useDepths) { - params.push('depths'); - } - - // Perform a second pass over the output to merge content when possible - var source = this.mergeSource(varDeclarations); - - if (asObject) { - params.push(source); - - return Function.apply(this, params); - } else { - return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); - } - }, - mergeSource: function mergeSource(varDeclarations) { - var isSimple = this.environment.isSimple, - appendOnly = !this.forceBuffer, - appendFirst = undefined, - sourceSeen = undefined, - bufferStart = undefined, - bufferEnd = undefined; - this.source.each(function (line) { - if (line.appendToBuffer) { - if (bufferStart) { - line.prepend(' + '); - } else { - bufferStart = line; - } - bufferEnd = line; - } else { - if (bufferStart) { - if (!sourceSeen) { - appendFirst = true; - } else { - bufferStart.prepend('buffer += '); - } - bufferEnd.add(';'); - bufferStart = bufferEnd = undefined; - } - - sourceSeen = true; - if (!isSimple) { - appendOnly = false; - } - } - }); - - if (appendOnly) { - if (bufferStart) { - bufferStart.prepend('return '); - bufferEnd.add(';'); - } else if (!sourceSeen) { - this.source.push('return "";'); - } - } else { - varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); - - if (bufferStart) { - bufferStart.prepend('return buffer + '); - bufferEnd.add(';'); - } else { - this.source.push('return buffer;'); - } - } - - if (varDeclarations) { - this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); - } - - return this.source.merge(); - }, - - // [blockValue] - // - // On stack, before: hash, inverse, program, value - // On stack, after: return value of blockHelperMissing - // - // The purpose of this opcode is to take a block of the form - // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and - // replace it on the stack with the result of properly - // invoking blockHelperMissing. - blockValue: function blockValue(name) { - var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs(name, 0, params); - - var blockName = this.popStack(); - params.splice(1, 0, blockName); - - this.push(this.source.functionCall(blockHelperMissing, 'call', params)); - }, - - // [ambiguousBlockValue] - // - // On stack, before: hash, inverse, program, value - // Compiler value, before: lastHelper=value of last found helper, if any - // On stack, after, if no lastHelper: same as [blockValue] - // On stack, after, if lastHelper: value - ambiguousBlockValue: function ambiguousBlockValue() { - // We're being a bit cheeky and reusing the options value from the prior exec - var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs('', 0, params, true); - - this.flushInline(); - - var current = this.topStack(); - params.splice(1, 0, current); - - this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); - }, - - // [appendContent] - // - // On stack, before: ... - // On stack, after: ... - // - // Appends the string value of `content` to the current buffer - appendContent: function appendContent(content) { - if (this.pendingContent) { - content = this.pendingContent + content; - } else { - this.pendingLocation = this.source.currentLocation; - } - - this.pendingContent = content; - }, - - // [append] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Coerces `value` to a String and appends it to the current buffer. - // - // If `value` is truthy, or 0, it is coerced into a string and appended - // Otherwise, the empty string is appended - append: function append() { - if (this.isInline()) { - this.replaceStack(function (current) { - return [' != null ? ', current, ' : ""']; - }); - - this.pushSource(this.appendToBuffer(this.popStack())); - } else { - var local = this.popStack(); - this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); - if (this.environment.isSimple) { - this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); - } - } - }, - - // [appendEscaped] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Escape `value` and append it to the buffer - appendEscaped: function appendEscaped() { - this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); - }, - - // [getContext] - // - // On stack, before: ... - // On stack, after: ... - // Compiler value, after: lastContext=depth - // - // Set the value of the `lastContext` compiler value to the depth - getContext: function getContext(depth) { - this.lastContext = depth; - }, - - // [pushContext] - // - // On stack, before: ... - // On stack, after: currentContext, ... - // - // Pushes the value of the current context onto the stack. - pushContext: function pushContext() { - this.pushStackLiteral(this.contextName(this.lastContext)); - }, - - // [lookupOnContext] - // - // On stack, before: ... - // On stack, after: currentContext[name], ... - // - // Looks up the value of `name` on the current context and pushes - // it onto the stack. - lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { - var i = 0; - - if (!scoped && this.options.compat && !this.lastContext) { - // The depthed query is expected to handle the undefined logic for the root level that - // is implemented below, so we evaluate that directly in compat mode - this.push(this.depthedLookup(parts[i++])); - } else { - this.pushContext(); - } - - this.resolvePath('context', parts, i, falsy, strict); - }, - - // [lookupBlockParam] - // - // On stack, before: ... - // On stack, after: blockParam[name], ... - // - // Looks up the value of `parts` on the given block param and pushes - // it onto the stack. - lookupBlockParam: function lookupBlockParam(blockParamId, parts) { - this.useBlockParams = true; - - this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); - this.resolvePath('context', parts, 1); - }, - - // [lookupData] - // - // On stack, before: ... - // On stack, after: data, ... - // - // Push the data lookup operator - lookupData: function lookupData(depth, parts, strict) { - if (!depth) { - this.pushStackLiteral('data'); - } else { - this.pushStackLiteral('container.data(data, ' + depth + ')'); - } - - this.resolvePath('data', parts, 0, true, strict); - }, - - resolvePath: function resolvePath(type, parts, i, falsy, strict) { - // istanbul ignore next - - var _this = this; - - if (this.options.strict || this.options.assumeObjects) { - this.push(strictLookup(this.options.strict && strict, this, parts, type)); - return; - } - - var len = parts.length; - for (; i < len; i++) { - /* eslint-disable no-loop-func */ - this.replaceStack(function (current) { - var lookup = _this.nameLookup(current, parts[i], type); - // We want to ensure that zero and false are handled properly if the context (falsy flag) - // needs to have the special handling for these values. - if (!falsy) { - return [' != null ? ', lookup, ' : ', current]; - } else { - // Otherwise we can use generic falsy handling - return [' && ', lookup]; - } - }); - /* eslint-enable no-loop-func */ - } - }, - - // [resolvePossibleLambda] - // - // On stack, before: value, ... - // On stack, after: resolved value, ... - // - // If the `value` is a lambda, replace it on the stack by - // the return value of the lambda - resolvePossibleLambda: function resolvePossibleLambda() { - this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); - }, - - // [pushStringParam] - // - // On stack, before: ... - // On stack, after: string, currentContext, ... - // - // This opcode is designed for use in string mode, which - // provides the string value of a parameter along with its - // depth rather than resolving it immediately. - pushStringParam: function pushStringParam(string, type) { - this.pushContext(); - this.pushString(type); - - // If it's a subexpression, the string result - // will be pushed after this opcode. - if (type !== 'SubExpression') { - if (typeof string === 'string') { - this.pushString(string); - } else { - this.pushStackLiteral(string); - } - } - }, - - emptyHash: function emptyHash(omitEmpty) { - if (this.trackIds) { - this.push('{}'); // hashIds - } - if (this.stringParams) { - this.push('{}'); // hashContexts - this.push('{}'); // hashTypes - } - this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); - }, - pushHash: function pushHash() { - if (this.hash) { - this.hashes.push(this.hash); - } - this.hash = { values: [], types: [], contexts: [], ids: [] }; - }, - popHash: function popHash() { - var hash = this.hash; - this.hash = this.hashes.pop(); - - if (this.trackIds) { - this.push(this.objectLiteral(hash.ids)); - } - if (this.stringParams) { - this.push(this.objectLiteral(hash.contexts)); - this.push(this.objectLiteral(hash.types)); - } - - this.push(this.objectLiteral(hash.values)); - }, - - // [pushString] - // - // On stack, before: ... - // On stack, after: quotedString(string), ... - // - // Push a quoted version of `string` onto the stack - pushString: function pushString(string) { - this.pushStackLiteral(this.quotedString(string)); - }, - - // [pushLiteral] - // - // On stack, before: ... - // On stack, after: value, ... - // - // Pushes a value onto the stack. This operation prevents - // the compiler from creating a temporary variable to hold - // it. - pushLiteral: function pushLiteral(value) { - this.pushStackLiteral(value); - }, - - // [pushProgram] - // - // On stack, before: ... - // On stack, after: program(guid), ... - // - // Push a program expression onto the stack. This takes - // a compile-time guid and converts it into a runtime-accessible - // expression. - pushProgram: function pushProgram(guid) { - if (guid != null) { - this.pushStackLiteral(this.programExpression(guid)); - } else { - this.pushStackLiteral(null); - } - }, - - // [registerDecorator] - // - // On stack, before: hash, program, params..., ... - // On stack, after: ... - // - // Pops off the decorator's parameters, invokes the decorator, - // and inserts the decorator into the decorators list. - registerDecorator: function registerDecorator(paramSize, name) { - var foundDecorator = this.nameLookup('decorators', name, 'decorator'), - options = this.setupHelperArgs(name, paramSize); - - this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); - }, - - // [invokeHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // Pops off the helper's parameters, invokes the helper, - // and pushes the helper's return value onto the stack. - // - // If the helper is not found, `helperMissing` is called. - invokeHelper: function invokeHelper(paramSize, name, isSimple) { - var nonHelper = this.popStack(), - helper = this.setupHelper(paramSize, name), - simple = isSimple ? [helper.name, ' || '] : ''; - - var lookup = ['('].concat(simple, nonHelper); - if (!this.options.strict) { - lookup.push(' || ', this.aliasable('helpers.helperMissing')); - } - lookup.push(')'); - - this.push(this.source.functionCall(lookup, 'call', helper.callParams)); - }, - - // [invokeKnownHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // This operation is used when the helper is known to exist, - // so a `helperMissing` fallback is not required. - invokeKnownHelper: function invokeKnownHelper(paramSize, name) { - var helper = this.setupHelper(paramSize, name); - this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); - }, - - // [invokeAmbiguous] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of disambiguation - // - // This operation is used when an expression like `{{foo}}` - // is provided, but we don't know at compile-time whether it - // is a helper or a path. - // - // This operation emits more code than the other options, - // and can be avoided by passing the `knownHelpers` and - // `knownHelpersOnly` flags at compile-time. - invokeAmbiguous: function invokeAmbiguous(name, helperCall) { - this.useRegister('helper'); - - var nonHelper = this.popStack(); - - this.emptyHash(); - var helper = this.setupHelper(0, name, helperCall); - - var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); - - var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; - if (!this.options.strict) { - lookup[0] = '(helper = '; - lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing')); - } - - this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); - }, - - // [invokePartial] - // - // On stack, before: context, ... - // On stack after: result of partial invocation - // - // This operation pops off a context, invokes a partial with that context, - // and pushes the result of the invocation back. - invokePartial: function invokePartial(isDynamic, name, indent) { - var params = [], - options = this.setupParams(name, 1, params); - - if (isDynamic) { - name = this.popStack(); - delete options.name; - } - - if (indent) { - options.indent = JSON.stringify(indent); - } - options.helpers = 'helpers'; - options.partials = 'partials'; - options.decorators = 'container.decorators'; - - if (!isDynamic) { - params.unshift(this.nameLookup('partials', name, 'partial')); - } else { - params.unshift(name); - } - - if (this.options.compat) { - options.depths = 'depths'; - } - options = this.objectLiteral(options); - params.push(options); - - this.push(this.source.functionCall('container.invokePartial', '', params)); - }, - - // [assignToHash] - // - // On stack, before: value, ..., hash, ... - // On stack, after: ..., hash, ... - // - // Pops a value off the stack and assigns it to the current hash - assignToHash: function assignToHash(key) { - var value = this.popStack(), - context = undefined, - type = undefined, - id = undefined; - - if (this.trackIds) { - id = this.popStack(); - } - if (this.stringParams) { - type = this.popStack(); - context = this.popStack(); - } - - var hash = this.hash; - if (context) { - hash.contexts[key] = context; - } - if (type) { - hash.types[key] = type; - } - if (id) { - hash.ids[key] = id; - } - hash.values[key] = value; - }, - - pushId: function pushId(type, name, child) { - if (type === 'BlockParam') { - this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); - } else if (type === 'PathExpression') { - this.pushString(name); - } else if (type === 'SubExpression') { - this.pushStackLiteral('true'); - } else { - this.pushStackLiteral('null'); - } - }, - - // HELPERS - - compiler: JavaScriptCompiler, - - compileChildren: function compileChildren(environment, options) { - var children = environment.children, - child = undefined, - compiler = undefined; - - for (var i = 0, l = children.length; i < l; i++) { - child = children[i]; - compiler = new this.compiler(); // eslint-disable-line new-cap - - var index = this.matchExistingProgram(child); - - if (index == null) { - this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children - index = this.context.programs.length; - child.index = index; - child.name = 'program' + index; - this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); - this.context.decorators[index] = compiler.decorators; - this.context.environments[index] = child; - - this.useDepths = this.useDepths || compiler.useDepths; - this.useBlockParams = this.useBlockParams || compiler.useBlockParams; - } else { - child.index = index; - child.name = 'program' + index; - - this.useDepths = this.useDepths || child.useDepths; - this.useBlockParams = this.useBlockParams || child.useBlockParams; - } - } - }, - matchExistingProgram: function matchExistingProgram(child) { - for (var i = 0, len = this.context.environments.length; i < len; i++) { - var environment = this.context.environments[i]; - if (environment && environment.equals(child)) { - return i; - } - } - }, - - programExpression: function programExpression(guid) { - var child = this.environment.children[guid], - programParams = [child.index, 'data', child.blockParams]; - - if (this.useBlockParams || this.useDepths) { - programParams.push('blockParams'); - } - if (this.useDepths) { - programParams.push('depths'); - } - - return 'container.program(' + programParams.join(', ') + ')'; - }, - - useRegister: function useRegister(name) { - if (!this.registers[name]) { - this.registers[name] = true; - this.registers.list.push(name); - } - }, - - push: function push(expr) { - if (!(expr instanceof Literal)) { - expr = this.source.wrap(expr); - } - - this.inlineStack.push(expr); - return expr; - }, - - pushStackLiteral: function pushStackLiteral(item) { - this.push(new Literal(item)); - }, - - pushSource: function pushSource(source) { - if (this.pendingContent) { - this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); - this.pendingContent = undefined; - } - - if (source) { - this.source.push(source); - } - }, - - replaceStack: function replaceStack(callback) { - var prefix = ['('], - stack = undefined, - createdStack = undefined, - usedLiteral = undefined; - - /* istanbul ignore next */ - if (!this.isInline()) { - throw new _exception2['default']('replaceStack on non-inline'); - } - - // We want to merge the inline statement into the replacement statement via ',' - var top = this.popStack(true); - - if (top instanceof Literal) { - // Literals do not need to be inlined - stack = [top.value]; - prefix = ['(', stack]; - usedLiteral = true; - } else { - // Get or create the current stack name for use by the inline - createdStack = true; - var _name = this.incrStack(); - - prefix = ['((', this.push(_name), ' = ', top, ')']; - stack = this.topStack(); - } - - var item = callback.call(this, stack); - - if (!usedLiteral) { - this.popStack(); - } - if (createdStack) { - this.stackSlot--; - } - this.push(prefix.concat(item, ')')); - }, - - incrStack: function incrStack() { - this.stackSlot++; - if (this.stackSlot > this.stackVars.length) { - this.stackVars.push('stack' + this.stackSlot); - } - return this.topStackName(); - }, - topStackName: function topStackName() { - return 'stack' + this.stackSlot; - }, - flushInline: function flushInline() { - var inlineStack = this.inlineStack; - this.inlineStack = []; - for (var i = 0, len = inlineStack.length; i < len; i++) { - var entry = inlineStack[i]; - /* istanbul ignore if */ - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - var stack = this.incrStack(); - this.pushSource([stack, ' = ', entry, ';']); - this.compileStack.push(stack); - } - } - }, - isInline: function isInline() { - return this.inlineStack.length; - }, - - popStack: function popStack(wrapped) { - var inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && item instanceof Literal) { - return item.value; - } else { - if (!inline) { - /* istanbul ignore next */ - if (!this.stackSlot) { - throw new _exception2['default']('Invalid stack pop'); - } - this.stackSlot--; - } - return item; - } - }, - - topStack: function topStack() { - var stack = this.isInline() ? this.inlineStack : this.compileStack, - item = stack[stack.length - 1]; - - /* istanbul ignore if */ - if (item instanceof Literal) { - return item.value; - } else { - return item; - } - }, - - contextName: function contextName(context) { - if (this.useDepths && context) { - return 'depths[' + context + ']'; - } else { - return 'depth' + context; - } - }, - - quotedString: function quotedString(str) { - return this.source.quotedString(str); - }, - - objectLiteral: function objectLiteral(obj) { - return this.source.objectLiteral(obj); - }, - - aliasable: function aliasable(name) { - var ret = this.aliases[name]; - if (ret) { - ret.referenceCount++; - return ret; - } - - ret = this.aliases[name] = this.source.wrap(name); - ret.aliasable = true; - ret.referenceCount = 1; - - return ret; - }, - - setupHelper: function setupHelper(paramSize, name, blockHelper) { - var params = [], - paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); - var foundHelper = this.nameLookup('helpers', name, 'helper'), - callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : {}'); - - return { - params: params, - paramsInit: paramsInit, - name: foundHelper, - callParams: [callContext].concat(params) - }; - }, - - setupParams: function setupParams(helper, paramSize, params) { - var options = {}, - contexts = [], - types = [], - ids = [], - objectArgs = !params, - param = undefined; - - if (objectArgs) { - params = []; - } - - options.name = this.quotedString(helper); - options.hash = this.popStack(); - - if (this.trackIds) { - options.hashIds = this.popStack(); - } - if (this.stringParams) { - options.hashTypes = this.popStack(); - options.hashContexts = this.popStack(); - } - - var inverse = this.popStack(), - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - options.fn = program || 'container.noop'; - options.inverse = inverse || 'container.noop'; - } - - // The parameters go on to the stack in order (making sure that they are evaluated in order) - // so we need to pop them off the stack in reverse order - var i = paramSize; - while (i--) { - param = this.popStack(); - params[i] = param; - - if (this.trackIds) { - ids[i] = this.popStack(); - } - if (this.stringParams) { - types[i] = this.popStack(); - contexts[i] = this.popStack(); - } - } - - if (objectArgs) { - options.args = this.source.generateArray(params); - } - - if (this.trackIds) { - options.ids = this.source.generateArray(ids); - } - if (this.stringParams) { - options.types = this.source.generateArray(types); - options.contexts = this.source.generateArray(contexts); - } - - if (this.options.data) { - options.data = 'data'; - } - if (this.useBlockParams) { - options.blockParams = 'blockParams'; - } - return options; - }, - - setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { - var options = this.setupParams(helper, paramSize, params); - options = this.objectLiteral(options); - if (useRegister) { - this.useRegister('options'); - params.push('options'); - return ['options=', options]; - } else if (params) { - params.push(options); - return ''; - } else { - return options; - } - } - }; - - (function () { - var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); - - var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; - - for (var i = 0, l = reservedWords.length; i < l; i++) { - compilerWords[reservedWords[i]] = true; - } - })(); - - JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { - return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); - }; - - function strictLookup(requireTerminal, compiler, parts, type) { - var stack = compiler.popStack(), - i = 0, - len = parts.length; - if (requireTerminal) { - len--; - } - - for (; i < len; i++) { - stack = compiler.nameLookup(stack, parts[i], type); - } - - if (requireTerminal) { - return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')']; - } else { - return stack; - } - } - - exports['default'] = JavaScriptCompiler; - module.exports = exports['default']; - -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { - - /* global define */ - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - var SourceNode = undefined; - - try { - /* istanbul ignore next */ - if (false) { - // We don't support this in AMD environments. For these environments, we asusme that - // they are running on the browser and thus have no need for the source-map library. - var SourceMap = require('source-map'); - SourceNode = SourceMap.SourceNode; - } - } catch (err) {} - /* NOP */ - - /* istanbul ignore if: tested but not covered in istanbul due to dist build */ - if (!SourceNode) { - SourceNode = function (line, column, srcFile, chunks) { - this.src = ''; - if (chunks) { - this.add(chunks); - } - }; - /* istanbul ignore next */ - SourceNode.prototype = { - add: function add(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src += chunks; - }, - prepend: function prepend(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src = chunks + this.src; - }, - toStringWithSourceMap: function toStringWithSourceMap() { - return { code: this.toString() }; - }, - toString: function toString() { - return this.src; - } - }; - } - - function castChunk(chunk, codeGen, loc) { - if (_utils.isArray(chunk)) { - var ret = []; - - for (var i = 0, len = chunk.length; i < len; i++) { - ret.push(codeGen.wrap(chunk[i], loc)); - } - return ret; - } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { - // Handle primitives that the SourceNode will throw up on - return chunk + ''; - } - return chunk; - } - - function CodeGen(srcFile) { - this.srcFile = srcFile; - this.source = []; - } - - CodeGen.prototype = { - isEmpty: function isEmpty() { - return !this.source.length; - }, - prepend: function prepend(source, loc) { - this.source.unshift(this.wrap(source, loc)); - }, - push: function push(source, loc) { - this.source.push(this.wrap(source, loc)); - }, - - merge: function merge() { - var source = this.empty(); - this.each(function (line) { - source.add([' ', line, '\n']); - }); - return source; - }, - - each: function each(iter) { - for (var i = 0, len = this.source.length; i < len; i++) { - iter(this.source[i]); - } - }, - - empty: function empty() { - var loc = this.currentLocation || { start: {} }; - return new SourceNode(loc.start.line, loc.start.column, this.srcFile); - }, - wrap: function wrap(chunk) { - var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; - - if (chunk instanceof SourceNode) { - return chunk; - } - - chunk = castChunk(chunk, this, loc); - - return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); - }, - - functionCall: function functionCall(fn, type, params) { - params = this.generateList(params); - return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); - }, - - quotedString: function quotedString(str) { - return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + '"'; - }, - - objectLiteral: function objectLiteral(obj) { - var pairs = []; - - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - var value = castChunk(obj[key], this); - if (value !== 'undefined') { - pairs.push([this.quotedString(key), ':', value]); - } - } - } - - var ret = this.generateList(pairs); - ret.prepend('{'); - ret.add('}'); - return ret; - }, - - generateList: function generateList(entries) { - var ret = this.empty(); - - for (var i = 0, len = entries.length; i < len; i++) { - if (i) { - ret.add(','); - } - - ret.add(castChunk(entries[i], this)); - } - - return ret; - }, - - generateArray: function generateArray(entries) { - var ret = this.generateList(entries); - ret.prepend('['); - ret.add(']'); - - return ret; - } - }; - - exports['default'] = CodeGen; - module.exports = exports['default']; - -/***/ } -/******/ ]) -}); -; \ No newline at end of file diff --git a/libs/markerclusterer/markerclusterer.js b/libs/markerclusterer/markerclusterer.js index 199deb1..9b8486c 100644 --- a/libs/markerclusterer/markerclusterer.js +++ b/libs/markerclusterer/markerclusterer.js @@ -1,1315 +1,2 @@ -// ==ClosureCompiler== -// @compilation_level ADVANCED_OPTIMIZATIONS -// @externs_url https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3.js -// ==/ClosureCompiler== - -/** - * @name MarkerClusterer for Google Maps v3 - * @version version 1.0 - * @author Luke Mahe - * @fileoverview - * The library creates and manages per-zoom-level clusters for large amounts of - * markers. - *
      - * This is a v3 implementation of the - * v2 MarkerClusterer. - */ - -/** - * @license - * Copyright 2010 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/** - * A Marker Clusterer that clusters markers. - * - * @param {google.maps.Map} map The Google map to attach to. - * @param {Array.=} opt_markers Optional markers to add to - * the cluster. - * @param {Object=} opt_options support the following options: - * 'gridSize': (number) The grid size of a cluster in pixels. - * 'maxZoom': (number) The maximum zoom level that a marker can be part of a - * cluster. - * 'zoomOnClick': (boolean) Whether the default behaviour of clicking on a - * cluster is to zoom into it. - * 'averageCenter': (boolean) Whether the center of each cluster should be - * the average of all markers in the cluster. - * 'minimumClusterSize': (number) The minimum number of markers to be in a - * cluster before the markers are hidden and a count - * is shown. - * 'styles': (object) An object that has style properties: - * 'url': (string) The image url. - * 'height': (number) The image height. - * 'width': (number) The image width. - * 'anchor': (Array) The anchor position of the label text. - * 'textColor': (string) The text color. - * 'textSize': (number) The text size. - * 'backgroundPosition': (string) The position of the backgound x, y. - * 'iconAnchor': (Array) The anchor position of the icon x, y. - * @constructor - * @extends google.maps.OverlayView - */ -function MarkerClusterer(map, opt_markers, opt_options) { - // MarkerClusterer implements google.maps.OverlayView interface. We use the - // extend function to extend MarkerClusterer with google.maps.OverlayView - // because it might not always be available when the code is defined so we - // look for it at the last possible moment. If it doesn't exist now then - // there is no point going ahead :) - this.extend(MarkerClusterer, google.maps.OverlayView); - this.map_ = map; - - /** - * @type {Array.} - * @private - */ - this.markers_ = []; - - /** - * @type {Array.} - */ - this.clusters_ = []; - - this.sizes = [53, 56, 66, 78, 90]; - - /** - * @private - */ - this.styles_ = []; - - /** - * @type {boolean} - * @private - */ - this.ready_ = false; - - var options = opt_options || {}; - - /** - * @type {number} - * @private - */ - this.gridSize_ = options['gridSize'] || 60; - - /** - * @private - */ - this.minClusterSize_ = options['minimumClusterSize'] || 2; - - - /** - * @type {?number} - * @private - */ - this.maxZoom_ = options['maxZoom'] || null; - - this.styles_ = options['styles'] || []; - - /** - * @type {string} - * @private - */ - this.imagePath_ = options['imagePath'] || - this.MARKER_CLUSTER_IMAGE_PATH_; - - /** - * @type {string} - * @private - */ - this.imageExtension_ = options['imageExtension'] || - this.MARKER_CLUSTER_IMAGE_EXTENSION_; - - /** - * @type {boolean} - * @private - */ - this.zoomOnClick_ = true; - - if (options['zoomOnClick'] != undefined) { - this.zoomOnClick_ = options['zoomOnClick']; - } - - /** - * @type {boolean} - * @private - */ - this.averageCenter_ = false; - - if (options['averageCenter'] != undefined) { - this.averageCenter_ = options['averageCenter']; - } - - this.setupStyles_(); - - this.setMap(map); - - /** - * @type {number} - * @private - */ - this.prevZoom_ = this.map_.getZoom(); - - // Add the map event listeners - var that = this; - google.maps.event.addListener(this.map_, 'zoom_changed', function() { - var zoom = that.map_.getZoom(); - - if (that.prevZoom_ != zoom) { - that.prevZoom_ = zoom; - that.resetViewport(); - } - }); - - google.maps.event.addListener(this.map_, 'idle', function() { - that.redraw(); - }); - - // Finally, add the markers - if (opt_markers && opt_markers.length) { - this.addMarkers(opt_markers, false); - } -} - - -/** - * The marker cluster image path. - * - * @type {string} - * @private - */ -MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '../images/m'; - - -/** - * The marker cluster image path. - * - * @type {string} - * @private - */ -MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png'; - - -/** - * Extends a objects prototype by anothers. - * - * @param {Object} obj1 The object to be extended. - * @param {Object} obj2 The object to extend with. - * @return {Object} The new extended object. - * @ignore - */ -MarkerClusterer.prototype.extend = function(obj1, obj2) { - return (function(object) { - for (var property in object.prototype) { - this.prototype[property] = object.prototype[property]; - } - return this; - }).apply(obj1, [obj2]); -}; - - -/** - * Implementaion of the interface method. - * @ignore - */ -MarkerClusterer.prototype.onAdd = function() { - this.setReady_(true); -}; - -/** - * Implementaion of the interface method. - * @ignore - */ -MarkerClusterer.prototype.draw = function() {}; - -/** - * Sets up the styles object. - * - * @private - */ -MarkerClusterer.prototype.setupStyles_ = function() { - if (this.styles_.length) { - return; - } - - for (var i = 0, size; size = this.sizes[i]; i++) { - this.styles_.push({ - url: this.imagePath_ + (i + 1) + '.' + this.imageExtension_, - height: size, - width: size - }); - } -}; - -/** - * Fit the map to the bounds of the markers in the clusterer. - */ -MarkerClusterer.prototype.fitMapToMarkers = function() { - var markers = this.getMarkers(); - var bounds = new google.maps.LatLngBounds(); - for (var i = 0, marker; marker = markers[i]; i++) { - bounds.extend(marker.getPosition()); - } - - this.map_.fitBounds(bounds); -}; - - -/** - * Sets the styles. - * - * @param {Object} styles The style to set. - */ -MarkerClusterer.prototype.setStyles = function(styles) { - this.styles_ = styles; -}; - - -/** - * Gets the styles. - * - * @return {Object} The styles object. - */ -MarkerClusterer.prototype.getStyles = function() { - return this.styles_; -}; - - -/** - * Whether zoom on click is set. - * - * @return {boolean} True if zoomOnClick_ is set. - */ -MarkerClusterer.prototype.isZoomOnClick = function() { - return this.zoomOnClick_; -}; - -/** - * Whether average center is set. - * - * @return {boolean} True if averageCenter_ is set. - */ -MarkerClusterer.prototype.isAverageCenter = function() { - return this.averageCenter_; -}; - - -/** - * Returns the array of markers in the clusterer. - * - * @return {Array.} The markers. - */ -MarkerClusterer.prototype.getMarkers = function() { - return this.markers_; -}; - - -/** - * Returns the number of markers in the clusterer - * - * @return {Number} The number of markers. - */ -MarkerClusterer.prototype.getTotalMarkers = function() { - return this.markers_.length; -}; - - -/** - * Sets the max zoom for the clusterer. - * - * @param {number} maxZoom The max zoom level. - */ -MarkerClusterer.prototype.setMaxZoom = function(maxZoom) { - this.maxZoom_ = maxZoom; -}; - - -/** - * Gets the max zoom for the clusterer. - * - * @return {number} The max zoom level. - */ -MarkerClusterer.prototype.getMaxZoom = function() { - return this.maxZoom_; -}; - - -/** - * The function for calculating the cluster icon image. - * - * @param {Array.} markers The markers in the clusterer. - * @param {number} numStyles The number of styles available. - * @return {Object} A object properties: 'text' (string) and 'index' (number). - * @private - */ -MarkerClusterer.prototype.calculator_ = function(markers, numStyles) { - var index = 0; - var count = markers.length; - var dv = count; - while (dv !== 0) { - dv = parseInt(dv / 10, 10); - index++; - } - - index = Math.min(index, numStyles); - return { - text: count, - index: index - }; -}; - - -/** - * Set the calculator function. - * - * @param {function(Array, number)} calculator The function to set as the - * calculator. The function should return a object properties: - * 'text' (string) and 'index' (number). - * - */ -MarkerClusterer.prototype.setCalculator = function(calculator) { - this.calculator_ = calculator; -}; - - -/** - * Get the calculator function. - * - * @return {function(Array, number)} the calculator function. - */ -MarkerClusterer.prototype.getCalculator = function() { - return this.calculator_; -}; - - -/** - * Add an array of markers to the clusterer. - * - * @param {Array.} markers The markers to add. - * @param {boolean=} opt_nodraw Whether to redraw the clusters. - */ -MarkerClusterer.prototype.addMarkers = function(markers, opt_nodraw) { - for (var i = 0, marker; marker = markers[i]; i++) { - this.pushMarkerTo_(marker); - } - if (!opt_nodraw) { - this.redraw(); - } -}; - - -/** - * Pushes a marker to the clusterer. - * - * @param {google.maps.Marker} marker The marker to add. - * @private - */ -MarkerClusterer.prototype.pushMarkerTo_ = function(marker) { - marker.isAdded = false; - if (marker['draggable']) { - // If the marker is draggable add a listener so we update the clusters on - // the drag end. - var that = this; - google.maps.event.addListener(marker, 'dragend', function() { - marker.isAdded = false; - that.repaint(); - }); - } - this.markers_.push(marker); -}; - - -/** - * Adds a marker to the clusterer and redraws if needed. - * - * @param {google.maps.Marker} marker The marker to add. - * @param {boolean=} opt_nodraw Whether to redraw the clusters. - */ -MarkerClusterer.prototype.addMarker = function(marker, opt_nodraw) { - this.pushMarkerTo_(marker); - if (!opt_nodraw) { - this.redraw(); - } -}; - - -/** - * Removes a marker and returns true if removed, false if not - * - * @param {google.maps.Marker} marker The marker to remove - * @return {boolean} Whether the marker was removed or not - * @private - */ -MarkerClusterer.prototype.removeMarker_ = function(marker) { - var index = -1; - if (this.markers_.indexOf) { - index = this.markers_.indexOf(marker); - } else { - for (var i = 0, m; m = this.markers_[i]; i++) { - if (m == marker) { - index = i; - break; - } - } - } - - if (index == -1) { - // Marker is not in our list of markers. - return false; - } - - marker.setMap(null); - - this.markers_.splice(index, 1); - - return true; -}; - - -/** - * Remove a marker from the cluster. - * - * @param {google.maps.Marker} marker The marker to remove. - * @param {boolean=} opt_nodraw Optional boolean to force no redraw. - * @return {boolean} True if the marker was removed. - */ -MarkerClusterer.prototype.removeMarker = function(marker, opt_nodraw) { - var removed = this.removeMarker_(marker); - - if (!opt_nodraw && removed) { - this.resetViewport(); - this.redraw(); - return true; - } else { - return false; - } -}; - - -/** - * Removes an array of markers from the cluster. - * - * @param {Array.} markers The markers to remove. - * @param {boolean=} opt_nodraw Optional boolean to force no redraw. - */ -MarkerClusterer.prototype.removeMarkers = function(markers, opt_nodraw) { - var removed = false; - - for (var i = 0, marker; marker = markers[i]; i++) { - var r = this.removeMarker_(marker); - removed = removed || r; - } - - if (!opt_nodraw && removed) { - this.resetViewport(); - this.redraw(); - return true; - } -}; - - -/** - * Sets the clusterer's ready state. - * - * @param {boolean} ready The state. - * @private - */ -MarkerClusterer.prototype.setReady_ = function(ready) { - if (!this.ready_) { - this.ready_ = ready; - this.createClusters_(); - } -}; - - -/** - * Returns the number of clusters in the clusterer. - * - * @return {number} The number of clusters. - */ -MarkerClusterer.prototype.getTotalClusters = function() { - return this.clusters_.length; -}; - - -/** - * Returns the google map that the clusterer is associated with. - * - * @return {google.maps.Map} The map. - */ -MarkerClusterer.prototype.getMap = function() { - return this.map_; -}; - - -/** - * Sets the google map that the clusterer is associated with. - * - * @param {google.maps.Map} map The map. - */ -MarkerClusterer.prototype.setMap = function(map) { - this.map_ = map; -}; - - -/** - * Returns the size of the grid. - * - * @return {number} The grid size. - */ -MarkerClusterer.prototype.getGridSize = function() { - return this.gridSize_; -}; - - -/** - * Sets the size of the grid. - * - * @param {number} size The grid size. - */ -MarkerClusterer.prototype.setGridSize = function(size) { - this.gridSize_ = size; -}; - - -/** - * Returns the min cluster size. - * - * @return {number} The grid size. - */ -MarkerClusterer.prototype.getMinClusterSize = function() { - return this.minClusterSize_; -}; - -/** - * Sets the min cluster size. - * - * @param {number} size The grid size. - */ -MarkerClusterer.prototype.setMinClusterSize = function(size) { - this.minClusterSize_ = size; -}; - - -/** - * Extends a bounds object by the grid size. - * - * @param {google.maps.LatLngBounds} bounds The bounds to extend. - * @return {google.maps.LatLngBounds} The extended bounds. - */ -MarkerClusterer.prototype.getExtendedBounds = function(bounds) { - var projection = this.getProjection(); - - // Turn the bounds into latlng. - var tr = new google.maps.LatLng(bounds.getNorthEast().lat(), - bounds.getNorthEast().lng()); - var bl = new google.maps.LatLng(bounds.getSouthWest().lat(), - bounds.getSouthWest().lng()); - - // Convert the points to pixels and the extend out by the grid size. - var trPix = projection.fromLatLngToDivPixel(tr); - trPix.x += this.gridSize_; - trPix.y -= this.gridSize_; - - var blPix = projection.fromLatLngToDivPixel(bl); - blPix.x -= this.gridSize_; - blPix.y += this.gridSize_; - - // Convert the pixel points back to LatLng - var ne = projection.fromDivPixelToLatLng(trPix); - var sw = projection.fromDivPixelToLatLng(blPix); - - // Extend the bounds to contain the new bounds. - bounds.extend(ne); - bounds.extend(sw); - - return bounds; -}; - - -/** - * Determins if a marker is contained in a bounds. - * - * @param {google.maps.Marker} marker The marker to check. - * @param {google.maps.LatLngBounds} bounds The bounds to check against. - * @return {boolean} True if the marker is in the bounds. - * @private - */ -MarkerClusterer.prototype.isMarkerInBounds_ = function(marker, bounds) { - return bounds.contains(marker.getPosition()); -}; - - -/** - * Clears all clusters and markers from the clusterer. - */ -MarkerClusterer.prototype.clearMarkers = function() { - this.resetViewport(true); - - // Set the markers a empty array. - this.markers_ = []; -}; - - -/** - * Clears all existing clusters and recreates them. - * @param {boolean} opt_hide To also hide the marker. - */ -MarkerClusterer.prototype.resetViewport = function(opt_hide) { - // Remove all the clusters - for (var i = 0, cluster; cluster = this.clusters_[i]; i++) { - cluster.remove(); - } - - // Reset the markers to not be added and to be invisible. - for (var i = 0, marker; marker = this.markers_[i]; i++) { - marker.isAdded = false; - if (opt_hide) { - marker.setMap(null); - } - } - - this.clusters_ = []; -}; - -/** - * - */ -MarkerClusterer.prototype.repaint = function() { - var oldClusters = this.clusters_.slice(); - this.clusters_.length = 0; - this.resetViewport(); - this.redraw(); - - // Remove the old clusters. - // Do it in a timeout so the other clusters have been drawn first. - window.setTimeout(function() { - for (var i = 0, cluster; cluster = oldClusters[i]; i++) { - cluster.remove(); - } - }, 0); -}; - - -/** - * Redraws the clusters. - */ -MarkerClusterer.prototype.redraw = function() { - this.createClusters_(); -}; - - -/** - * Calculates the distance between two latlng locations in km. - * @see http://www.movable-type.co.uk/scripts/latlong.html - * - * @param {google.maps.LatLng} p1 The first lat lng point. - * @param {google.maps.LatLng} p2 The second lat lng point. - * @return {number} The distance between the two points in km. - * @private - */ -MarkerClusterer.prototype.distanceBetweenPoints_ = function(p1, p2) { - if (!p1 || !p2) { - return 0; - } - - var R = 6371; // Radius of the Earth in km - var dLat = (p2.lat() - p1.lat()) * Math.PI / 180; - var dLon = (p2.lng() - p1.lng()) * Math.PI / 180; - var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + - Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) * - Math.sin(dLon / 2) * Math.sin(dLon / 2); - var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); - var d = R * c; - return d; -}; - - -/** - * Add a marker to a cluster, or creates a new cluster. - * - * @param {google.maps.Marker} marker The marker to add. - * @private - */ -MarkerClusterer.prototype.addToClosestCluster_ = function(marker) { - var distance = 40000; // Some large number - var clusterToAddTo = null; - var pos = marker.getPosition(); - for (var i = 0, cluster; cluster = this.clusters_[i]; i++) { - var center = cluster.getCenter(); - if (center) { - var d = this.distanceBetweenPoints_(center, marker.getPosition()); - if (d < distance) { - distance = d; - clusterToAddTo = cluster; - } - } - } - - if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) { - clusterToAddTo.addMarker(marker); - } else { - var cluster = new Cluster(this); - cluster.addMarker(marker); - this.clusters_.push(cluster); - } -}; - - -/** - * Creates the clusters. - * - * @private - */ -MarkerClusterer.prototype.createClusters_ = function() { - if (!this.ready_) { - return; - } - - // Get our current map view bounds. - // Create a new bounds object so we don't affect the map. - var mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(), - this.map_.getBounds().getNorthEast()); - var bounds = this.getExtendedBounds(mapBounds); - - for (var i = 0, marker; marker = this.markers_[i]; i++) { - if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) { - this.addToClosestCluster_(marker); - } - } -}; - - -/** - * A cluster that contains markers. - * - * @param {MarkerClusterer} markerClusterer The markerclusterer that this - * cluster is associated with. - * @constructor - * @ignore - */ -function Cluster(markerClusterer) { - this.markerClusterer_ = markerClusterer; - this.map_ = markerClusterer.getMap(); - this.gridSize_ = markerClusterer.getGridSize(); - this.minClusterSize_ = markerClusterer.getMinClusterSize(); - this.averageCenter_ = markerClusterer.isAverageCenter(); - this.center_ = null; - this.markers_ = []; - this.bounds_ = null; - this.clusterIcon_ = new ClusterIcon(this, markerClusterer.getStyles(), - markerClusterer.getGridSize()); -} - -/** - * Determins if a marker is already added to the cluster. - * - * @param {google.maps.Marker} marker The marker to check. - * @return {boolean} True if the marker is already added. - */ -Cluster.prototype.isMarkerAlreadyAdded = function(marker) { - if (this.markers_.indexOf) { - return this.markers_.indexOf(marker) != -1; - } else { - for (var i = 0, m; m = this.markers_[i]; i++) { - if (m == marker) { - return true; - } - } - } - return false; -}; - - -/** - * Add a marker the cluster. - * - * @param {google.maps.Marker} marker The marker to add. - * @return {boolean} True if the marker was added. - */ -Cluster.prototype.addMarker = function(marker) { - if (this.isMarkerAlreadyAdded(marker)) { - return false; - } - - if (!this.center_) { - this.center_ = marker.getPosition(); - this.calculateBounds_(); - } else { - if (this.averageCenter_) { - var l = this.markers_.length + 1; - var lat = (this.center_.lat() * (l-1) + marker.getPosition().lat()) / l; - var lng = (this.center_.lng() * (l-1) + marker.getPosition().lng()) / l; - this.center_ = new google.maps.LatLng(lat, lng); - this.calculateBounds_(); - } - } - - marker.isAdded = true; - this.markers_.push(marker); - - var len = this.markers_.length; - if (len < this.minClusterSize_ && marker.getMap() != this.map_) { - // Min cluster size not reached so show the marker. - marker.setMap(this.map_); - } - - if (len == this.minClusterSize_) { - // Hide the markers that were showing. - for (var i = 0; i < len; i++) { - this.markers_[i].setMap(null); - } - } - - if (len >= this.minClusterSize_) { - marker.setMap(null); - } - - this.updateIcon(); - return true; -}; - - -/** - * Returns the marker clusterer that the cluster is associated with. - * - * @return {MarkerClusterer} The associated marker clusterer. - */ -Cluster.prototype.getMarkerClusterer = function() { - return this.markerClusterer_; -}; - - -/** - * Returns the bounds of the cluster. - * - * @return {google.maps.LatLngBounds} the cluster bounds. - */ -Cluster.prototype.getBounds = function() { - var bounds = new google.maps.LatLngBounds(this.center_, this.center_); - var markers = this.getMarkers(); - for (var i = 0, marker; marker = markers[i]; i++) { - bounds.extend(marker.getPosition()); - } - return bounds; -}; - - -/** - * Removes the cluster - */ -Cluster.prototype.remove = function() { - this.clusterIcon_.remove(); - this.markers_.length = 0; - delete this.markers_; -}; - - -/** - * Returns the center of the cluster. - * - * @return {number} The cluster center. - */ -Cluster.prototype.getSize = function() { - return this.markers_.length; -}; - - -/** - * Returns the center of the cluster. - * - * @return {Array.} The cluster center. - */ -Cluster.prototype.getMarkers = function() { - return this.markers_; -}; - - -/** - * Returns the center of the cluster. - * - * @return {google.maps.LatLng} The cluster center. - */ -Cluster.prototype.getCenter = function() { - return this.center_; -}; - - -/** - * Calculated the extended bounds of the cluster with the grid. - * - * @private - */ -Cluster.prototype.calculateBounds_ = function() { - var bounds = new google.maps.LatLngBounds(this.center_, this.center_); - this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds); -}; - - -/** - * Determines if a marker lies in the clusters bounds. - * - * @param {google.maps.Marker} marker The marker to check. - * @return {boolean} True if the marker lies in the bounds. - */ -Cluster.prototype.isMarkerInClusterBounds = function(marker) { - return this.bounds_.contains(marker.getPosition()); -}; - - -/** - * Returns the map that the cluster is associated with. - * - * @return {google.maps.Map} The map. - */ -Cluster.prototype.getMap = function() { - return this.map_; -}; - - -/** - * Updates the cluster icon - */ -Cluster.prototype.updateIcon = function() { - var zoom = this.map_.getZoom(); - var mz = this.markerClusterer_.getMaxZoom(); - - if (mz && zoom > mz) { - // The zoom is greater than our max zoom so show all the markers in cluster. - for (var i = 0, marker; marker = this.markers_[i]; i++) { - marker.setMap(this.map_); - } - return; - } - - if (this.markers_.length < this.minClusterSize_) { - // Min cluster size not yet reached. - this.clusterIcon_.hide(); - return; - } - - var numStyles = this.markerClusterer_.getStyles().length; - var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles); - this.clusterIcon_.setCenter(this.center_); - this.clusterIcon_.setSums(sums); - this.clusterIcon_.show(); -}; - - -/** - * A cluster icon - * - * @param {Cluster} cluster The cluster to be associated with. - * @param {Object} styles An object that has style properties: - * 'url': (string) The image url. - * 'height': (number) The image height. - * 'width': (number) The image width. - * 'anchor': (Array) The anchor position of the label text. - * 'textColor': (string) The text color. - * 'textSize': (number) The text size. - * 'backgroundPosition: (string) The background postition x, y. - * @param {number=} opt_padding Optional padding to apply to the cluster icon. - * @constructor - * @extends google.maps.OverlayView - * @ignore - */ -function ClusterIcon(cluster, styles, opt_padding) { - cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView); - - this.styles_ = styles; - this.padding_ = opt_padding || 0; - this.cluster_ = cluster; - this.center_ = null; - this.map_ = cluster.getMap(); - this.div_ = null; - this.sums_ = null; - this.visible_ = false; - - this.setMap(this.map_); -} - - -/** - * Triggers the clusterclick event and zoom's if the option is set. - * - * @param {google.maps.MouseEvent} event The event to propagate - */ -ClusterIcon.prototype.triggerClusterClick = function(event) { - var markerClusterer = this.cluster_.getMarkerClusterer(); - - // Trigger the clusterclick event. - google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster_, event); - - if (markerClusterer.isZoomOnClick()) { - // Zoom into the cluster. - this.map_.fitBounds(this.cluster_.getBounds()); - } -}; - - -/** - * Adding the cluster icon to the dom. - * @ignore - */ -ClusterIcon.prototype.onAdd = function() { - this.div_ = document.createElement('DIV'); - if (this.visible_) { - var pos = this.getPosFromLatLng_(this.center_); - this.div_.style.cssText = this.createCss(pos); - this.div_.innerHTML = this.sums_.text; - } - - var panes = this.getPanes(); - panes.overlayMouseTarget.appendChild(this.div_); - - var that = this; - var isDragging = false; - google.maps.event.addDomListener(this.div_, 'click', function(event) { - // Only perform click when not preceded by a drag - if (!isDragging) { - that.triggerClusterClick(event); - } - }); - google.maps.event.addDomListener(this.div_, 'mousedown', function() { - isDragging = false; - }); - google.maps.event.addDomListener(this.div_, 'mousemove', function() { - isDragging = true; - }); -}; - - -/** - * Returns the position to place the div dending on the latlng. - * - * @param {google.maps.LatLng} latlng The position in latlng. - * @return {google.maps.Point} The position in pixels. - * @private - */ -ClusterIcon.prototype.getPosFromLatLng_ = function(latlng) { - var pos = this.getProjection().fromLatLngToDivPixel(latlng); - - if (typeof this.iconAnchor_ === 'object' && this.iconAnchor_.length === 2) { - pos.x -= this.iconAnchor_[0]; - pos.y -= this.iconAnchor_[1]; - } else { - pos.x -= parseInt(this.width_ / 2, 10); - pos.y -= parseInt(this.height_ / 2, 10); - } - return pos; -}; - - -/** - * Draw the icon. - * @ignore - */ -ClusterIcon.prototype.draw = function() { - if (this.visible_) { - var pos = this.getPosFromLatLng_(this.center_); - this.div_.style.top = pos.y + 'px'; - this.div_.style.left = pos.x + 'px'; - } -}; - - -/** - * Hide the icon. - */ -ClusterIcon.prototype.hide = function() { - if (this.div_) { - this.div_.style.display = 'none'; - } - this.visible_ = false; -}; - - -/** - * Position and show the icon. - */ -ClusterIcon.prototype.show = function() { - if (this.div_) { - var pos = this.getPosFromLatLng_(this.center_); - this.div_.style.cssText = this.createCss(pos); - this.div_.style.display = ''; - } - this.visible_ = true; -}; - - -/** - * Remove the icon from the map - */ -ClusterIcon.prototype.remove = function() { - this.setMap(null); -}; - - -/** - * Implementation of the onRemove interface. - * @ignore - */ -ClusterIcon.prototype.onRemove = function() { - if (this.div_ && this.div_.parentNode) { - this.hide(); - this.div_.parentNode.removeChild(this.div_); - this.div_ = null; - } -}; - - -/** - * Set the sums of the icon. - * - * @param {Object} sums The sums containing: - * 'text': (string) The text to display in the icon. - * 'index': (number) The style index of the icon. - */ -ClusterIcon.prototype.setSums = function(sums) { - this.sums_ = sums; - this.text_ = sums.text; - this.index_ = sums.index; - if (this.div_) { - this.div_.innerHTML = sums.text; - } - - this.useStyle(); -}; - - -/** - * Sets the icon to the the styles. - */ -ClusterIcon.prototype.useStyle = function() { - var index = Math.max(0, this.sums_.index - 1); - index = Math.min(this.styles_.length - 1, index); - var style = this.styles_[index]; - this.url_ = style['url']; - this.height_ = style['height']; - this.width_ = style['width']; - this.textColor_ = style['textColor']; - this.anchor_ = style['anchor']; - this.textSize_ = style['textSize']; - this.backgroundPosition_ = style['backgroundPosition']; - this.iconAnchor_ = style['iconAnchor']; -}; - - -/** - * Sets the center of the icon. - * - * @param {google.maps.LatLng} center The latlng to set as the center. - */ -ClusterIcon.prototype.setCenter = function(center) { - this.center_ = center; -}; - - -/** - * Create the css text based on the position of the icon. - * - * @param {google.maps.Point} pos The position. - * @return {string} The css style text. - */ -ClusterIcon.prototype.createCss = function(pos) { - var style = []; - style.push('background-image:url(' + this.url_ + ');'); - var backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0'; - style.push('background-position:' + backgroundPosition + ';'); - - if (typeof this.anchor_ === 'object') { - if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 && - this.anchor_[0] < this.height_) { - style.push('height:' + (this.height_ - this.anchor_[0]) + - 'px; padding-top:' + this.anchor_[0] + 'px;'); - } else if (typeof this.anchor_[0] === 'number' && this.anchor_[0] < 0 && - -this.anchor_[0] < this.height_) { - style.push('height:' + this.height_ + 'px; line-height:' + (this.height_ + this.anchor_[0]) + - 'px;'); - } else { - style.push('height:' + this.height_ + 'px; line-height:' + this.height_ + - 'px;'); - } - if (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 && - this.anchor_[1] < this.width_) { - style.push('width:' + (this.width_ - this.anchor_[1]) + - 'px; padding-left:' + this.anchor_[1] + 'px;'); - } else { - style.push('width:' + this.width_ + 'px; text-align:center;'); - } - } else { - style.push('height:' + this.height_ + 'px; line-height:' + - this.height_ + 'px; width:' + this.width_ + 'px; text-align:center;'); - } - - var txtColor = this.textColor_ ? this.textColor_ : 'black'; - var txtSize = this.textSize_ ? this.textSize_ : 11; - - style.push('cursor:pointer; top:' + pos.y + 'px; left:' + - pos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' + - txtSize + 'px; font-family:Arial,sans-serif; font-weight:bold'); - return style.join(''); -}; - - -// Export Symbols for Closure -// If you are not going to compile with closure then you can remove the -// code below. -window['MarkerClusterer'] = MarkerClusterer; -MarkerClusterer.prototype['addMarker'] = MarkerClusterer.prototype.addMarker; -MarkerClusterer.prototype['addMarkers'] = MarkerClusterer.prototype.addMarkers; -MarkerClusterer.prototype['clearMarkers'] = - MarkerClusterer.prototype.clearMarkers; -MarkerClusterer.prototype['fitMapToMarkers'] = - MarkerClusterer.prototype.fitMapToMarkers; -MarkerClusterer.prototype['getCalculator'] = - MarkerClusterer.prototype.getCalculator; -MarkerClusterer.prototype['getGridSize'] = - MarkerClusterer.prototype.getGridSize; -MarkerClusterer.prototype['getExtendedBounds'] = - MarkerClusterer.prototype.getExtendedBounds; -MarkerClusterer.prototype['getMap'] = MarkerClusterer.prototype.getMap; -MarkerClusterer.prototype['getMarkers'] = MarkerClusterer.prototype.getMarkers; -MarkerClusterer.prototype['getMaxZoom'] = MarkerClusterer.prototype.getMaxZoom; -MarkerClusterer.prototype['getStyles'] = MarkerClusterer.prototype.getStyles; -MarkerClusterer.prototype['getTotalClusters'] = - MarkerClusterer.prototype.getTotalClusters; -MarkerClusterer.prototype['getTotalMarkers'] = - MarkerClusterer.prototype.getTotalMarkers; -MarkerClusterer.prototype['redraw'] = MarkerClusterer.prototype.redraw; -MarkerClusterer.prototype['removeMarker'] = - MarkerClusterer.prototype.removeMarker; -MarkerClusterer.prototype['removeMarkers'] = - MarkerClusterer.prototype.removeMarkers; -MarkerClusterer.prototype['resetViewport'] = - MarkerClusterer.prototype.resetViewport; -MarkerClusterer.prototype['repaint'] = - MarkerClusterer.prototype.repaint; -MarkerClusterer.prototype['setCalculator'] = - MarkerClusterer.prototype.setCalculator; -MarkerClusterer.prototype['setGridSize'] = - MarkerClusterer.prototype.setGridSize; -MarkerClusterer.prototype['setMaxZoom'] = - MarkerClusterer.prototype.setMaxZoom; -MarkerClusterer.prototype['onAdd'] = MarkerClusterer.prototype.onAdd; -MarkerClusterer.prototype['draw'] = MarkerClusterer.prototype.draw; - -Cluster.prototype['getCenter'] = Cluster.prototype.getCenter; -Cluster.prototype['getSize'] = Cluster.prototype.getSize; -Cluster.prototype['getMarkers'] = Cluster.prototype.getMarkers; - -ClusterIcon.prototype['onAdd'] = ClusterIcon.prototype.onAdd; -ClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw; -ClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove; \ No newline at end of file +var markerClusterer=function(t){"use strict";function e(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(s[r[o]]=t[r[o]])}return s}class s{static isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}class r{constructor(t){let{markers:e,position:s}=t;this.markers=e,s&&(s instanceof google.maps.LatLng?this._position=s:this._position=new google.maps.LatLng(s))}get bounds(){if(0===this.markers.length&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const e of this.markers)t.extend(s.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((t=>s.getVisible(t))).length}push(t){this.markers.push(t)}delete(){this.marker&&(s.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const o=(t,e,r,o)=>{const n=i(t.getBounds(),e,o);return r.filter((t=>n.contains(s.getPosition(t))))},i=(t,e,s)=>{const{northEast:r,southWest:o}=h(t,e),i=l({northEast:r,southWest:o},s);return c(i,e)},n=(t,e,s)=>{const r=i(t,e,s),o=r.getNorthEast(),n=r.getSouthWest();return[n.lng(),n.lat(),o.lng(),o.lat()]},a=(t,e)=>{const s=(e.lat-t.lat)*Math.PI/180,r=(e.lng-t.lng)*Math.PI/180,o=Math.sin(s/2),i=Math.sin(r/2),n=o*o+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*i*i;return 6371*(2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n)))},h=(t,e)=>({northEast:e.fromLatLngToDivPixel(t.getNorthEast()),southWest:e.fromLatLngToDivPixel(t.getSouthWest())}),l=(t,e)=>{let{northEast:s,southWest:r}=t;return s.x+=e,s.y-=e,r.x-=e,r.y+=e,{northEast:s,southWest:r}},c=(t,e)=>{let{northEast:s,southWest:r}=t;const o=e.fromDivPixelToLatLng(r),i=e.fromDivPixelToLatLng(s);return new google.maps.LatLngBounds(o,i)};class u{constructor(t){let{maxZoom:e=16}=t;this.maxZoom=e}noop(t){let{markers:e}=t;return m(e)}}class p extends u{constructor(t){var{viewportPadding:s=60}=t;super(e(t,["viewportPadding"])),this.viewportPadding=60,this.viewportPadding=s}calculate(t){let{markers:e,map:s,mapCanvasProjection:r}=t;return s.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:o(s,r,e,this.viewportPadding),map:s,mapCanvasProjection:r})}}}const m=t=>t.map((t=>new r({position:s.getPosition(t),markers:[t]})));function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var g=function t(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){if(e.constructor!==s.constructor)return!1;var r,o,i;if(Array.isArray(e)){if((r=e.length)!=s.length)return!1;for(o=r;0!=o--;)if(!t(e[o],s[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===s.toString();if((r=(i=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(s,i[o]))return!1;for(o=r;0!=o--;){var n=i[o];if(!t(e[n],s[n]))return!1}return!0}return e!=e&&s!=s},f=d(g);const k=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class w{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,s]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const r=s>>4;if(1!==r)throw new Error(`Got v${r} data when expected v1.`);const o=k[15&s];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,2,1),[n]=new Uint32Array(t,4,1);return new w(n,i,o,t)}constructor(t,e=64,s=Float64Array,r){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=s,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=k.indexOf(this.ArrayType),i=2*t*this.ArrayType.BYTES_PER_ELEMENT,n=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-n%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${s}.`);r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+n+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+i+n+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+n+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=t,this.coords[this._pos++]=e,s}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return y(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,s,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:n}=this,a=[0,o.length-1,0],h=[];for(;a.length;){const l=a.pop()||0,c=a.pop()||0,u=a.pop()||0;if(c-u<=n){for(let n=u;n<=c;n++){const a=i[2*n],l=i[2*n+1];a>=t&&a<=s&&l>=e&&l<=r&&h.push(o[n])}continue}const p=u+c>>1,m=i[2*p],d=i[2*p+1];m>=t&&m<=s&&d>=e&&d<=r&&h.push(o[p]),(0===l?t<=m:e<=d)&&(a.push(u),a.push(p-1),a.push(1-l)),(0===l?s>=m:r>=d)&&(a.push(p+1),a.push(c),a.push(1-l))}return h}within(t,e,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:o,nodeSize:i}=this,n=[0,r.length-1,0],a=[],h=s*s;for(;n.length;){const l=n.pop()||0,c=n.pop()||0,u=n.pop()||0;if(c-u<=i){for(let s=u;s<=c;s++)C(o[2*s],o[2*s+1],t,e)<=h&&a.push(r[s]);continue}const p=u+c>>1,m=o[2*p],d=o[2*p+1];C(m,d,t,e)<=h&&a.push(r[p]),(0===l?t-s<=m:e-s<=d)&&(n.push(u),n.push(p-1),n.push(1-l)),(0===l?t+s>=m:e+s>=d)&&(n.push(p+1),n.push(c),n.push(1-l))}return a}}function y(t,e,s,r,o,i){if(o-r<=s)return;const n=r+o>>1;M(t,e,n,r,o,i),y(t,e,s,r,n-1,1-i),y(t,e,s,n+1,o,1-i)}function M(t,e,s,r,o,i){for(;o>r;){if(o-r>600){const n=o-r+1,a=s-r+1,h=Math.log(n),l=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*l*(n-l)/n)*(a-n/2<0?-1:1);M(t,e,s,Math.max(r,Math.floor(s-a*l/n+c)),Math.min(o,Math.floor(s+(n-a)*l/n+c)),i)}const n=e[2*s+i];let a=r,h=o;for(v(t,e,r,s),e[2*o+i]>n&&v(t,e,r,o);an;)h--}e[2*r+i]===n?v(t,e,r,h):(h++,v(t,e,h,o)),h<=s&&(r=h+1),s<=h&&(o=h-1)}}function v(t,e,s,r){x(t,s,r),x(e,2*s,2*r),x(e,2*s+1,2*r+1)}function x(t,e,s){const r=t[e];t[e]=t[s],t[s]=r}function C(t,e,s,r){const o=t-s,i=e-r;return o*o+i*i}const P={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},_=Math.fround||(E=new Float32Array(1),t=>(E[0]=+t,E[0]));var E;const A=3,b=5,L=6;class O{constructor(t){this.options=Object.assign(Object.create(P),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:s,maxZoom:r}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;const i=[];for(let e=0;e=s;t--){const s=+Date.now();n=this.trees[t]=this._createTree(this._cluster(n,t)),e&&console.log("z%d: %d clusters in %dms",t,n.numItems,+Date.now()-s)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let s=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)s=-180,o=180;else if(s>o){const t=this.getClusters([s,r,180,i],e),n=this.getClusters([-180,r,o,i],e);return t.concat(n)}const n=this.trees[this._limitZoom(e)],a=n.range(T(s),j(i),T(o),j(r)),h=n.data,l=[];for(const t of a){const e=this.stride*t;l.push(h[e+b]>1?Z(h,e,this.clusterProps):this.points[h[e+A]])}return l}getChildren(t){const e=this._getOriginId(t),s=this._getOriginZoom(t),r="No cluster with the specified id.",o=this.trees[s];if(!o)throw new Error(r);const i=o.data;if(e*this.stride>=i.length)throw new Error(r);const n=this.options.radius/(this.options.extent*Math.pow(2,s-1)),a=i[e*this.stride],h=i[e*this.stride+1],l=o.within(a,h,n),c=[];for(const e of l){const s=e*this.stride;i[s+4]===t&&c.push(i[s+b]>1?Z(i,s,this.clusterProps):this.points[i[s+A]])}if(0===c.length)throw new Error(r);return c}getLeaves(t,e,s){e=e||10,s=s||0;const r=[];return this._appendLeaves(r,t,e,s,0),r}getTile(t,e,s){const r=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:i,radius:n}=this.options,a=n/i,h=(s-a)/o,l=(s+1+a)/o,c={features:[]};return this._addTileFeatures(r.range((e-a)/o,h,(e+1+a)/o,l),r.data,e,s,o,c),0===e&&this._addTileFeatures(r.range(1-a/o,h,1,l),r.data,o,s,o,c),e===o-1&&this._addTileFeatures(r.range(0,h,a/o,l),r.data,-1,s,o,c),c.features.length?c:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const s=this.getChildren(t);if(e++,1!==s.length)break;t=s[0].properties.cluster_id}return e}_appendLeaves(t,e,s,r,o){const i=this.getChildren(e);for(const e of i){const i=e.properties;if(i&&i.cluster?o+i.point_count<=r?o+=i.point_count:o=this._appendLeaves(t,i.cluster_id,s,r,o):o1;let h,l,c;if(a)h=I(e,t,this.clusterProps),l=e[t],c=e[t+1];else{const s=this.points[e[t+A]];h=s.properties;const[r,o]=s.geometry.coordinates;l=T(r),c=j(o)}const u={type:1,geometry:[[Math.round(this.options.extent*(l*o-s)),Math.round(this.options.extent*(c*o-r))]],tags:h};let p;p=a||this.options.generateId?e[t+A]:this.points[e[t+A]].id,void 0!==p&&(u.id=p),i.features.push(u)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:s,extent:r,reduce:o,minPoints:i}=this.options,n=s/(r*Math.pow(2,e)),a=t.data,h=[],l=this.stride;for(let s=0;s<=e)continue;a[s+2]=e;const r=a[s],c=a[s+1],u=t.within(a[s],a[s+1],n),p=a[s+b];let m=p;for(const t of u){const s=t*l;a[s+2]>e&&(m+=a[s+b])}if(m>p&&m>=i){let t,i=r*p,n=c*p,d=-1;const g=((s/l|0)<<5)+(e+1)+this.points.length;for(const r of u){const h=r*l;if(a[h+2]<=e)continue;a[h+2]=e;const c=a[h+b];i+=a[h]*c,n+=a[h+1]*c,a[h+4]=g,o&&(t||(t=this._map(a,s,!0),d=this.clusterProps.length,this.clusterProps.push(t)),o(t,this._map(a,h)))}a[s+4]=g,h.push(i/m,n/m,1/0,g,-1,m),o&&h.push(d)}else{for(let t=0;t1)for(const t of u){const s=t*l;if(!(a[s+2]<=e)){a[s+2]=e;for(let t=0;t>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,s){if(t[e+b]>1){const r=this.clusterProps[t[e+L]];return s?Object.assign({},r):r}const r=this.points[t[e+A]].properties,o=this.options.map(r);return s&&o===r?Object.assign({},o):o}}function Z(t,e,s){return{type:"Feature",id:t[e+A],properties:I(t,e,s),geometry:{type:"Point",coordinates:[(r=t[e],360*(r-.5)),S(t[e+1])]}};var r}function I(t,e,s){const r=t[e+b],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?Math.round(r/100)/10+"k":r,i=t[e+L],n=-1===i?{}:Object.assign({},s[i]);return Object.assign(n,{cluster:!0,cluster_id:t[e+A],point_count:r,point_count_abbreviated:o})}function T(t){return t/360+.5}function j(t){const e=Math.sin(t*Math.PI/180),s=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return s<0?0:s>1?1:s}function S(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}class z extends u{constructor(t){var{maxZoom:s,radius:r=60}=t,o=e(t,["maxZoom","radius"]);super({maxZoom:s}),this.state={zoom:-1},this.superCluster=new O(Object.assign({maxZoom:this.maxZoom,radius:r},o))}calculate(t){let e=!1;const r={zoom:t.map.getZoom()};if(!f(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const r=this.markers.map((t=>{const e=s.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(r)}return e||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(e=!f(this.state,r)),this.state=r,e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e}}cluster(t){let{map:e}=t;return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map((t=>this.transformCluster(t)))}transformCluster(t){let{geometry:{coordinates:[e,o]},properties:i}=t;if(i.cluster)return new r({markers:this.superCluster.getLeaves(i.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:o,lng:e}});const n=i.marker;return new r({markers:[n],position:s.getPosition(n)})}}class U{constructor(t,e){this.markers={sum:t.length};const s=e.map((t=>t.count)),r=s.reduce(((t,e)=>t+e),0);this.clusters={count:e.length,markers:{mean:r/e.length,sum:r,min:Math.min(...s),max:Math.max(...s)}}}}class B{render(t,e,r){let{count:o,position:i}=t;const n=`\n\n\n\n${o}\n`,a=`Cluster of ${o} markers`,h=Number(google.maps.Marker.MAX_ZINDEX)+o;if(s.isAdvancedMarkerAvailable(r)){const t=(new DOMParser).parseFromString(n,"image/svg+xml").documentElement;t.setAttribute("transform","translate(0 25)");const e={map:r,position:i,zIndex:h,title:a,content:t};return new google.maps.marker.AdvancedMarkerElement(e)}const l={position:i,zIndex:h,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(n)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}class D{constructor(){!function(t,e){for(let s in e.prototype)t.prototype[s]=e.prototype[s]}(D,google.maps.OverlayView)}}var N;t.MarkerClustererEvents=void 0,(N=t.MarkerClustererEvents||(t.MarkerClustererEvents={})).CLUSTERING_BEGIN="clusteringbegin",N.CLUSTERING_END="clusteringend",N.CLUSTER_CLICK="click";const F=(t,e,s)=>{s.fitBounds(e.bounds)};return t.AbstractAlgorithm=u,t.AbstractViewportAlgorithm=p,t.Cluster=r,t.ClusterStats=U,t.DefaultRenderer=B,t.GridAlgorithm=class extends p{constructor(t){var{maxDistance:s=4e4,gridSize:r=40}=t;super(e(t,["maxDistance","gridSize"])),this.clusters=[],this.state={zoom:-1},this.maxDistance=s,this.gridSize=r}calculate(t){let{markers:e,map:s,mapCanvasProjection:r}=t;const i={zoom:s.getZoom()};let n=!1;return this.state.zoom>=this.maxZoom&&i.zoom>=this.maxZoom||(n=!f(this.state,i)),this.state=i,s.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:n}:{clusters:this.cluster({markers:o(s,r,e,this.viewportPadding),map:s,mapCanvasProjection:r})}}cluster(t){let{markers:e,map:s,mapCanvasProjection:r}=t;return this.clusters=[],e.forEach((t=>{this.addToClosestCluster(t,s,r)})),this.clusters}addToClosestCluster(t,e,o){let n=this.maxDistance,h=null;for(let e=0;e{this.addMarker(t,!0)})),e||this.render()}removeMarker(t,e){const r=this.markers.indexOf(t);return-1!==r&&(s.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}removeMarkers(t,e){let s=!1;return t.forEach((t=>{s=this.removeMarker(t,!0)||s})),s&&!e&&this.render(),s}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_BEGIN,this);const{clusters:r,changed:o}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(o||null==o){const t=new Set;for(const e of r)1==e.markers.length&&t.add(e.markers[0]);const e=[];for(const r of this.clusters)null!=r.marker&&(1==r.markers.length?t.has(r.marker)||s.setMap(r.marker,null):e.push(r.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame((()=>e.forEach((t=>s.setMap(t,null)))))}google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((t=>s.setMap(t,null))),this.clusters.forEach((t=>t.delete())),this.clusters=[]}renderClusters(){const e=new U(this.markers,this.clusters),r=this.getMap();this.clusters.forEach((o=>{1===o.markers.length?o.marker=o.markers[0]:(o.marker=this.renderer.render(o,e,r),o.markers.forEach((t=>s.setMap(t,null))),this.onClusterClick&&o.marker.addListener("click",(e=>{google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTER_CLICK,o),this.onClusterClick(e,o,r)}))),s.setMap(o.marker,r)}))}},t.MarkerUtils=s,t.NoopAlgorithm=class extends u{constructor(t){super(e(t,[]))}calculate(t){let{markers:e,map:s,mapCanvasProjection:r}=t;return{clusters:this.cluster({markers:e,map:s,mapCanvasProjection:r}),changed:!1}}cluster(t){return this.noop(t)}},t.SuperClusterAlgorithm=z,t.SuperClusterViewportAlgorithm=class extends p{constructor(t){var{maxZoom:s,radius:r=60,viewportPadding:o=60}=t,i=e(t,["maxZoom","radius","viewportPadding"]);super({maxZoom:s,viewportPadding:o}),this.superCluster=new O(Object.assign({maxZoom:this.maxZoom,radius:r},i)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(t){const e={zoom:Math.round(t.map.getZoom()),view:n(t.map.getBounds(),t.mapCanvasProjection,this.viewportPadding)};let r=!f(this.state,e);if(!f(t.markers,this.markers)){r=!0,this.markers=[...t.markers];const e=this.markers.map((t=>{const e=s.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(e)}return r&&(this.clusters=this.cluster(t),this.state=e),{clusters:this.clusters,changed:r}}cluster(t){let{map:e,mapCanvasProjection:s}=t;const r={zoom:Math.round(e.getZoom()),view:n(e.getBounds(),s,this.viewportPadding)};return this.superCluster.getClusters(r.view,r.zoom).map((t=>this.transformCluster(t)))}transformCluster(t){let{geometry:{coordinates:[e,o]},properties:i}=t;if(i.cluster)return new r({markers:this.superCluster.getLeaves(i.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:o,lng:e}});const n=i.marker;return new r({markers:[n],position:s.getPosition(n)})}},t.defaultOnClusterClickHandler=F,t.distanceBetweenPoints=a,t.extendBoundsToPaddedViewport=i,t.extendPixelBounds=l,t.filterMarkersToPaddedViewport=o,t.getPaddedViewport=n,t.noop=m,t.pixelBoundsToLatLngBounds=c,Object.defineProperty(t,"__esModule",{value:!0}),t}({}); +//# sourceMappingURL=index.min.js.map diff --git a/options.md b/options.md index 9ad57af..32bfdd5 100644 --- a/options.md +++ b/options.md @@ -1,134 +1,138 @@ ## Standard settings -| Property | Default | Description | -|---|---|---| -| ajaxData | null | Allows custom data to be sent with the AJAX request. Set the setting to an object with your properties and values. | -| altDistanceNoResult | false | Display no results message vs. all locations when closest location is further than distanceAlert setting | -| autoComplete | false | Set to true to enable Google Places autocomplete. Note the slight markup differences in the example file. | -| autoCompleteDisableListener | false | Disable the listener that immediately triggers a search when an auto complete location option is selected. | -| autoCompleteOptions | {} | Google Places autocomplete [options object](https://developers.google.com/maps/documentation/javascript/places-autocomplete#add_autocomplete). | -| autoGeocode | false | Set to true if you want to use the HTML5 geolocation API (good for mobile) to geocode the user's location. **SSL is required**. | -| bounceMarker | true | Bounces the maker when a list element is clicked. | -| catMarkers | null | Multiple replacement marker images based on categories object. Value should be array with image path followed by dimensions - ex value: catMarkers : {'Restaurant' : ['img/red-marker.svg', 32, 32]} -| dataLocation | 'data/locations.json' | The path to the location data. | -| dataRaw | null | Accepts raw KML, XML, or JSON instead of using a remote file. | -| dataType | 'json' | The format of the data source. Accepted values include kml, xml, json, and jsonp. | -| debug | false | Set to true to enable console.log helper function that can be used for debugging. | -| defaultLat | null | If using defaultLoc, set this to the default location latitude. | -| defaultLng | null | If using defaultLoc, set this to the default location longitude. | -| defaultLoc | false | If true, the map will load with a default location immediately. Set slideMap to false if you want to use this. | -| disableAlphaMarkers | false | Disable displaying markers and location list indicators with alpha characters. | -| distanceAlert | 60 | Displays alert if there are no locations with 60 m/km of the user's location. Set to -1 to disable. | -| dragSearch | false | Set to true to perform a new search after the map is dragged. | -| exclusiveFiltering | false | Set to true to enable exclusive taxonomy filtering rather than the default inclusive. | -| exclusiveTax | null | Set to an array of taxonomies that should filter exclusively vs. inclusively. | -| featuredLocations | false | Set to true to enable featuring locations at the top of the location list (no matter the distance). Add featured=”true” to featured locations in your XML or JSON locations data. | -| fullMapStart | false | Set to true if you want to immediately show a map of all locations. The map will center and zoom automatically. | -| fullMapStartBlank | false | Set to a zoom integer if you want to immediately show a blank map without any locations. | -| fullMapStartListLimit | false | Set to a number to limit the number of items displayed in the location list with full map start. | -| infoBubble | null | InfoBubble settings object. [See example for available parameters](https://googlemaps.github.io/js-info-bubble/examples/example.html). Map and content parameters are set by default. | -| inlineDirections | false | Set to true to enable displaying directions within the app instead of an off-site link. | -| lengthUnit | 'm' | The unit of length. Default is m for miles, change to km for kilometers. | -| listColor1 | '#ffffff' | Background color of the odd list elements. | -| listColor2 | '#eeeeee' | Background color of the even list elements. | -| loading | false | Set to true to display a loading animated gif next to the submit button. | -| locationsPerPage | 10 | If using pagination, the number of locations to display per page. | -| mapSettings | { zoom : 12, mapTypeId: google.maps.MapTypeId.ROADMAP } | Google maps settings object. Add all settings including zoom and map type if overriding. Set zoom to 0 to automatically center and zoom to show all display markers on the map | -| markerCluster | null | Marker Clusterer settings object. [See docs](https://googlemaps.github.io/js-marker-clusterer/docs/reference.html). | -| markerImg | null | Replacement marker image used for all locations | -| markerDim | null | Replacement marker dimensions object - ex value: { height: 20, width: 20 } | -| maxDistance | false | Set to true if you want to give users an option to limit the distance from their location to the markers. | -| modal | false | Shows the map container within a modal window. Set slideMap to false and this option to true to use. | -| nameAttribute | 'name' | If using nameSearch, the data attribute used for the location name in the data file. | -| nameSearch | false | Set to true to allow searching for locations by name using separate searchID field. | -| noForm | false | Set to true if you aren't able to use form tags (ASP.net WebForms). | -| openNearest | false | Set to true to highlight the nearest location automatically after searching. | -| originMarker | false | Display a marker at the origin. | -| originMarkerDim | null | Replacement origin marker dimensions object - ex value: { height: 20, width: 20 } | -| originMarkerImg | null | Replacement origin marker image. | -| pagination | false | Set to true to enable displaying location results in multiple "pages." | -| querystringParams | false | Set to true to enable query string support for passing input variables from page to page. | -| selectedMarkerImg | null | Selected marker image. | -| selectedMarkerImgDim | null | Selected marker image dimensions object - ex value: { height: 20, width: 20 } | -| sessionStorage | false | Set to true to enable Window.sessionStorage for user's location when autoGeocode is enabled. | -| slideMap | true | First hides the map container and then uses jQuery’s slideDown method to reveal the map. | -| sortBy | null | Set to an object for custom sorting that accepts three properties: method ('alpha', 'date', or 'numeric'), order ('asc', or 'desc'), and prop (property in your data to sort by such as name, city, distance, etc.). | -| storeLimit | 26 | The number of closest locations displayed at one time. Set to -1 for unlimited. | -| taxonomyFilters | null | Filtering object that can be used to set up live filtering (see categories example). | -| visibleMarkersList | false | Set to true to have the location list only show data from markers that are visible on the map. | -| xmlElement | 'marker' | XML element used for locations (tag). | +| Property | Default | Description | +|------------------------------|---------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| ajaxData | null | Allows custom data to be sent with the AJAX request. Set the setting to an object with your properties and values. | +| altDistanceNoResult | false | Display no results message vs. all locations when closest location is further than distanceAlert setting. | +| apiKey | null | Set to your Google Maps API key when using Lazy Load setting. Value is unused if lazyLoadMap is false. | +| autoComplete | false | Set to true to enable Google Places autocomplete. Note the slight markup differences in the example file. | +| autoCompleteDisableListener | false | Disable the listener that immediately triggers a search when an auto complete location option is selected. | +| autoCompleteOptions | {} | Google Places autocomplete [options object](https://developers.google.com/maps/documentation/javascript/places-autocomplete#add_autocomplete). | +| autoGeocode | false | Set to true if you want to use the HTML5 geolocation API (good for mobile) to geocode the user's location. **SSL is required**. | +| bounceMarker | true | Deprecated - no longer applies. | +| catMarkers | null | Multiple replacement marker images based on categories object. Value should be array with image path followed by dimensions - ex value: catMarkers : {'Restaurant' : ['img/red-marker.svg', 32, 32]} | +| dataLocation | 'data/locations.json' | The path to the location data. | +| dataRaw | null | Accepts raw KML, XML, or JSON instead of using a remote file. | +| dataType | 'json' | The format of the data source. Accepted values include kml, xml, json, and jsonp. | +| debug | false | Set to true to enable console.log helper function that can be used for debugging. | +| defaultLat | null | If using defaultLoc, set this to the default location latitude. | +| defaultLng | null | If using defaultLoc, set this to the default location longitude. | +| defaultLoc | false | If true, the map will load with a default location immediately. Set slideMap to false if you want to use this. | +| disableAlphaMarkers | false | Disable displaying markers and location list indicators with alpha characters. | +| distanceAlert | 60 | Displays alert if there are no locations with 60 m/km of the user's location. Set to -1 to disable. | +| dragSearch | false | Set to true to perform a new search after the map is dragged. | +| exclusiveFiltering | false | Set to true to enable exclusive taxonomy filtering rather than the default inclusive. | +| exclusiveTax | null | Set to an array of taxonomies that should filter exclusively vs. inclusively. | +| featuredDistance | null | Restrict the featured locations from displaying by a certain distance (use number value). | +| featuredLocations | false | Set to true to enable featuring locations at the top of the location list (no matter the distance). Add featured=”true” to featured locations in your XML or JSON locations data. | +| fullMapStart | false | Set to true if you want to immediately show a map of all locations. The map will center and zoom automatically. | +| fullMapStartBlank | false | Set to a zoom integer if you want to immediately show a blank map without any locations. | +| fullMapStartListLimit | false | Set to a number to limit the number of items displayed in the location list with full map start. | +| infoBubble | null | InfoBubble settings object. [See example for available parameters](https://googlemaps.github.io/js-info-bubble/examples/example.html). Map and content parameters are set by default. | +| inlineDirections | false | Set to true to enable displaying directions within the app instead of an off-site link. | +| lazyLoadMap | false | Set to true to lazy load the Google Maps API script. Make sure to also set the apiKey setting and do not include the maps.google.com script manually. | +| lengthUnit | 'm' | The unit of length. Default is m for miles, change to km for kilometers. | +| listColor1 | '#ffffff' | Background color of the odd list elements. | +| listColor2 | '#eeeeee' | Background color of the even list elements. | +| loading | false | Set to true to display a loading animated gif next to the submit button. | +| locationsPerPage | 10 | If using pagination, the number of locations to display per page. | +| mapSettings | { zoom : 12, mapTypeId: google.maps.MapTypeId.ROADMAP } | Google maps settings object. Add all settings including zoom and map type if overriding. Set zoom to 0 to automatically center and zoom to show all display markers on the map | +| mapSettingsID | '' | New Google Map ID used for map management and styling. Please refer to [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id) and [Map ID with Styling](https://developers.google.com/maps/documentation/javascript/examples/map-id-style) in the Google API docs. | +| markerCluster | null | Additional Clusterer settings object. Markers and map are set by default - use this to set other parameters such as algorithm, renderer, etc. [See docs](https://github.com/googlemaps/js-markerclusterer?tab=readme-ov-file#migration). | +| markerImg | null | Replacement marker image used for all locations | +| markerDim | null | Replacement marker dimensions object - ex value: { height: 20, width: 20 } | +| maxDistance | false | Set to true if you want to give users an option to limit the distance from their location to the markers. | +| modal | false | Shows the map container within a modal window. Set slideMap to false and this option to true to use. | +| nameAttribute | 'name' | If using nameSearch, the data attribute used for the location name in the data file. Supports one or multiple values separated by commas. | +| nameSearch | false | Set to true to allow searching for locations by name using separate searchID field. | +| noForm | false | Set to true if you aren't able to use form tags (ASP.net WebForms). | +| openNearest | false | Set to true to highlight the nearest location automatically after searching. | +| originMarker | false | Display a marker at the origin. | +| originMarkerDim | null | Replacement origin marker dimensions object - ex value: { height: 20, width: 20 } | +| originMarkerImg | null | Replacement origin marker image. | +| pagination | false | Set to true to enable displaying location results in multiple "pages." | +| querystringParams | false | Set to true to enable query string support for passing input variables from page to page. | +| selectedMarkerImg | null | Selected marker image. | +| selectedMarkerImgDim | null | Selected marker image dimensions object - ex value: { height: 20, width: 20 } | +| sessionStorage | false | Set to true to enable Window.sessionStorage for user's location when autoGeocode is enabled. | +| slideMap | true | First hides the map container and then uses jQuery’s slideDown method to reveal the map. | +| sortBy | null | Set to an object for custom sorting that accepts three properties: method ('alpha', 'date', or 'numeric'), order ('asc', or 'desc'), and prop (property in your data to sort by such as name, city, distance, etc.). | +| storeLimit | 26 | The number of closest locations displayed at one time. Set to -1 for unlimited. | +| taxonomyFilters | null | Filtering object that can be used to set up live filtering (see categories example). | +| visibleMarkersList | false | Set to true to have the location list only show data from markers that are visible on the map. | +| xmlElement | 'marker' | XML element used for locations (tag). | ## HTML elements -| Property | Default | Description | -|---|---|---| -| addressID | 'bh-sl-address' | ID of the address input form field. | -| closeIcon| 'bh-sl-close-icon' | Class of element that displays the close icon to close the modal window. | -| formContainer | 'bh-sl-form-container' | Class of the container around the form. | -| formID | 'bh-sl-user-location' | ID of the input form. | -| geocodeID | null | Set to the ID of an element to connect the HTML5 geolocation API to a button instead of firing automatically. | -| lengthSwapID | 'bh-sl-length-swap' | Set to the ID of a select element within the form container to allow users to swap between the distance length unit (miles/kilometers). | -| loadingContainer | 'bh-sl-loading' | Class of element container that displays the loading animated gif. | -| locationList | 'bh-sl-loc-list' | Class of the container around the location list. | -| mapID | 'bh-sl-map' | ID of the div where the actual Google Map is displayed. | -| maxDistanceID | 'bh-sl-maxdistance' | ID of the select element for the maximum distance options. | -| modalContent | 'bh-sl-modal-content' | Class of element container around the content of the modal window. | -| modalWindow | 'bh-sl-modal-window' | Class of element of the actual modal window | -| orderID | 'bh-sl-order' | ID of the select form field for custom sort order handling of location results. | -| overlay | 'bh-sl-overlay' | Class of element that fills 100% of the window and fills with a transparent background image. | -| regionID | 'bh-sl-region' | ID of the region select form field for country region biasing. | -| searchID | 'bh-sl-search' | ID of the search input form field for location name searching. | -| sortID | 'bh-sl-sort' | ID of the select form field for custom sorting of location results. | -| taxonomyFiltersContainer | 'bh-sl-filters-container' | Class of the container around the filters. | +| Property | Default | Description | +|--------------------------|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| addressID | 'bh-sl-address' | ID of the address input form field. | +| closeIcon | 'bh-sl-close-icon' | Class of element that displays the close icon to close the modal window. | +| formContainer | 'bh-sl-form-container' | Class of the container around the form. | +| formID | 'bh-sl-user-location' | ID of the input form. | +| geocodeID | null | Set to the ID of an element to connect the HTML5 geolocation API to a button instead of firing automatically. | +| lengthSwapID | 'bh-sl-length-swap' | Set to the ID of a select element within the form container to allow users to swap between the distance length unit (miles/kilometers). | +| loadingContainer | 'bh-sl-loading' | Class of element container that displays the loading animated gif. | +| locationList | 'bh-sl-loc-list' | Class of the container around the location list. | +| mapID | 'bh-sl-map' | ID of the div where the actual Google Map is displayed. | +| maxDistanceID | 'bh-sl-maxdistance' | ID of the select element for the maximum distance options. | +| modalContent | 'bh-sl-modal-content' | Class of element container around the content of the modal window. | +| modalWindow | 'bh-sl-modal-window' | Class of element of the actual modal window | +| orderID | 'bh-sl-order' | ID of the select form field for custom sort order handling of location results. | +| overlay | 'bh-sl-overlay' | Class of element that fills 100% of the window and fills with a transparent background image. | +| regionID | 'bh-sl-region' | ID of the region select form field for country region biasing. | +| searchID | 'bh-sl-search' | ID of the search input form field for location name searching. | +| sortID | 'bh-sl-sort' | ID of the select form field for custom sorting of location results. | +| taxonomyFiltersContainer | 'bh-sl-filters-container' | Class of the container around the filters. | ## Templates -| Property | Default | Description | -|---|---|---| -| infowindowTemplatePath | 'assets/js/plugins/storeLocator/templates/infowindow-description.html' | Path to the default infowindow template. | -| listTemplatePath | 'assets/js/plugins/storeLocator/templates/location-list-description.html' | Path to the default list template. | -| KMLinfowindowTemplatePath | 'assets/js/plugins/storeLocator/templates/kml-infowindow-description.html' | Path to the KML infowindow template – used if dataType is set to kml. | -| KMLlistTemplatePath | 'assets/js/plugins/storeLocator/templates/kml-location-list-description.html' | Path to the KML list template – used if dataType is set to kml. | -| listTemplateID | null | ID of list template if using inline Handlebar templates instead of separate files. | -| infowindowTemplateID | null | ID of infowindow template if using inline Handlebar templates instead of separate files. | +| Property | Default | Description | +|---------------------------|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------| +| infowindowTemplatePath | 'assets/js/plugins/storeLocator/templates/infowindow-description.html' | Path to the default infowindow template. | +| listTemplatePath | 'assets/js/plugins/storeLocator/templates/location-list-description.html' | Path to the default list template. | +| KMLinfowindowTemplatePath | 'assets/js/plugins/storeLocator/templates/kml-infowindow-description.html' | Path to the KML infowindow template – used if dataType is set to kml. | +| KMLlistTemplatePath | 'assets/js/plugins/storeLocator/templates/kml-location-list-description.html' | Path to the KML list template – used if dataType is set to kml. | +| listTemplateID | null | ID of list template if using inline Handlebar templates instead of separate files. | +| infowindowTemplateID | null | ID of infowindow template if using inline Handlebar templates instead of separate files. | ## Callbacks -| Property | Default | Description | -|---|---|---| -| [callbackAutoGeoSuccess](callbacks/callback-autogeosuccess.md) | null | Geolocation API success callback | -| [callbackBeforeSend](callbacks/callback-beforesend.md) | null | Before location data request callback | -| [callbackCloseDirections](callbacks/callback-closedirections.md) | null | Close directions callback | -| [callbackCreateMarker](callbacks/callback-createmarker.md) | null | Create marker override callback | -| [callbackDirectionsRequest](callbacks/callback-directionsrequest.md) | null | Directions request callback | -| [callbackFilters](callbacks/callback-filters.md) | null | Filters callback | -| [callbackFormVals](callbacks/callback-formvals.md) | null | Form values callback | -| [callbackGeocodeRestrictions](callbacks/callback-geocode-restrictions.md) | null | Geocoding component restrictions callback | -| [callbackJsonp](callbacks/callback-jsonp.md) | null | JSONP callback | -| [callbackListClick](callbacks/callback-listclick.md) | null | Location list click callback | -| [callbackMapSet](callbacks/callback-mapset.md) | null | Map set callback | -| [callbackMarkerClick](callbacks/callback-markerclick.md) | null | Marker click callback | -| [callbackModalClose](callbacks/callback-modalclose.md) | null | Modal close callback | -| [callbackModalOpen](callbacks/callback-modalopen.md) | null | Modal open callback | -| [callbackModalReady](callbacks/callback-modalready.md) | null | Modal ready callback | -| [callbackNearestLoc](callbacks/callback-nearestloc.md) | null | Nearest location callback | -| [callbackNoResults](callbacks/callback-noresults.md) | null | No results callback | -| [callbackNotify](callbacks/callback-notification.md) | null | Notification callback | -| [callbackOrder](callbacks/callback-order.md) | null | Order callback | -| [callbackPageChange](callbacks/callback-pagechange.md) | null | Page change callback | -| [callbackRegion](callbacks/callback-region.md) | null | Region callback | -| [callbackSorting](callbacks/callback-sorting.md) | null | Sorting callback | -| [callbackSuccess](callbacks/callback-success.md) | null | Success callback | +| Property | Default | Description | +|---------------------------------------------------------------------------|---------|-------------------------------------------| +| [callbackAutoGeoSuccess](callbacks/callback-autogeosuccess.md) | null | Geolocation API success callback | +| [callbackBeforeSend](callbacks/callback-beforesend.md) | null | Before location data request callback | +| [callbackCloseDirections](callbacks/callback-closedirections.md) | null | Close directions callback | +| [callbackCreateMarker](callbacks/callback-createmarker.md) | null | Create marker override callback | +| [callbackDirectionsRequest](callbacks/callback-directionsrequest.md) | null | Directions request callback | +| [callbackFilters](callbacks/callback-filters.md) | null | Filters callback | +| [callbackFormVals](callbacks/callback-formvals.md) | null | Form values callback | +| [callbackGeocodeRestrictions](callbacks/callback-geocode-restrictions.md) | null | Geocoding component restrictions callback | +| [callbackJsonp](callbacks/callback-jsonp.md) | null | JSONP callback | +| [callbackListClick](callbacks/callback-listclick.md) | null | Location list click callback | +| [callbackMapSet](callbacks/callback-mapset.md) | null | Map set callback | +| [callbackMarkerClick](callbacks/callback-markerclick.md) | null | Marker click callback | +| [callbackModalClose](callbacks/callback-modalclose.md) | null | Modal close callback | +| [callbackModalOpen](callbacks/callback-modalopen.md) | null | Modal open callback | +| [callbackModalReady](callbacks/callback-modalready.md) | null | Modal ready callback | +| [callbackNearestLoc](callbacks/callback-nearestloc.md) | null | Nearest location callback | +| [callbackNoResults](callbacks/callback-noresults.md) | null | No results callback | +| [callbackNotify](callbacks/callback-notification.md) | null | Notification callback | +| [callbackOrder](callbacks/callback-order.md) | null | Order callback | +| [callbackPageChange](callbacks/callback-pagechange.md) | null | Page change callback | +| [callbackRegion](callbacks/callback-region.md) | null | Region callback | +| [callbackSorting](callbacks/callback-sorting.md) | null | Sorting callback | +| [callbackSuccess](callbacks/callback-success.md) | null | Success callback | ## Language options -| Property | Default | Description | -|---|---|---| -| addressErrorAlert | 'Unable to find address' | Language setting | -| autoGeocodeErrorAlert | 'Automatic location detection failed. Please fill in your address or zip code.' | Language setting | -| distanceErrorAlert | 'Unfortunately, our closest location is more than ' | Language setting | -| kilometerLang | 'kilometer' | Language setting | -| kilometersLang | 'kilometers' | Language setting | -| mileLang | 'mile' | Language setting | -| milesLang | 'miles' | Language setting | -| noResultsTitle | 'No results' | Language setting | -| noResultsDesc | 'No locations were found with the given criteria. Please modify your selections or input.' | Language setting | -| nextPage | 'Next »' | Language setting | -| prevPage | '« Prev' | Language setting | +| Property | Default | Description | +|-----------------------|--------------------------------------------------------------------------------------------|------------------| +| addressErrorAlert | 'Unable to find address' | Language setting | +| autoGeocodeErrorAlert | 'Automatic location detection failed. Please fill in your address or zip code.' | Language setting | +| distanceErrorAlert | 'Unfortunately, our closest location is more than ' | Language setting | +| kilometerLang | 'kilometer' | Language setting | +| kilometersLang | 'kilometers' | Language setting | +| mileLang | 'mile' | Language setting | +| milesLang | 'miles' | Language setting | +| noResultsTitle | 'No results' | Language setting | +| noResultsDesc | 'No locations were found with the given criteria. Please modify your selections or input.' | Language setting | +| nextPage | 'Next »' | Language setting | +| prevPage | '« Prev' | Language setting | diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..eb1502a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2872 @@ +{ + "name": "jquery-storelocator-plugin", + "version": "3.4.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "jquery-storelocator-plugin", + "version": "3.4.1", + "license": "MIT", + "dependencies": { + "handlebars": ">=4.7.7", + "jquery": "^3.6.3" + }, + "devDependencies": { + "grunt": "~1.6.1", + "grunt-banner": "~0.6.0", + "grunt-contrib-clean": "^2.0.1", + "grunt-contrib-concat": "~2.1.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-cssmin": "~4.0.0", + "grunt-contrib-handlebars": "^3.0.0", + "grunt-contrib-jshint": "~3.2.0", + "grunt-contrib-qunit": "~7.0.0", + "grunt-contrib-sass": "^2.0.0", + "grunt-contrib-uglify": "~5.2.2", + "grunt-contrib-watch": "~1.1.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@types/node": { + "version": "18.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.0.tgz", + "integrity": "sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A==", + "dev": true, + "optional": true + }, + "node_modules/@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "dev": true, + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/argparse/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bl/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/body": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", + "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=", + "dev": true, + "dependencies": { + "continuable-cache": "^0.3.1", + "error": "^7.0.0", + "raw-body": "~1.1.0", + "safe-json-parse": "~1.0.1" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=", + "dev": true + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "node_modules/clean-css": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz", + "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==", + "dev": true, + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 10.0" + } + }, + "node_modules/cli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", + "integrity": "sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg==", + "dev": true, + "dependencies": { + "exit": "0.1.2", + "glob": "^7.1.1" + }, + "engines": { + "node": ">=0.2.5" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==", + "dev": true, + "dependencies": { + "date-now": "^0.1.4" + } + }, + "node_modules/continuable-cache": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", + "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cosmiconfig": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.0.0.tgz", + "integrity": "sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==", + "dev": true, + "dependencies": { + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/cosmiconfig/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/cosmiconfig/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dev": true, + "dependencies": { + "node-fetch": "2.6.7" + } + }, + "node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/dargs": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-6.1.0.tgz", + "integrity": "sha512-5dVBvpBLBnPwSsYXqfybFyehMmC/EenKEcf23AhCTgTf48JFBbmJKqoZBsERDnjL0FyiVTYWdFsRfTLHxLyKdQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==", + "dev": true + }, + "node_modules/dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.1094867", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1094867.tgz", + "integrity": "sha512-pmMDBKiRVjh0uKK6CT1WqZmM3hBVSgD+N2MrgyV1uNizAZMw4tx6i/RTc+/uCsKSCmg0xXx7arCP/OFcIwTsiQ==", + "dev": true + }, + "node_modules/dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/dom-serializer/node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "node_modules/domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", + "dev": true, + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", + "dev": true, + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==", + "dev": true + }, + "node_modules/error": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", + "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", + "dev": true, + "dependencies": { + "string-template": "~0.2.1" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", + "dev": true + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "dev": true, + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/file-sync-cmp": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz", + "integrity": "sha512-0k45oWBokCqh2MOexeYKpyqmGKG+8mQ2Wd8iawx+uWd/weWJQAZ6SoPybagdCI4xFisag8iAR77WPm4h3pTfxA==", + "dev": true + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/findup-sync": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-5.0.0.tgz", + "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==", + "dev": true, + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.3", + "micromatch": "^4.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, + "dependencies": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "dev": true, + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/gaze": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", + "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "dev": true, + "dependencies": { + "globule": "^1.0.0" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/getobject": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", + "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "dev": true, + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/globule": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", + "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", + "dev": true, + "dependencies": { + "glob": "~7.1.1", + "lodash": "~4.17.10", + "minimatch": "~3.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/grunt": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.6.1.tgz", + "integrity": "sha512-/ABUy3gYWu5iBmrUSRBP97JLpQUm0GgVveDCp6t3yRNIoltIYw7rEj3g5y1o2PGPR2vfTRGa7WC/LZHLTXnEzA==", + "dev": true, + "dependencies": { + "dateformat": "~4.6.2", + "eventemitter2": "~0.4.13", + "exit": "~0.1.2", + "findup-sync": "~5.0.0", + "glob": "~7.1.6", + "grunt-cli": "~1.4.3", + "grunt-known-options": "~2.0.0", + "grunt-legacy-log": "~3.0.0", + "grunt-legacy-util": "~2.0.1", + "iconv-lite": "~0.6.3", + "js-yaml": "~3.14.0", + "minimatch": "~3.0.4", + "nopt": "~3.0.6" + }, + "bin": { + "grunt": "bin/grunt" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/grunt-banner": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/grunt-banner/-/grunt-banner-0.6.0.tgz", + "integrity": "sha512-50H/Wxydlf+ifve5Jzcz9oB4jr6oCGEPyfhEDUsl2NEMX80cWUJqVMXSHBr2n9Rb3nd+rRSKeQzqNxWrqoyQ1A==", + "dev": true, + "dependencies": { + "chalk": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "grunt": ">=0.4.0" + } + }, + "node_modules/grunt-banner/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-banner/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-banner/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/grunt-contrib-clean": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.1.tgz", + "integrity": "sha512-uRvnXfhiZt8akb/ZRDHJpQQtkkVkqc/opWO4Po/9ehC2hPxgptB9S6JHDC/Nxswo4CJSM0iFPT/Iym3cEMWzKA==", + "dev": true, + "dependencies": { + "async": "^3.2.3", + "rimraf": "^2.6.2" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "grunt": ">=0.4.5" + } + }, + "node_modules/grunt-contrib-concat": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", + "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "source-map": "^0.5.3" + }, + "engines": { + "node": ">=0.12.0" + }, + "peerDependencies": { + "grunt": ">=1.4.1" + } + }, + "node_modules/grunt-contrib-concat/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-contrib-copy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz", + "integrity": "sha512-gFRFUB0ZbLcjKb67Magz1yOHGBkyU6uL29hiEW1tdQ9gQt72NuMKIy/kS6dsCbV0cZ0maNCb0s6y+uT1FKU7jA==", + "dev": true, + "dependencies": { + "chalk": "^1.1.1", + "file-sync-cmp": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-contrib-copy/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-contrib-copy/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-contrib-copy/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/grunt-contrib-cssmin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-4.0.0.tgz", + "integrity": "sha512-jXU+Zlk8Q8XztOGNGpjYlD/BDQ0n95IHKrQKtFR7Gd8hZrzgqiG1Ra7cGYc8h2DD9vkSFGNlweb9Q00rBxOK2w==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "clean-css": "^5.0.1", + "maxmin": "^3.0.0" + }, + "engines": { + "node": ">=10.0" + } + }, + "node_modules/grunt-contrib-handlebars": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-handlebars/-/grunt-contrib-handlebars-3.0.0.tgz", + "integrity": "sha512-Zh5fSnyhfOGIDieFNy1eVEqmdB0y2cGkFaceKkfJM4v5OEZP880+SGjbmmuriaVZsG7bOnj0Fg7wP4722GUBSw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.1", + "handlebars": "^4.7.7", + "nsdeclare": "0.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/grunt-contrib-jshint": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-3.2.0.tgz", + "integrity": "sha512-pcXWCSZWfoMSvcV4BwH21TUtLtcX0Ms8IGuOPIcLeXK3fud9KclY7iqMKY94jFx8TxZzh028YYtpR+io8DiEaQ==", + "dev": true, + "dependencies": { + "chalk": "~4.1.2", + "hooker": "^0.2.3", + "jshint": "~2.13.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/grunt-contrib-qunit": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-qunit/-/grunt-contrib-qunit-7.0.0.tgz", + "integrity": "sha512-phSuAixAzyvizgUV9Nw7ip0/G5lVeWA/4DUifcdKPOgjTAY7QIWsTugxiXMGeVwMKnDOS3vTMpL/VyEw8z7yYw==", + "dev": true, + "dependencies": { + "eventemitter2": "^6.4.9", + "p-each-series": "^2.2.0", + "puppeteer": "^19.7.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/grunt-contrib-qunit/node_modules/eventemitter2": { + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", + "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "dev": true + }, + "node_modules/grunt-contrib-sass": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-sass/-/grunt-contrib-sass-2.0.0.tgz", + "integrity": "sha512-RxZ3dlZZTX4YBPu2zMu84NPYgJ2AYAlIdEqlBaixNVyLNbgvJBGUr5Gi0ec6IiOQbt/I/z7uZVN9HsRxgznIRw==", + "dev": true, + "dependencies": { + "async": "^2.6.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "dargs": "^6.0.0", + "which": "^1.3.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/grunt-contrib-sass/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/grunt-contrib-sass/node_modules/async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/grunt-contrib-sass/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/grunt-contrib-sass/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/grunt-contrib-sass/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/grunt-contrib-sass/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/grunt-contrib-sass/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/grunt-contrib-uglify": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-5.2.2.tgz", + "integrity": "sha512-ITxiWxrjjP+RZu/aJ5GLvdele+sxlznh+6fK9Qckio5ma8f7Iv8woZjRkGfafvpuygxNefOJNc+hfjjBayRn2Q==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "maxmin": "^3.0.0", + "uglify-js": "^3.16.1", + "uri-path": "^1.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/grunt-contrib-uglify/node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "dev": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/grunt-contrib-watch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz", + "integrity": "sha512-yGweN+0DW5yM+oo58fRu/XIRrPcn3r4tQx+nL7eMRwjpvk+rQY6R8o94BPK0i2UhTg9FN21hS+m8vR8v9vXfeg==", + "dev": true, + "dependencies": { + "async": "^2.6.0", + "gaze": "^1.1.0", + "lodash": "^4.17.10", + "tiny-lr": "^1.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-contrib-watch/node_modules/async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/grunt-known-options": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", + "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-legacy-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", + "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", + "dev": true, + "dependencies": { + "colors": "~1.1.2", + "grunt-legacy-log-utils": "~2.1.0", + "hooker": "~0.2.3", + "lodash": "~4.17.19" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/grunt-legacy-log-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", + "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", + "dev": true, + "dependencies": { + "chalk": "~4.1.0", + "lodash": "~4.17.19" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/grunt-legacy-util": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", + "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", + "dev": true, + "dependencies": { + "async": "~3.2.0", + "exit": "~0.1.2", + "getobject": "~1.0.0", + "hooker": "~0.2.3", + "lodash": "~4.17.21", + "underscore.string": "~3.3.5", + "which": "~2.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/grunt-legacy-util/node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/grunt-legacy-util/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/grunt/node_modules/grunt-cli": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", + "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", + "dev": true, + "dependencies": { + "grunt-known-options": "~2.0.0", + "interpret": "~1.1.0", + "liftup": "~3.0.1", + "nopt": "~4.0.1", + "v8flags": "~3.2.0" + }, + "bin": { + "grunt": "bin/grunt" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/grunt/node_modules/grunt-cli/node_modules/nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "dependencies": { + "abbrev": "1", + "osenv": "^0.1.4" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/gzip-size": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", + "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", + "dev": true, + "dependencies": { + "duplexer": "^0.1.1", + "pify": "^4.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", + "dev": true, + "dependencies": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz", + "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==", + "dev": true + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", + "dev": true + }, + "node_modules/is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jquery": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.3.tgz", + "integrity": "sha512-bZ5Sy3YzKo9Fyc8wH2iIQK4JImJ6R0GWI9kL1/k7Z91ZBNgkRXE6U0JfHIizZbort8ZunhSI3jw9I6253ahKfg==" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jshint": { + "version": "2.13.6", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.6.tgz", + "integrity": "sha512-IVdB4G0NTTeQZrBoM8C5JFVLjV2KtZ9APgybDA1MK73xb09qFs0jCXyQLnCOp1cSZZZbvhq/6mfXHUTaDkffuQ==", + "dev": true, + "dependencies": { + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "~4.17.21", + "minimatch": "~3.0.2", + "strip-json-comments": "1.0.x" + }, + "bin": { + "jshint": "bin/jshint" + } + }, + "node_modules/jshint/node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/liftup": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", + "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", + "dev": true, + "dependencies": { + "extend": "^3.0.2", + "findup-sync": "^4.0.0", + "fined": "^1.2.0", + "flagged-respawn": "^1.0.1", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.1", + "rechoir": "^0.7.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/liftup/node_modules/findup-sync": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", + "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", + "dev": true, + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^4.0.2", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/livereload-js": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", + "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", + "dev": true + }, + "node_modules/lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "node_modules/make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/maxmin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-3.0.0.tgz", + "integrity": "sha512-wcahMInmGtg/7c6a75fr21Ch/Ks1Tb+Jtoan5Ft4bAI0ZvJqyOw8kkM7e7p8hDSzY805vmxwHT50KcjGwKyJ0g==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "figures": "^3.2.0", + "gzip-size": "^5.1.1", + "pretty-bytes": "^5.3.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/nsdeclare": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/nsdeclare/-/nsdeclare-0.1.0.tgz", + "integrity": "sha512-Wb+BpXFfacpp1cgrQoO5Q2wKHACuMlUE6uayGFFLF3yVuXejBp5Rflk991hWvTQbUuQslXTIvBNOHqYTvzBSjA==", + "dev": true + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "dev": true, + "dependencies": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "dev": true, + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "node_modules/p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", + "dev": true, + "dependencies": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "dev": true, + "dependencies": { + "path-root-regex": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/puppeteer": { + "version": "19.7.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-19.7.1.tgz", + "integrity": "sha512-Hampj7jHlicySL1sSLHCwoFoRCi6RcEbnZmRE5brtbk0mp6Td33+9kWQD2eFs09772JIt00ybPKr50Gt7Y18Xg==", + "deprecated": "< 22.8.2 is no longer supported", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "cosmiconfig": "8.0.0", + "https-proxy-agent": "5.0.1", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "puppeteer-core": "19.7.1" + }, + "engines": { + "node": ">=14.1.0" + } + }, + "node_modules/puppeteer-core": { + "version": "19.7.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-19.7.1.tgz", + "integrity": "sha512-4b5Go25IA+0xrUIw0Qtqi4nxc0qwdu/C7VT1+tFPl1W27207YT+7bxfANC3PjXMlS6bcbzinCf5YfGqMl8tfyQ==", + "dev": true, + "dependencies": { + "cross-fetch": "3.1.5", + "debug": "4.3.4", + "devtools-protocol": "0.0.1094867", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.1", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.11.0" + }, + "engines": { + "node": ">=14.1.0" + }, + "peerDependencies": { + "chromium-bidi": "0.4.3", + "typescript": ">= 4.7.4" + }, + "peerDependenciesMeta": { + "chromium-bidi": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/puppeteer-core/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/qs": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", + "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==", + "dev": true, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/raw-body": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", + "integrity": "sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU=", + "dev": true, + "dependencies": { + "bytes": "1", + "string_decoder": "0.10" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/rechoir": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "dev": true, + "dependencies": { + "resolve": "^1.9.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "dev": true, + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safe-json-parse": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz", + "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=", + "dev": true + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true + }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "node_modules/string-template": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", + "dev": true + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", + "dev": true, + "bin": { + "strip-json-comments": "cli.js" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/tar-stream/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/tiny-lr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", + "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==", + "dev": true, + "dependencies": { + "body": "^5.1.0", + "debug": "^3.1.0", + "faye-websocket": "~0.10.0", + "livereload-js": "^2.3.0", + "object-assign": "^4.1.0", + "qs": "^6.4.0" + } + }, + "node_modules/tiny-lr/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/tiny-lr/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/uglify-js": { + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.4.tgz", + "integrity": "sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A==", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/underscore.string": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", + "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", + "dev": true, + "dependencies": { + "sprintf-js": "^1.1.1", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/uri-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", + "integrity": "sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/v8flags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "dev": true, + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/ws": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/package.json b/package.json index 8b80687..93fcd3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jquery-storelocator-plugin", - "version": "3.0.1", + "version": "3.4.1", "description": "This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information.", "repository": { "type": "git", @@ -22,27 +22,31 @@ ], "author": { "name": "Bjorn Holine", - "url": "http://www.bjornblog.com/" + "url": "https://www.bjornblog.com/" }, "license": "MIT", "bugs": { "url": "https://github.com/bjorn2404/jQuery-Store-Locator-Plugin/issues" }, + "engines": { + "node": ">=12.0.0" + }, "dependencies": { - "jquery": ">=1.7", - "handlebars": ">=1.0" + "handlebars": ">=4.7.7", + "jquery": "^3.6.3" }, "devDependencies": { - "grunt": "~0.4.4", - "grunt-banner": "~0.2.2", - "grunt-contrib-clean": "~0.4.0", - "grunt-contrib-concat": "~0.3.0", - "grunt-contrib-cssmin": "~0.9.0", - "grunt-contrib-handlebars": "^0.11.0", - "grunt-contrib-jshint": "~0.6.0", - "grunt-contrib-qunit": "~0.2.0", - "grunt-contrib-sass": "^0.9.2", - "grunt-contrib-uglify": "~0.2.0", - "grunt-contrib-watch": "~0.4.0" + "grunt": "~1.6.1", + "grunt-banner": "~0.6.0", + "grunt-contrib-clean": "^2.0.1", + "grunt-contrib-concat": "~2.1.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-cssmin": "~4.0.0", + "grunt-contrib-handlebars": "^3.0.0", + "grunt-contrib-jshint": "~3.2.0", + "grunt-contrib-qunit": "~7.0.0", + "grunt-contrib-sass": "^2.0.0", + "grunt-contrib-uglify": "~5.2.2", + "grunt-contrib-watch": "~1.1.0" } } diff --git a/readme.md b/readme.md index f336701..aa5d600 100644 --- a/readme.md +++ b/readme.md @@ -27,7 +27,7 @@ for even faster loading. ### WordPress version -[Cardinal Store Locator plugin for WordPress](https://cardinalwp.com/) is now available, which uses this jQuery plugin +[Cardinal Locator - WordPress store locator plugin](https://cardinalwp.com/) is now available, which uses this jQuery plugin as a base and all of the settings can be set via a settings page in the WP dashboard. It also integrates with core WordPress features such as custom post types for location data and custom taxonomies for location categorization and filtering. @@ -35,6 +35,125 @@ filtering. ## Changelog +### Version 3.4.1 + +* Fixed default directions link (inline directions disabled). Props [@HarldVerbiesenVIPMarketingBV](https://github.com/HarldVerbiesenVIPMarketingBV) via [issue #304](https://github.com/bjorn2404/jQuery-Store-Locator-Plugin/issues/304) + +### Version 3.4.0 + +* Added support for new Map ID with mapSettingsID setting. Please refer to [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id) and [Map ID with Styling](https://developers.google.com/maps/documentation/javascript/examples/map-id-style) in the Google API docs. +* Added support for new [Advanced Markers](https://developers.google.com/maps/documentation/javascript/advanced-markers/overview) while maintaining support for the deprecated (not yet discontinued) marker functionality. mapSettingsID setting needs to be set and marker library needs to be included - see previous item. +* Fixed bugs with pagination. +* Fixed new "Google Maps JavaScript API has been loaded directly without loading=async" notice. +* Improved pagination accessibility and functionality. +* Updated jQuery in example files to v3.7.1 + +### Version 3.3.0 + +* Updated max distance functionality to make distance changes apply dynamically vs. having to manually click button. + +### Version 3.2.1 + +* Swapped old maps.google.com API domain to maps.googleapis.com in all example files. + +### Version 3.2.0 + +* Added new Google Maps lazy load setting and example file - see new lazyLoadMap and apiKey settings. + +### Version 3.1.14 + +* Added label tags to radio button markup in categories example file. +* Fix - reverted removal of zoom reset to 0 after taxonomy filtering due to introduction of new issue. +* Fixed comment typos. + +### Version 3.1.13 + +* Fixed additional disable filtering functionality related to select options and radio buttons by globally tracking the disabled values. +* Removed zoom reset to zero on taxonomy filtering to keep searched location in view. +* Updated maybeDisableFilterOptions to run when full map start or default location settings are enabled. + +### Version 3.1.12 + +* Added automatic reset functionality that fires when address input field value is removed (changed to blank). +* Fixed additional issues with new disable filtering functionality with select fields, radio buttons, and updated address input value. +* Fixed markerClusterer library usage of deprecated Google Maps addDomListener. Props [@marcohanke](https://github.com/marcohanke) via [#294](https://github.com/bjorn2404/jQuery-Store-Locator-Plugin/pull/294/) +* Updated jQuery version in example files. +* Updated query string functionality to fill in address and name search with query string values in search form. + +### Version 3.1.11 + +* Fixed issue with new disable filtering functionality with radio buttons. +* Fixed issue with reset button where all locations were duplicated - introduced in v3.0.1. Reported in https://github.com/bjorn2404/jQuery-Store-Locator-Plugin/issues/293. +* Updated functionality to reset disabled form filters when Reset button is clicked. + +### Version 3.1.10 + +* Added map marker accessibility. +* Deprecated bounceMarker setting due to Google Charts API deprecation and poor animation results with Google marker labels. +* Fixed issue with new disable filtering functionality when location objet property is missing. +* Fixed marker labels not working with previous technique. Swapped to google.maps.Marker label parameter. +* Updated package devDependencies. + +### Version 3.1.9 + +* Added functionality to disable input and option fields that don't have matching values in the current location set after filtering when inclusive filtering is used (default). +* Extended nameAttribute settings so multiple attributes can be searched. Separate attribute names with commas. +* Fixed location set length scenario when fullMapStart is enabled and taxFilters is reset and name search and origin are empty. +* Show empty result message if no locations with default sorting. +* Temporary fix for missing Google Maps callback parameter console error - the parameter requirement was not previously enforced on the API side. +* Updated deprecated google.maps.event.addDomListener usage with window.addEventListener. + +### Version 3.1.8 + +* Added coordinate range check to exclude locations with invalid latitude and longitude values. + +### Version 3.1.7 + +* Fixed empty name search value not clearing previous value. +* Fixed openNearest setting not working in combination with querystringParams setting. +* Fixed openNearest setting not opening correct location with custom sorting (sortBy) enabled. + +### Version 3.1.6 + +* Added extra check to make sure mapping doesn't fire twice when defaultLoc is enabled and fullMapStart is also enabled. + fullMapStart is not needed when defaultLoc is enabled and this is just a preventative to avoid user errors. +* Fixed centering issue on initial search with maxDistance enabled introduced with fitBounds updates in last update. + +### Version 3.1.5 + +* Added Google Maps object as a parameter for [callbackMarkerClick](callbacks/callback-markerclick.md) callback. +* Added a zoom listener after fitBounds is used to prevent high zoom levels after name search and taxonomy filtering. +* Improved zooming when maxDistance setting is enabled taking advantage of the fitBounds method. + +### Version 3.1.4 + +* Fixed name search filter value not clearing if form input is cleared. + +### Version 3.1.3 + +* Fixed empty name search field value overriding filter results. +* Fixed groups of filters not applying together. +* Fixed potential error from occurring if fullMapStartListLimit is set, and the number of locations is less than the limit. +* Updated bundled Handlebars to v4.7.7 that addresses a [critical vulnerability](https://github.com/advisories/GHSA-f2jv-r9rf-7988). +* Updated jQuery version in example files to v3.6.0. + +### Version 3.1.2 + +* Fixed name search issue introduced in v3.1.1. Reverted to previous matching pattern only for name searches and still using the new patter for taxonomy matching. + +### Version 3.1.1 + +* Enhanced filtering regular expression to better account for exact matches vs. substrings. +* Fixed multi-category selection filtering issue introduced in last version 3.1.0. +* Updated bundled Handlebars to v4.7.6. +* Updated node modules. + +### Version 3.1.0 + +* Added featuredDistance setting to restrict featured locations by a specified distance (number value should be used). +* Updated bundled version of Handlebars to v4.5.1 due to security issue. +* Updated taxonomy filtering REGEX and string replacements for international character support. + ### Version 3.0.1 * Added custom order handling to tie into previously added custom sorting. Set order to asc or desc. diff --git a/src/css/bootstrap-example.scss b/src/css/bootstrap-example.scss index 6330a34..e6bb36f 100644 --- a/src/css/bootstrap-example.scss +++ b/src/css/bootstrap-example.scss @@ -15,6 +15,11 @@ $arialFont: Arial, Helvetica, sans-serif; font-family: $arialFont; } +.GMAMP-maps-pin-view { + color: $black; + font: 400 15px/1 $arialFont; +} + .bh-sl-error { clear: both; float: left; diff --git a/src/css/storelocator.scss b/src/css/storelocator.scss index 28660de..479f444 100644 --- a/src/css/storelocator.scss +++ b/src/css/storelocator.scss @@ -1,6 +1,6 @@ $white: #fff; $gray: #ccc; -$darkgray: #8e8e8e; +$darkgray: #6c6c6c; $titlegray: #797874; $shadow: #656565; $textgray: #555; @@ -35,6 +35,11 @@ $tabletLarge: '(min-width: 1024px)'; } } +.GMAMP-maps-pin-view { + color: $black; + font: 400 15px/1 $arialFont; +} + /* InfoBubble font size */ .bh-sl-window { font-size: 13px; @@ -350,17 +355,29 @@ $tabletLarge: '(min-width: 1024px)'; text-align: center; li { + display: inline-block; + margin: 0 4px; + } + + a { + box-shadow: none; color: $blue; - cursor: pointer; display: inline-block; font: bold 14px $arialFont; padding: 10px; + text-decoration: underline; } .bh-sl-current { color: $textgray; cursor: auto; text-decoration: none; + + a { + color: $textgray; + pointer-events: none; + text-decoration: none; + } } } } diff --git a/src/js/jquery.storelocator.js b/src/js/jquery.storelocator.js index 4f44ac4..efdf78b 100644 --- a/src/js/jquery.storelocator.js +++ b/src/js/jquery.storelocator.js @@ -2,26 +2,29 @@ 'use strict'; var pluginName = 'storeLocator'; + var googleMapsScriptIsInjected = false; + var googleMapsAPIPromise = null; - // Only allow for one instantiation of this script and make sure Google Maps API is included - if (typeof $.fn[pluginName] !== 'undefined' || typeof google === 'undefined') { + // Only allow for one instantiation of this script + if (typeof $.fn[pluginName] !== 'undefined') { return; } // Variables used across multiple methods - var $this, map, listTemplate, infowindowTemplate, dataTypeRead, originalOrigin, originalData, originalZoom, dataRequest, searchInput, addressInput, olat, olng, storeNum, directionsDisplay, directionsService, prevSelectedMarkerBefore, prevSelectedMarkerAfter, firstRun, reload; + var $this, map, listTemplate, infowindowTemplate, dataTypeRead, originalOrigin, originalData, originalZoom, dataRequest, searchInput, addressInput, olat, olng, storeNum, directionsDisplay, directionsService, prevSelectedMarkerBefore, prevSelectedMarkerAfter, firstRun, reload, nameAttrs, originalFilterVals, paginationPage, locationsTotal; var featuredset = [], locationset = [], normalset = [], markers = []; - var filters = {}, locationData = {}, GeoCodeCalc = {}, mappingObj = {}; + var filters = {}, locationData = {}, GeoCodeCalc = {}, mappingObj = {}, disabledFilterVals = {}; // Create the defaults once. DO NOT change these settings in this file - settings should be overridden in the plugin call var defaults = { 'ajaxData' : null, 'altDistanceNoResult' : false, + 'apiKey' : null, 'autoComplete' : false, 'autoCompleteDisableListener': false, 'autoCompleteOptions' : {}, 'autoGeocode' : false, - 'bounceMarker' : true, + 'bounceMarker' : true, // Deprecated. 'catMarkers' : null, 'dataLocation' : 'data/locations.json', 'dataRaw' : null, @@ -35,21 +38,24 @@ 'dragSearch' : false, 'exclusiveFiltering' : false, 'exclusiveTax' : null, + 'featuredDistance' : null, 'featuredLocations' : false, 'fullMapStart' : false, 'fullMapStartBlank' : false, 'fullMapStartListLimit' : false, 'infoBubble' : null, 'inlineDirections' : false, + 'lazyLoadMap' : false, 'lengthUnit' : 'm', 'listColor1' : '#ffffff', 'listColor2' : '#eeeeee', 'loading' : false, 'locationsPerPage' : 10, 'mapSettings' : { - mapTypeId: google.maps.MapTypeId.ROADMAP, - zoom : 12 + mapTypeId: 'roadmap', + zoom : 12, }, + 'mapSettingsID' : '', 'markerCluster' : null, 'markerImg' : null, 'markerDim' : null, @@ -74,33 +80,34 @@ 'visibleMarkersList' : false, 'xmlElement' : 'marker', // HTML elements - 'addressID' : 'bh-sl-address', - 'closeIcon' : 'bh-sl-close-icon', - 'formContainer' : 'bh-sl-form-container', - 'formID' : 'bh-sl-user-location', - 'geocodeID' : null, - 'lengthSwapID' : 'bh-sl-length-swap', - 'loadingContainer' : 'bh-sl-loading', - 'locationList' : 'bh-sl-loc-list', - 'mapID' : 'bh-sl-map', - 'maxDistanceID' : 'bh-sl-maxdistance', - 'modalContent' : 'bh-sl-modal-content', - 'modalWindow' : 'bh-sl-modal-window', - 'orderID' : 'bh-sl-order', - 'overlay' : 'bh-sl-overlay', - 'regionID' : 'bh-sl-region', - 'searchID' : 'bh-sl-search', - 'sortID' : 'bh-sl-sort', - 'taxonomyFiltersContainer' : 'bh-sl-filters-container', + 'addressID' : 'bh-sl-address', + 'closeIcon' : 'bh-sl-close-icon', + 'formContainer' : 'bh-sl-form-container', + 'formID' : 'bh-sl-user-location', + 'geocodeID' : null, + 'lengthSwapID' : 'bh-sl-length-swap', + 'loadingContainer' : 'bh-sl-loading', + 'locationList' : 'bh-sl-loc-list', + 'mapID' : 'bh-sl-map', + 'maxDistanceID' : 'bh-sl-maxdistance', + 'modalContent' : 'bh-sl-modal-content', + 'modalWindow' : 'bh-sl-modal-window', + 'orderID' : 'bh-sl-order', + 'overlay' : 'bh-sl-overlay', + 'regionID' : 'bh-sl-region', + 'searchID' : 'bh-sl-search', + 'sortID' : 'bh-sl-sort', + 'taxonomyFiltersContainer': 'bh-sl-filters-container', // Templates - 'infowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/infowindow-description.html', - 'listTemplatePath' : 'assets/js/plugins/storeLocator/templates/location-list-description.html', - 'KMLinfowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-infowindow-description.html', - 'KMLlistTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-location-list-description.html', - 'listTemplateID' : null, - 'infowindowTemplateID' : null, + 'infowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/infowindow-description.html', + 'listTemplatePath' : 'assets/js/plugins/storeLocator/templates/location-list-description.html', + 'KMLinfowindowTemplatePath': 'assets/js/plugins/storeLocator/templates/kml-infowindow-description.html', + 'KMLlistTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-location-list-description.html', + 'listTemplateID' : null, + 'infowindowTemplateID' : null, // Callbacks 'callbackAutoGeoSuccess' : null, + 'callbackBeforeMapInject' : null, 'callbackBeforeSend' : null, 'callbackCloseDirections' : null, 'callbackCreateMarker' : null, @@ -124,17 +131,17 @@ 'callbackSorting' : null, 'callbackSuccess' : null, // Language options - 'addressErrorAlert' : 'Unable to find address', - 'autoGeocodeErrorAlert' : 'Automatic location detection failed. Please fill in your address or zip code.', - 'distanceErrorAlert' : 'Unfortunately, our closest location is more than ', - 'kilometerLang' : 'kilometer', - 'kilometersLang' : 'kilometers', - 'mileLang' : 'mile', - 'milesLang' : 'miles', - 'noResultsTitle' : 'No results', - 'noResultsDesc' : 'No locations were found with the given criteria. Please modify your selections or input.', - 'nextPage' : 'Next »', - 'prevPage' : '« Prev' + 'addressErrorAlert' : 'Unable to find address', + 'autoGeocodeErrorAlert': 'Automatic location detection failed. Please fill in your address or zip code.', + 'distanceErrorAlert' : 'Unfortunately, our closest location is more than ', + 'kilometerLang' : 'kilometer', + 'kilometersLang' : 'kilometers', + 'mileLang' : 'mile', + 'milesLang' : 'miles', + 'noResultsTitle' : 'No results', + 'noResultsDesc' : 'No locations were found with the given criteria. Please modify your selections or input.', + 'nextPage' : 'Next »', + 'prevPage' : '« Prev' }; // Plugin constructor @@ -144,7 +151,39 @@ this.settings = $.extend({}, defaults, options); this._defaults = defaults; this._name = pluginName; - this.init(); + + // Add Map ID to map settings if set. + if (this.settings.mapSettingsID !== '') { + this.settings.mapSettings.mapId = this.settings.mapSettingsID; + } + + // Load Google Maps API when lazy load is enabled. + if (this.settings.lazyLoadMap && this.settings.apiKey !== null && typeof google === 'undefined') { + var _this = this; + var optionsQuery = {}; + var loadMap = false; + + // Load new marker library. + optionsQuery.libraries = 'marker'; + + // Autocomplete. + if (this.settings.autoComplete === true) { + optionsQuery.libraries = 'places,marker'; + } + + // Allow callback to resolve map loading when set. + if (this.settings.callbackBeforeMapInject) { + new Promise(function (resolve, reject) { + _this.settings.callbackBeforeMapInject.call(this, options, resolve); + }).then(function () { + _this.triggerMapLoad(optionsQuery) + }); + } else { + _this.triggerMapLoad(optionsQuery) + } + } else { + this.init(); + } } // Avoid Plugin.prototype conflicts @@ -156,6 +195,7 @@ init: function () { var _this = this; this.writeDebug('init'); + // Calculate geocode distance functions if (this.settings.lengthUnit === 'km') { // Kilometers @@ -189,6 +229,11 @@ } }); + // Handle distance changes on select + if (this.settings.maxDistance === true) { + this.distanceFiltering(); + } + // Do taxonomy filtering if set if (this.settings.taxonomyFilters !== null) { this.taxonomyFiltering(); @@ -200,7 +245,7 @@ // Add modal window divs if set if (this.settings.modal === true) { - // Clone the filters if there are any so they can be used in the modal + // Clone the filters if there are any, so they can be used in the modal if (this.settings.taxonomyFilters !== null) { // Clone the filters $('.' + this.settings.taxonomyFiltersContainer).clone(true, true).prependTo($this); @@ -228,9 +273,84 @@ this._loadTemplates(); }, + /** + * Trigger async map loading + */ + triggerMapLoad: function(optionsQuery) { + this.writeDebug('triggerMapLoad'); + var _this = this; + + this.loadMapsAPI(this.settings.apiKey, optionsQuery) + .then(function (map) { + _this.map = map; + _this.init(); + }); + }, + + /** + * Inject Google Maps script + * + * @param {Object} options Options query object to pass as query string parameters to Google Maps. + */ + injectGoogleMapsScript: function (options) { + this.writeDebug('injectGoogleMapsScript'); + options = (typeof options !== 'undefined') ? options : {}; + + if (googleMapsScriptIsInjected) { + throw new Error('Google Maps API is already loaded.'); + } + + var optionsQuery = Object.keys(options) + .map(k => encodeURIComponent(k) + '=' + encodeURIComponent(options[k])) + .join('&'); + var apiURL = 'https://maps.googleapis.com/maps/api/js?' + optionsQuery; + var mapScript = document.createElement('script'); + mapScript.setAttribute('src', apiURL); + mapScript.setAttribute('async', ''); + mapScript.setAttribute('defer', ''); + + // Append the script to the document head. + document.head.appendChild(mapScript); + googleMapsScriptIsInjected = true; + }, + + /** + * Load Google Maps API + * + * @param {string} apiKey Google Maps JavaScript API key. + * @param {Object} options Options query object to pass as query string parameters to Google Maps. + * + * @returns {Promise} + */ + loadMapsAPI: function (apiKey, options) { + this.writeDebug('loadMapsAPI'); + options = (typeof options !== 'undefined') ? options : {}; + var _this = this; + + if (!googleMapsAPIPromise) { + googleMapsAPIPromise = new Promise(function (resolve, reject) { + try { + window.onGoogleMapsAPILoaded = resolve; + + _this.injectGoogleMapsScript({ + key: apiKey, + loading: 'async', + callback: 'onGoogleMapsAPILoaded', + ...options, + }); + } catch (error) { + reject(error); + } + }).then(function () { window.google.maps }); + } + + return googleMapsAPIPromise; + }, + /** * Destroy - * Note: The Google map is not destroyed here because Google recommends using a single instance and reusing it (it's not really supported) + * Note: The Google map is not destroyed here because Google recommends using a single instance and reusing it + * (it's not really supported) */ destroy: function () { this.writeDebug('destroy'); @@ -297,7 +417,7 @@ } if (this.settings.pagination === true) { - $(document).off('click.'+pluginName, '.bh-sl-pagination li'); + $(document).off('click.'+pluginName, '.bh-sl-pagination li a'); } }, @@ -339,8 +459,9 @@ this.reset(); reload = true; - if ( this.settings.taxonomyFilters !== null ) { + if (this.settings.taxonomyFilters !== null) { this.formFiltersReset(); + this.resetDisabledFilterVals(); this.taxonomyFiltersInit(); } @@ -385,10 +506,39 @@ return radius * 2 * Math.asin(Math.min(1, Math.sqrt(( Math.pow(Math.sin((this.geoCodeCalcDiffRadian(lat1, lat2)) / 2.0), 2.0) + Math.cos(this.geoCodeCalcToRadian(lat1)) * Math.cos(this.geoCodeCalcToRadian(lat2)) * Math.pow(Math.sin((this.geoCodeCalcDiffRadian(lng1, lng2)) / 2.0), 2.0) )))); }, + /** + * Range helper function for coordinate validation + * + * @param min {number} minimum number allowed + * @param num {number} number to check + * @param max {number} maximum number allowed + * + * @returns {boolean} + */ + inRange: function(min, num, max){ + this.writeDebug('inRange',arguments); + num = Math.abs(num); + return isFinite(num) && (num >= min) && (num <= max); + }, + + /** + * Coordinate validation + * + * @param lat {number} latitude + * @param lng {number} longitude + * + * @returns {boolean} + */ + coordinatesInRange: function (lat, lng) { + this.writeDebug('coordinatesInRange',arguments); + return this.inRange(-90, lat, 90) && this.inRange(-180, lng, 180); + }, + /** * Check for query string * * @param param {string} query string parameter to test + * * @returns {string} query string value */ getQueryString: function(param) { @@ -519,12 +669,36 @@ }); } - // Reset button trigger + // Reset button trigger. if ($('.bh-sl-reset').length && $('#' + this.settings.mapID).length) { $(document).on('click.' + pluginName, '.bh-sl-reset', function () { _this.mapReload(); }); } + + // Track changes to the address search field. + $('#' + this.settings.addressID).on('change.'+pluginName, function () { + originalFilterVals = undefined; + disabledFilterVals = {}; + + // Unset origin tracking if input field is removed. + if ( + $.trim($('#' + _this.settings.addressID).val()) === '' && + (typeof searchInput === 'undefined' || searchInput === '') + ) { + + // Reset the origin, mapping object, and disabled filter values. + if (_this.settings.taxonomyFilters !== null && _this.settings.exclusiveFiltering === false) { + olat = undefined; + olng = undefined; + originalOrigin = undefined; + mappingObj = {}; + _this.resetDisabledFilterVals(); + _this.taxonomyFiltersInit(); + _this.mapping(null); + } + } + }); }, /** @@ -645,7 +819,7 @@ _this.map = new google.maps.Map(document.getElementById(_this.settings.mapID), myOptions); // Re-center the map when the browser is re-sized - google.maps.event.addDomListener(window, 'resize', function() { + window.addEventListener('resize', function() { var center = _this.map.getCenter(); google.maps.event.trigger(_this.map, 'resize'); _this.map.setCenter(center); @@ -654,8 +828,7 @@ // Only do this once _this.settings.fullMapStartBlank = false; myOptions.zoom = originalZoom; - } - else { + } else { // If a default location is set if (this.settings.defaultLoc === true) { this.defaultLocation(); @@ -668,7 +841,7 @@ doAutoGeo = false; // No need for additional processing } // If show full map option is true - else if (this.settings.fullMapStart === true) { + else if (this.settings.fullMapStart === true && this.settings.defaultLoc === false) { if ((this.settings.querystringParams === true && this.getQueryString(this.settings.addressID)) || (this.settings.querystringParams === true && this.getQueryString(this.settings.searchID)) || (this.settings.querystringParams === true && this.getQueryString(this.settings.maxDistanceID))) { _this.writeDebug('Using Query String'); this.processForm(null); @@ -772,6 +945,7 @@ if (results[0]) { var result = {}; result.address = results[0].formatted_address; + result.fullResult = results[0]; callbackFunction(result); } } else { @@ -787,6 +961,7 @@ * * @param num {number} the full number * @param dec {number} the number of digits to show after the decimal + * * @returns {number} */ roundNumber: function (num, dec) { @@ -798,6 +973,7 @@ * Checks to see if the object is empty. Using this instead of $.isEmptyObject for legacy browser support * * @param obj {Object} the object to check + * * @returns {boolean} */ isEmptyObject: function (obj) { @@ -814,6 +990,7 @@ * Checks to see if all the property values in the object are empty * * @param obj {Object} the object to check + * * @returns {boolean} */ hasEmptyObjectVals: function (obj) { @@ -831,6 +1008,23 @@ return objTest; }, + /** + * Checks to see if only a single taxonomy group has a selected value + * + * @param obj {Object} the object to check + * @param key {string} Key value of current filter group + * + * @returns {boolean} + */ + hasSingleGroupFilterVal: function(obj, key) { + this.writeDebug('hasSingleGroupFilterVal',arguments); + + // Copy the object so the original doesn't change. + var objCopy = Object.assign({}, obj); + + return !this.hasEmptyObjectVals(objCopy[key]); + }, + /** * Modal window close function */ @@ -919,8 +1113,9 @@ * Location distance sorting function * * @param locationsarray {array} locationset array + * @param distanceOverride {boolean} Force sort by distance */ - sortNumerically: function (locationsarray) { + sortNumerically: function (locationsarray, distanceOverride) { this.writeDebug('sortNumerically',arguments); var property = ( this.settings.sortBy !== null && @@ -928,6 +1123,10 @@ typeof this.settings.sortBy.prop !== 'undefined' ) ? this.settings.sortBy.prop : 'distance'; + if (typeof distanceOverride !== 'undefined' && distanceOverride === true) { + property = 'distance'; + } + if (this.settings.sortBy !== null && this.settings.sortBy.hasOwnProperty('order') && this.settings.sortBy.order.toString() === 'desc') { locationsarray.sort(function (a, b) { return ((b[property] < a[property]) ? -1 : ((b[property] > a[property]) ? 1 : 0)); @@ -957,47 +1156,79 @@ } }, + /** + * Run the matching between regular expression filters and string value + * + * @param filter {array} One or multiple filters to apply + * @param val {string} Value to compare + * @param inclusive {boolean} Inclusive (default) or exclusive + * + * @returns {boolean} + */ + filterMatching: function(filter, val, inclusive) { + this.writeDebug('inclusiveFilter',arguments); + inclusive = (typeof inclusive !== 'undefined') ? inclusive : true; + var applyFilters; + + // Undefined check. + if (typeof val === 'undefined') { + return false; + } + + // Modify the join depending on inclusive (AND) vs exclusive (OR). + if ( true === inclusive ) { + applyFilters = filter.join(''); + } else { + applyFilters = filter.join('|'); + } + + if ((new RegExp(applyFilters, 'i').test(val.replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '')))) { + return true; + } + + return false; + }, + /** * Filter the data with Regex * * @param data {array} data array to check for filter values * @param filters {Object} taxonomy filters object + * * @returns {boolean} */ filterData: function (data, filters) { - this.writeDebug('filterData',arguments); + this.writeDebug('filterData', arguments); var filterTest = true; for (var k in filters) { if (filters.hasOwnProperty(k)) { + var testResults = []; - // Exclusive filtering - if (this.settings.exclusiveFiltering === true || (this.settings.exclusiveTax !== null && Array.isArray(this.settings.exclusiveTax) && this.settings.exclusiveTax.indexOf(k) !== -1)) { - var filterTests = filters[k]; - var exclusiveTest = []; + for (var l = 0; l < filters[k].length; l++) { - if (typeof data[k] !== 'undefined') { - for (var l = 0; l < filterTests.length; l++) { - exclusiveTest[l] = new RegExp(filterTests[l], 'i').test(data[k].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '')); - } + // Exclusive filtering + if (this.settings.exclusiveFiltering === true || (this.settings.exclusiveTax !== null && Array.isArray(this.settings.exclusiveTax) && this.settings.exclusiveTax.indexOf(k) !== -1)) { + testResults[l] = this.filterMatching(filters[k], data[k], false); } - - if (exclusiveTest.indexOf(true) === -1) { - filterTest = false; + // Inclusive filtering + else { + testResults[l] = this.filterMatching(filters[k], data[k]); } } - // Inclusive filtering - else { - if (typeof data[k] === 'undefined' || !(new RegExp(filters[k].join(''), 'i').test(data[k].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '')))) { + + // First handle name search, then standard filtering. + if (typeof nameAttrs !== 'undefined' && nameAttrs.indexOf(k) !== -1 && testResults.indexOf(true) !== -1) { + return true; + } else { + if (testResults.indexOf(true) === -1) { filterTest = false; } } } } - if (filterTest) { - return true; - } + return filterTest; }, /** @@ -1005,41 +1236,142 @@ * * @param currentPage {number} * @param totalPages {number} + * * @returns {string} */ _paginationOutput: function(currentPage, totalPages) { this.writeDebug('_paginationOutput',arguments); - currentPage = parseFloat(currentPage); + currentPage = parseInt(currentPage); + totalPages = Math.ceil(totalPages); + var pagesStart, pagesEnd; var output = ''; var nextPage = currentPage + 1; var prevPage = currentPage - 1; + var pagesCutoff = 5; + var pagesCeiling = Math.ceil(pagesCutoff / 2); + var pagesFloor = Math.floor(pagesCutoff / 2); + + // Determine page numbers to display. + if (totalPages < pagesCutoff) { + pagesStart = 0; + pagesEnd = totalPages; + } else if (currentPage >= 0 && currentPage <= pagesCeiling) { + pagesStart = 0; + pagesEnd = pagesCutoff; + } else if ((currentPage + pagesFloor) >= totalPages) { + pagesStart = (totalPages - pagesCutoff); + pagesEnd = totalPages; + } else { + pagesStart = (currentPage - pagesCeiling); + pagesEnd = (currentPage + pagesFloor); + } // Previous page if ( currentPage > 0 ) { - output += '
    • ' + this.settings.prevPage + '
    • '; + output += '
    • '; + output += '' + this.settings.prevPage + ''; + output += '
    • '; + } + + // Additional pages indicator. + if ((currentPage + 1) >= pagesCutoff && totalPages > pagesCutoff) { + // First page link. + output += '
    • '; + output += '' + 1 + ''; + output += '
    • '; + + output += '
    • '; + output += ''; + output += '
    • '; } // Add the numbers - for (var p = 0; p < Math.ceil(totalPages); p++) { + for (var p = pagesStart; p < pagesEnd; p++) { var n = p + 1; if (p === currentPage) { - output += '
    • ' + n + '
    • '; - } - else { - output += '
    • ' + n + '
    • '; + output += '
    • '; + output += '' + n + ''; + output += '
    • '; + } else { + output += '
    • '; + output += '' + n + ''; + output += '
    • '; } } + // Additional pages indicator. + if ((currentPage + pagesCeiling) <= totalPages && totalPages > pagesCutoff) { + output += '
    • '; + output += ''; + output += '
    • '; + + // Last page link. + output += '
    • '; + output += '' + totalPages + ''; + output += '
    • '; + } + // Next page if ( nextPage < totalPages ) { - output += '
    • ' + this.settings.nextPage + '
    • '; + output += '
    • '; + output += '' + this.settings.nextPage + ''; + output += '
    • '; } return output; }, + /** + * Reset pagination after the input has changed + */ + paginationReset: function() { + this.writeDebug('paginationReset',arguments); + + var currentUrl = window.location.href; + var url = new URL(currentUrl); + + // Remove the old page in the URL. + url.searchParams.delete('bhsl-page'); + + // Update the query string param to match the new value. + if (history.pushState) { + window.history.pushState({path: url.href}, '', url.href); + } + }, + + /** + * Determine the total number of pages for pagination + */ + totalPages: function() { + this.writeDebug('totalPages',arguments); + + // Location limit. + if ( + typeof originalOrigin !== 'undefined' && + this.settings.storeLimit > 0 && + locationset.length > this.settings.storeLimit + ) { + return this.settings.storeLimit / this.settings.locationsPerPage; + } + + // WP API response after search. + if (locationsTotal > 0) { + return locationsTotal / this.settings.locationsPerPage; + } + + // Unlimited or last page. + if ( + this.settings.storeLimit === -1 || + locationset.length < this.settings.storeLimit + ) { + return locationset.length / this.settings.locationsPerPage; + } else { + return this.settings.storeLimit / this.settings.locationsPerPage; + } + }, + /** * Set up the pagination pages * @@ -1048,15 +1380,10 @@ paginationSetup: function (currentPage) { this.writeDebug('paginationSetup',arguments); var pagesOutput = ''; - var totalPages; var $paginationList = $('.bh-sl-pagination-container .bh-sl-pagination'); // Total pages - if ( this.settings.storeLimit === -1 || locationset.length < this.settings.storeLimit ) { - totalPages = locationset.length / this.settings.locationsPerPage; - } else { - totalPages = this.settings.storeLimit / this.settings.locationsPerPage; - } + var totalPages = this.totalPages(); // Current page check if (typeof currentPage === 'undefined') { @@ -1081,15 +1408,31 @@ }, /** - * Marker image setup + * Determine if the legacy or Advanced markers should be used + * + * @returns {boolean} + */ + useLegacyMarkers: function() { + this.writeDebug('useLegacyMarkers',arguments); + + return !this.settings.mapSettings.hasOwnProperty('mapId') || + this.settings.mapSettings.mapId === ''; + }, + + /** + * Legacy marker image setup + * + * Original functionality supporting the now deprecated google.maps.Marker + * This will eventually be removed in favor of markerImage below. * * @param markerUrl {string} path to marker image * @param markerWidth {number} width of marker * @param markerHeight {number} height of marker + * * @returns {Object} Google Maps icon object */ - markerImage: function (markerUrl, markerWidth, markerHeight) { - this.writeDebug('markerImage',arguments); + legacyMarkerImage: function (markerUrl, markerWidth, markerHeight) { + this.writeDebug('legacyMarkerImage',arguments); var markerImg; // User defined marker dimensions @@ -1112,15 +1455,51 @@ return markerImg; }, + /** + * Marker image setup + * + * @param markerUrl {string} path to marker image + * @param markerWidth {number} width of marker + * @param markerHeight {number} height of marker + * + * @returns {HTMLImageElement} Image element + */ + markerImage: function (markerUrl, markerWidth, markerHeight) { + this.writeDebug('markerImage',arguments); + + // Check if legacy marker image should be used + if (this.useLegacyMarkers()) { + return this.legacyMarkerImage(markerUrl, markerWidth, markerHeight); + } + + var markerImg = document.createElement('img'); + markerImg.src = markerUrl; + + // User defined marker dimensions + if (typeof markerWidth !== 'undefined' && typeof markerHeight !== 'undefined') { + markerImg.height = markerHeight; + markerImg.width = markerWidth; + } + // Default marker dimensions: 32px x 32px + else { + markerImg.height = 32; + markerImg.width = 32; + } + + return markerImg; + }, + /** * Map marker setup * * @param point {Object} LatLng of current location * @param name {string} location name * @param address {string} location address - * @param letter {string} optional letter used for front-end identification and correlation between list and points + * @param letter {string} optional letter used for front-end identification and correlation between list and + * points * @param map {Object} the Google Map * @param category {string} location category/categories + * * @returns {Object} Google Maps marker */ createMarker: function (point, name, address, letter, map, category) { @@ -1136,16 +1515,24 @@ // Break the category variable into an array if there are multiple categories for the location categories = category.split(','); // With multiple categories the color will be determined by the last matched category in the data - for(var i = 0; i < categories.length; i++) { + for (var i = 0; i < categories.length; i++) { if (categories[i] in this.settings.catMarkers) { - markerImg = this.markerImage(this.settings.catMarkers[categories[i]][0], parseInt(this.settings.catMarkers[categories[i]][1]), parseInt(this.settings.catMarkers[categories[i]][2])); + markerImg = this.markerImage( + this.settings.catMarkers[categories[i]][0], + Number(this.settings.catMarkers[categories[i]][1]), + Number(this.settings.catMarkers[categories[i]][2]) + ); } } } // Single category else { if (category in this.settings.catMarkers) { - markerImg = this.markerImage(this.settings.catMarkers[category][0], parseInt(this.settings.catMarkers[category][1]), parseInt(this.settings.catMarkers[category][2])); + markerImg = this.markerImage( + this.settings.catMarkers[category][0], + Number(this.settings.catMarkers[category][1]), + Number(this.settings.catMarkers[category][2]) + ); } } } @@ -1155,9 +1542,12 @@ if (this.settings.markerImg !== null) { if (this.settings.markerDim === null) { markerImg = this.markerImage(this.settings.markerImg); - } - else { - markerImg = this.markerImage(this.settings.markerImg, this.settings.markerDim.width, this.settings.markerDim.height); + } else { + markerImg = this.markerImage( + this.settings.markerImg, + this.settings.markerDim.width, + this.settings.markerDim.height + ); } } @@ -1169,26 +1559,47 @@ else { // Create the default markers if (this.settings.disableAlphaMarkers === true || this.settings.storeLimit === -1 || this.settings.storeLimit > 26 || this.settings.catMarkers !== null || this.settings.markerImg !== null || (this.settings.fullMapStart === true && firstRun === true && (isNaN(this.settings.fullMapStartListLimit) || this.settings.fullMapStartListLimit > 26 || this.settings.fullMapStartListLimit === -1))) { - marker = new google.maps.Marker({ - position : point, - map : map, - draggable: false, - icon: markerImg // Reverts to default marker if nothing is passed - }); + if (this.useLegacyMarkers()) { + marker = new google.maps.Marker({ + draggable: false, + icon : markerImg, // Reverts to default marker if markerImg not set. + map : map, + optimized: false, + position : point, + title : name, + }); + } else { + marker = new google.maps.marker.AdvancedMarkerElement({ + content : markerImg, // Reverts to default marker if markerImg not set. + draggable: false, + map : map, + position : point, + title : name, + }); + } } else { - // Letter markers image - letterMarkerImg = { - url: 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-b.png&text=' + letter + '&psize=16&font=fonts/Roboto-Regular.ttf&color=ff333333&ax=44&ay=48' - }; - // Letter markers - marker = new google.maps.Marker({ - position : point, - map : map, - icon : letterMarkerImg, - draggable: false - }); + if (this.useLegacyMarkers()) { + marker = new google.maps.Marker({ + draggable: false, + label : letter, + map : map, + optimized: false, + position : point, + title : name, + }); + } else { + var letterPin = new google.maps.marker.PinElement({glyph: letter}); + + marker = new google.maps.marker.AdvancedMarkerElement({ + content : letterPin.element, + draggable: false, + map : map, + position : point, + title : name, + }); + } } } @@ -1201,12 +1612,18 @@ * @param currentMarker {Object} Google Maps marker * @param storeStart {number} optional first location on the current page * @param page {number} optional current page + * * @returns {Object} extended location data object */ _defineLocationData: function (currentMarker, storeStart, page) { this.writeDebug('_defineLocationData',arguments); var indicator = ''; - this._createLocationVariables(currentMarker.get('id')); + + if (this.useLegacyMarkers()) { + this._createLocationVariables(currentMarker.get('id')); + } else { + this._createLocationVariables(currentMarker.bhslID); + } var altDistLength, distLength; @@ -1232,13 +1649,23 @@ } } + var markerId; + // Set up alpha character - var markerId = currentMarker.get('id'); + if (this.useLegacyMarkers()) { + markerId = currentMarker.get('id'); + } else { + markerId = currentMarker.bhslID; + } + // Use dot markers instead of alpha if there are more than 26 locations if (this.settings.disableAlphaMarkers === true || this.settings.storeLimit === -1 || this.settings.storeLimit > 26 || (this.settings.fullMapStart === true && firstRun === true && (isNaN(this.settings.fullMapStartListLimit) || this.settings.fullMapStartListLimit > 26 || this.settings.fullMapStartListLimit === -1))) { + if (page > 0) { + indicator = storeStart + markerId + 1; + } else { indicator = markerId + 1; - } - else { + } + } else { if (page > 0) { indicator = String.fromCharCode('A'.charCodeAt(0) + (storeStart + markerId)); } @@ -1326,38 +1753,75 @@ // Opens the infowindow when list item is clicked if (location === 'left') { infowindow.setContent(formattedAddress); - infowindow.open(marker.get('map'), marker); + + if (this.useLegacyMarkers()) { + infowindow.open(marker.get('map'), marker); + } else { + infowindow.open(marker.map, marker); + } } // Opens the infowindow when the marker is clicked else { - google.maps.event.addListener(marker, 'click', function () { - infowindow.setContent(formattedAddress); - infowindow.open(marker.get('map'), marker); - // Focus on the list - var markerId = marker.get('id'); - var $selectedLocation = $('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']'); - - if ($selectedLocation.length > 0) { - // Marker click callback - if (_this.settings.callbackMarkerClick) { - _this.settings.callbackMarkerClick.call(this, marker, markerId, $selectedLocation, locationset[markerId]); + if (this.useLegacyMarkers()) { + google.maps.event.addListener(marker, 'click', function () { + infowindow.setContent(formattedAddress); + infowindow.open(marker.get('map'), marker); + // Focus on the list + var markerId = marker.get('id'); + var $selectedLocation = $('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']'); + + if ($selectedLocation.length > 0) { + // Marker click callback + if (_this.settings.callbackMarkerClick) { + _this.settings.callbackMarkerClick.call(this, marker, markerId, $selectedLocation, locationset[markerId], _this.map); + } + + $('.' + _this.settings.locationList + ' li').removeClass('list-focus'); + $selectedLocation.addClass('list-focus'); + + // Scroll list to selected marker + var $container = $('.' + _this.settings.locationList); + $container.animate({ + scrollTop: $selectedLocation.offset().top - $container.offset().top + $container.scrollTop() + }); } - $('.' + _this.settings.locationList + ' li').removeClass('list-focus'); - $selectedLocation.addClass('list-focus'); + // Custom selected marker override + if (_this.settings.selectedMarkerImg !== null) { + _this.changeSelectedMarker(marker); + } + }); + } else { + marker.addListener('click', function (domEvent, latLng) { + infowindow.setContent(formattedAddress); + infowindow.open(marker.map, marker); + + // Focus on the list + var markerId = marker.bhslID; + var $selectedLocation = $('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']'); + + if ($selectedLocation.length > 0) { + // Marker click callback + if (_this.settings.callbackMarkerClick) { + _this.settings.callbackMarkerClick.call(this, marker, markerId, $selectedLocation, locationset[markerId], _this.map); + } + + $('.' + _this.settings.locationList + ' li').removeClass('list-focus'); + $selectedLocation.addClass('list-focus'); - // Scroll list to selected marker - var $container = $('.' + _this.settings.locationList); - $container.animate({ - scrollTop: $selectedLocation.offset().top - $container.offset().top + $container.scrollTop() - }); - } + // Scroll list to selected marker + var $container = $('.' + _this.settings.locationList); + $container.animate({ + scrollTop: $selectedLocation.offset().top - $container.offset().top + $container.scrollTop() + }); + } - // Custom selected marker override - if (_this.settings.selectedMarkerImg !== null) { - _this.changeSelectedMarker(marker); - } - }); + // Custom selected marker override + if (_this.settings.selectedMarkerImg !== null) { + _this.changeSelectedMarker(marker); + } + }); + } } }, @@ -1490,6 +1954,17 @@ paginationChange: function (newPage) { this.writeDebug('paginationChange',arguments); + var currentUrl = window.location.href; + var url = new URL(currentUrl); + + // Update the page in the URL. + url.searchParams.set('bhsl-page', parseInt(newPage) + 1); + + // Update the query string param to match the new value. + if (history.pushState) { + window.history.pushState({path: url.href}, '', url.href); + } + // Page change callback if (this.settings.callbackPageChange) { this.settings.callbackPageChange.call(this, newPage); @@ -1503,6 +1978,7 @@ * Get the address by marker ID * * @param markerID {number} location ID + * * @returns {string} formatted address */ getAddressByMarker: function(markerID) { @@ -1650,7 +2126,7 @@ $distanceInput = $('#' + this.settings.maxDistanceID), region = ''; - // Stop the form submission + // Stop the form submission. if (typeof e !== 'undefined' && e !== null) { e.preventDefault(); } @@ -1666,7 +2142,17 @@ searchInput = this.getQueryString(this.settings.searchID); distance = this.getQueryString(this.settings.maxDistanceID); - // The form should override the query string parameters + // Max distance field. + if (distance && $('#' + this.settings.maxDistanceID + ' option[value=' + distance + ']').length) { + $distanceInput.val(distance); + } + + // Update zoom if origin coordinates are available and a distance query string value is set. + if (addressInput && distance) { + _this.settings.mapSettings.zoom = 0; + } + + // The form should override the query string parameters. if ($addressInput.val() !== '') { addressInput = $addressInput.val(); } @@ -1681,6 +2167,7 @@ // Get the user input and use it addressInput = $addressInput.val() || ''; searchInput = $searchInput.val() || ''; + // Get the distance if set if (this.settings.maxDistance === true) { distance = $distanceInput.val() || ''; @@ -1728,6 +2215,10 @@ this._start(); } else if (addressInput !== '') { + // Check for existing name search and remove if address input is blank. + if (searchInput === '' && filters.hasOwnProperty('name')) { + delete filters.name; + } // Geocode the origin if needed if (typeof originalOrigin !== 'undefined' && typeof olat !== 'undefined' && typeof olng !== 'undefined' && (addressInput === originalOrigin)) { @@ -1783,6 +2274,11 @@ mappingObj.distance = distance; _this.mapping(mappingObj); } + + // Reset pagination if the input has changed. + if (typeof originalOrigin !== 'undefined' && addressInput !== originalOrigin) { + this.paginationReset(); + } }, /** @@ -1811,24 +2307,28 @@ } } + // Make sure the location coordinates are valid. + if (!this.coordinatesInRange(data.lat, data.lng)) { + this.writeDebug('locationsSetup', "location ignored because coordinates out of range: " + maxDistance, data); + return; + } + // Create the array if (this.settings.maxDistance === true && typeof maxDistance !== 'undefined' && maxDistance !== null) { if (data.distance <= maxDistance) { locationset.push( data ); - } - else { + } else { + this.writeDebug('locationsSetup', "location ignored because it is out of maxDistance: " + maxDistance, data); return; } - } - else if (this.settings.maxDistance === true && this.settings.querystringParams === true && typeof maxDistance !== 'undefined' && maxDistance !== null) { + } else if (this.settings.maxDistance === true && this.settings.querystringParams === true && typeof maxDistance !== 'undefined' && maxDistance !== null) { if (data.distance <= maxDistance) { locationset.push( data ); - } - else { + } else { + this.writeDebug('locationsSetup', "location ignored because it is out of maxDistance: " + maxDistance, data); return; } - } - else { + } else { locationset.push( data ); } }, @@ -1875,7 +2375,8 @@ }, /** - * Set up front-end ordering functionality - this ties in to sorting and that has to be enabled for this to work. + * Set up front-end ordering functionality - this ties in to sorting and that has to be enabled for this to + * work. */ order: function() { this.writeDebug('order',arguments); @@ -1908,6 +2409,45 @@ }); }, + /** + * Distance filtering + */ + distanceFiltering: function () { + this.writeDebug('distanceFiltering'); + var _this = this; + var $distanceInput = $('#' + this.settings.maxDistanceID); + + // Add event listener + $distanceInput.on('change.'+pluginName, function (e) { + e.stopPropagation(); + + // Query string parameter value updates on change. + if (_this.settings.querystringParams === true) { + var currentUrl = window.location.href; + var url = new URL(currentUrl); + + // Update the distance in the URL. + url.searchParams.set(_this.settings.maxDistanceID, this.value); + + // Update the query string param to match the new value. + if (history.pushState) { + window.history.pushState({path: url.href}, '', url.href); + } else { + window.location.replace(url.href); + } + } + + if ($('#' + _this.settings.mapID).hasClass('bh-sl-map-open') === true) { + if ((olat) && (olng)) { + _this.settings.mapSettings.zoom = 0; + _this.processForm(); + } else { + _this.mapping(mappingObj); + } + } + }); + }, + /** * Count the selected filters * @@ -2066,7 +2606,6 @@ } } } - }, /** @@ -2122,7 +2661,7 @@ // Reset pagination. if (_this.settings.pagination === true) { - _this.paginationChange(0); + _this.paginationReset(); } // Handle checkbox filters @@ -2161,10 +2700,10 @@ if ((olat) && (olng)) { if (_this.countFilters() === 0) { _this.settings.mapSettings.zoom = originalZoom; - } - else { + } else { _this.settings.mapSettings.zoom = 0; } + _this.processForm(); } else { @@ -2192,8 +2731,7 @@ if ((olat) && (olng)) { _this.settings.mapSettings.zoom = 0; _this.processForm(); - } - else { + } else { _this.mapping(mappingObj); } } @@ -2233,13 +2771,24 @@ // Set up the new list $(markers).each(function(x, marker){ - if (map.getBounds().contains(marker.getPosition())) { - // Define the location data - _this.listSetup(marker, 0, 0); + if (_this.useLegacyMarkers()) { + if (map.getBounds().contains(marker.getPosition())) { + // Define the location data + _this.listSetup(marker, 0, 0); + + // Set up the list template with the location data + listHtml = listTemplate(locations); + $('.' + _this.settings.locationList + ' > ul').append(listHtml); + } + } else { + if (map.getBounds().contains(marker.position)) { + // Define the location data + _this.listSetup(marker, 0, 0); - // Set up the list template with the location data - listHtml = listTemplate(locations); - $('.' + _this.settings.locationList + ' > ul').append(listHtml); + // Set up the list template with the location data + listHtml = listTemplate(locations); + $('.' + _this.settings.locationList + ' > ul').append(listHtml); + } } }); @@ -2265,7 +2814,7 @@ olat = mappingObj.lat = newCenter.lat(); olng = mappingObj.lng = newCenter.lng(); - // Determine the new origin addresss + // Determine the new origin address var newAddress = new this.reverseGoogleGeocode(this); newCenterCoords = new google.maps.LatLng(mappingObj.lat, mappingObj.lng); newAddress.geocode({'latLng': newCenterCoords}, function (data) { @@ -2334,29 +2883,63 @@ } var marker, - originImg = ''; + originImg; if (typeof origin !== 'undefined') { - if (this.settings.originMarkerImg !== null) { - if (this.settings.originMarkerDim === null) { - originImg = this.markerImage(this.settings.originMarkerImg); + if (this.useLegacyMarkers()) { + if (this.settings.originMarkerImg !== null) { + if (this.settings.originMarkerDim === null) { + originImg = this.markerImage(this.settings.originMarkerImg); + } + else { + originImg = this.markerImage(this.settings.originMarkerImg, this.settings.originMarkerDim.width, this.settings.originMarkerDim.height); + } } else { - originImg = this.markerImage(this.settings.originMarkerImg, this.settings.originMarkerDim.width, this.settings.originMarkerDim.height); + originImg = { + url: 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png' + }; } - } - else { - originImg = { - url: 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png' - }; - } - marker = new google.maps.Marker({ - position : originPoint, - map : map, - icon : originImg, - draggable: false - }); + marker = new google.maps.Marker({ + position : originPoint, + map : map, + icon : originImg, + draggable: false + }); + } else { + // Default green origin pin. + var defaultOriginPin = new google.maps.marker.PinElement({ + background : '#39b25e', + borderColor: '#177d3d', + glyphColor : '#177d3c' + }); + + marker = new google.maps.marker.AdvancedMarkerElement({ + content : defaultOriginPin.element, + draggable: false, + map : map, + position : originPoint, + title : name, + }); + + // Origin image. + if (this.settings.originMarkerImg !== null) { + originImg = document.createElement('img'); + + if (this.settings.originMarkerDim === null) { + originImg.src = this.settings.originMarkerImg; + } else { + originImg = this.markerImage( + this.settings.originMarkerImg, + this.settings.originMarkerDim.width, + this.settings.originMarkerDim.height, + ); + } + + marker.content = originImg; + } + } } }, @@ -2406,7 +2989,13 @@ openNearestLocation: function(nearestLoc, infowindow, storeStart, page) { this.writeDebug('openNearestLocation',arguments); - if (this.settings.openNearest !== true || typeof nearestLoc === 'undefined' || (this.settings.fullMapStart === true && firstRun === true) || (this.settings.defaultLoc === true && firstRun === true)) { + if ( + this.settings.openNearest !== true || + typeof nearestLoc === 'undefined' || + typeof originalOrigin === 'undefined' || + (this.settings.fullMapStart === true && firstRun === true && this.settings.querystringParams === false) || + (this.settings.defaultLoc === true && firstRun === true && this.settings.querystringParams === false) + ) { return; } @@ -2417,7 +3006,7 @@ _this.settings.callbackNearestLoc.call(this, _this.map, nearestLoc, infowindow, storeStart, page); } - var markerId = 0; + var markerId = (nearestLoc.hasOwnProperty('markerid')) ? nearestLoc.markerid : 0; var selectedMarker = markers[markerId]; _this.createInfowindow(selectedMarker, 'left', infowindow, storeStart, page); @@ -2456,20 +3045,15 @@ _this.settings.callbackListClick.call(this, markerId, selectedMarker, locationset[markerId], map); } - map.panTo(selectedMarker.getPosition()); - var listLoc = 'left'; - if (_this.settings.bounceMarker === true) { - selectedMarker.setAnimation(google.maps.Animation.BOUNCE); - setTimeout(function () { - selectedMarker.setAnimation(null); - _this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page); - }, 700 - ); - } - else { - _this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page); + if (_this.useLegacyMarkers()) { + map.panTo(selectedMarker.getPosition()); + } else { + map.panTo(selectedMarker.position); } + var listLoc = 'left'; + _this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page); + // Custom selected marker override if (_this.settings.selectedMarkerImg !== null) { _this.changeSelectedMarker(selectedMarker); @@ -2562,10 +3146,50 @@ }); }, + /** + * Restrict featured locations from displaying in results by a specific distance + * + * @returns {Array} + */ + featuredDistanceRestriction: function() { + this.writeDebug('featuredDistanceRestriction',arguments); + var _this = this; + + featuredset = $.grep(featuredset, function (val) { + + if (val.hasOwnProperty('distance')) { + return parseFloat(val.distance) <= parseFloat(_this.settings.featuredDistance); + } + }); + + return featuredset; + }, + + /** + * Restrict featured locations by distance. + * + * @returns {Array} + */ + featuredRestrictions: function(mappingObject) { + this.writeDebug('featuredRestrictions',arguments); + + if (this.settings.featuredDistance === null) { + return featuredset; + } + + // Featured locations radius restriction. + if (this.settings.featuredDistance !== null) { + featuredset = this.featuredDistanceRestriction(mappingObject); + } + + return featuredset; + }, + /** * The primary mapping function that runs everything * - * @param mappingObject {Object} all the potential mapping properties - latitude, longitude, origin, name, max distance, page + * @param mappingObject {Object} all the potential mapping properties - latitude, longitude, origin, name, max + * distance, page */ mapping: function (mappingObject) { this.writeDebug('mapping',arguments); @@ -2584,6 +3208,14 @@ if (typeof page === 'undefined' || originalOrigin !== addressInput ) { page = 0; } + + paginationPage = page; + } + + // Override page if the query string was set. + var queryStringPage = _this.getQueryString('bhsl-page'); + if (queryStringPage !== '') { + page = paginationPage = parseInt(queryStringPage) - 1; } // Data request @@ -2591,11 +3223,11 @@ dataRequest = _this._getData(); } else { - // Setup the origin point + // Set up the origin point originPoint = new google.maps.LatLng(orig_lat, orig_lng); - // If the origin hasn't changed use the existing data so we aren't making unneeded AJAX requests - if ((typeof originalOrigin !== 'undefined') && (origin === originalOrigin) && (typeof originalData !== 'undefined')) { + // If the origin hasn't changed use the existing data, so we aren't making unneeded AJAX requests + if ((typeof originalOrigin !== 'undefined') && (origin === originalOrigin) && (typeof originalData !== 'undefined') && this.settings.pagination !== true) { origin = originalOrigin; dataRequest = originalData; } @@ -2624,10 +3256,153 @@ } }, + /** + * Reset disabled form fields + */ + resetDisabledFilterVals: function() { + this.writeDebug('resetDisabledFilterVals'); + + for (var taxKey in this.settings.taxonomyFilters) { + if (this.settings.taxonomyFilters.hasOwnProperty(taxKey)) { + for (var x = 0; x < this.settings.taxonomyFilters[taxKey].length; x++) { + $('#' + this.settings.taxonomyFilters[taxKey] + ' input,option').each(function () { + var disabled = $(this).attr('disabled'); + + if (typeof disabled !== 'undefined') { + $(this).removeAttr('disabled'); + } + }); + } + } + } + }, + + /** + * Get available filter values + * + * @param callback + */ + getAvailableFilters: function(callback) { + this.writeDebug('getAvailableFilters'); + var availableValues = []; + + for (var location in locationset) { + if (locationset.hasOwnProperty(location)) { + // Loop through the location values. + for (var locationKey in locationset[location]) { + if (filters.hasOwnProperty(locationKey) && locationset[location][locationKey] !== '') { + if (availableValues.hasOwnProperty(locationKey)) { + var availableVal = availableValues[locationKey].concat(',', locationset[location][locationKey].replace(', ', ',').trim()); + availableValues[locationKey] = Array.from(new Set(availableVal.split(','))).toString(); + } else { + availableValues[locationKey] = locationset[location][locationKey].replace(', ', ',').trim(); + } + } + } + } + } + + // Account for missing filter properties in location set. + for (var keyName in filters) { + if (!availableValues.hasOwnProperty(keyName)) { + availableValues[keyName] = ''; + } + } + + callback(availableValues); + }, + + /** + * Disable input fields that aren't available within the current location set + */ + maybeDisableFilterOptions: function() { + this.writeDebug('maybeDisableFilterOptions'); + var availableValues = []; + var _this = this; + + // Initially reset any input/option fields that were previously disabled. + this.resetDisabledFilterVals(); + + // Loop through current location set to determine what filter values are still available. + this.getAvailableFilters( function(values) { + availableValues = values; + + // Save the original filter values for reference. + if (typeof originalFilterVals === 'undefined') { + originalFilterVals = availableValues; + } + + // Update input and option fields to disabled if they're not available. + for (var key in _this.settings.taxonomyFilters) { + if (_this.settings.taxonomyFilters.hasOwnProperty(key)) { + + // Loop through the taxonomy filter group items. + for (var i = 0; i < _this.settings.taxonomyFilters[key].length; i++) { + if (_this.settings.taxonomyFilters.hasOwnProperty(key)) { + $('#' + _this.settings.taxonomyFilters[key] + ' input, #' + _this.settings.taxonomyFilters[key] + ' option').each(function () { + + // Initial determination of values that should be disabled. + if ($(this).val() !== '' && ! Array.from(new Set(availableValues[key].split(','))).includes($(this).val())) { + if (! disabledFilterVals.hasOwnProperty(key)) { + disabledFilterVals[key] = []; + } + + // Handle select options and radio button values when there is no address input. + if ( + (typeof addressInput === 'undefined' || addressInput === '') && + ($(this).prop('tagName') === 'OPTION' || $(this).prop('type') === 'radio') && + _this.hasSingleGroupFilterVal(filters, key) && + Array.from(new Set(originalFilterVals[key].split(','))).includes($(this).val()) + ) { + return; + } + + // Handle select options and radio button values when there is address input. + if ( + (typeof addressInput !== 'undefined' || addressInput !== '') && + ($(this).prop('tagName') === 'OPTION' || $(this).prop('type') === 'radio') && + _this.hasSingleGroupFilterVal(filters, key) && + Array.from(new Set(originalFilterVals[key].split(','))).includes($(this).val()) && + _this.countFilters() === 1 + ) { + return; + } + + // Keep select options and radio button available values after one filter has been selected. + if ( + ($(this).prop('tagName') === 'OPTION' || $(this).prop('type') === 'radio') && + _this.hasSingleGroupFilterVal(filters, key) && + _this.countFilters() > 1 && + Array.from(new Set(originalFilterVals[key].split(','))).includes($(this).val()) && + ! disabledFilterVals[key].includes($(this).val()) + ) { + return; + } + + // Track disabled values. + if ( + disabledFilterVals.hasOwnProperty(key) && + Array.isArray(disabledFilterVals[key]) && + ! disabledFilterVals[key].includes($(this).val()) + ) { + disabledFilterVals[key].push($(this).val()); + } + + $(this).attr('disabled', true); + } + }); + } + } + } + } + }); + }, + /** * Processes the location data * - * @param mappingObject {Object} all the potential mapping properties - latitude, longitude, origin, name, max distance, page + * @param mappingObject {Object} all the potential mapping properties - latitude, longitude, origin, name, max + * distance, page * @param originPoint {Object} LatLng of origin point * @param data {Object} location data * @param page {number} current page number @@ -2665,16 +3440,20 @@ openMap = $mapDiv.hasClass('bh-sl-map-open'); - // Set a variable for fullMapStart so we can detect the first run + // Set a variable for fullMapStart, so we can detect the first run if ( - ( _this.settings.fullMapStart === true && openMap === false ) || - ( _this.settings.autoGeocode === true && openMap === false ) || - ( _this.settings.defaultLoc === true && openMap === false ) || - reload === true + (_this.settings.fullMapStart === true && openMap === false) || + (_this.settings.autoGeocode === true && openMap === false) || + (_this.settings.defaultLoc === true && openMap === false) ) { firstRun = true; - } - else { + } else if ( + (_this.settings.fullMapStart === true && reload === true) || + (_this.settings.autoGeocode === true && reload === true) || + (_this.settings.defaultLoc === true && reload === true) + ) { + _this.reset(); + } else { _this.reset(); } @@ -2734,8 +3513,40 @@ // Name search - using taxonomy filter to handle if (_this.settings.nameSearch === true) { - if (typeof searchInput !== 'undefined') { - filters[_this.settings.nameAttribute] = [searchInput]; + if (typeof searchInput !== 'undefined' && '' !== searchInput) { + + if (_this.settings.nameAttribute.indexOf(',')) { + nameAttrs = _this.settings.nameAttribute.split(','); + + // Multiple name attributes should swap to exclusive filtering. + if (_this.settings.exclusiveTax !== null) { + _this.settings.exclusiveTax.concat(nameAttrs); + } else { + _this.settings.exclusiveTax = nameAttrs; + } + + for (var a = 0; a < nameAttrs.length; a++) { + filters[nameAttrs[a].trim()] = [searchInput]; + } + } else { + filters[_this.settings.nameAttribute] = [searchInput]; + } + } + + // Check for a previous value. + if ( + typeof searchInput !== 'undefined' && + '' === searchInput + ) { + if (typeof nameAttrs !== 'undefined') { + for (var pa = 0; pa < nameAttrs.length; pa++) { + if (nameAttrs[pa] in filters) { + delete filters[nameAttrs[pa]]; + } + } + } else { + delete filters[_this.settings.nameAttribute]; + } } } @@ -2750,10 +3561,25 @@ if (!taxFilters[k]) { taxFilters[k] = []; } - taxFilters[k][z] = '(?=.*\\b' + filters[k][z].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '') + '\\b)'; + + // Swap pattern matching depending on name search vs. taxonomy filtering. + if (typeof nameAttrs !== 'undefined') { + if (nameAttrs.indexOf(k) !== -1) { + taxFilters[k][z] = '(?:^|\\s)' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, ''); + } else { + taxFilters[k][z] = '(?=.*' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '') + '(?!\\s))'; + } + } else { + if (k === _this.settings.nameAttribute) { + taxFilters[k][z] = '(?:^|\\s)' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, ''); + } else { + taxFilters[k][z] = '(?=.*' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '') + '(?!\\s))'; + } + } } } } + // Filter the data if (!_this.isEmptyObject(taxFilters)) { locationset = $.grep(locationset, function (val) { @@ -2764,6 +3590,23 @@ // Sorting if (_this.settings.sortBy !== null && typeof _this.settings.sortBy === 'object') { + + // Sort the multi-dimensional array by distance to get the nearest location first when enabled + if (_this.settings.openNearest === true && typeof originalOrigin !== 'undefined') { + this.sortNumerically(locationset, true); + + // Save the closest location to a variable for openNearest setting + if (typeof locationset[0] !== 'undefined') { + + if (this.settings.sortBy.hasOwnProperty('order') && this.settings.sortBy.order.toString() === 'desc') { + nearestLoc = locationset[locationset.length - 1]; + } else { + nearestLoc = locationset[0]; + } + } + } + + // Custom sorting _this.sortCustom(locationset); } else { // Sort the multi-dimensional array by distance @@ -2780,18 +3623,24 @@ } else { if (typeof locationset[0] !== 'undefined') { - if (_this.settings.distanceAlert !== -1 && locationset[0].distance > _this.settings.distanceAlert) { + if ( + _this.settings.distanceAlert !== -1 && + locationset[0].distance > _this.settings.distanceAlert && + (typeof paginationPage === 'undefined' || parseInt(paginationPage) === 1) + ) { _this.notify(_this.settings.distanceErrorAlert + _this.settings.distanceAlert + ' ' + distUnit); distError = true; } } else { + _this.emptyResult(); throw new Error('No locations found. Please check the dataLocation setting and path.'); + return; } } } - // Save the closest location to a variable for openNearest setting. + // Save the closest location to a variable for openNearest setting if (typeof locationset[0] !== 'undefined') { nearestLoc = locationset[0]; } @@ -2799,14 +3648,22 @@ // Featured locations filtering if (_this.settings.featuredLocations === true) { + // Create array for featured locations featuredset = $.grep(locationset, function (val) { - return val.featured === 'true'; + if (val.hasOwnProperty('featured')) { + return val.featured === 'true'; + } }); + // Featured location restrictions. + featuredset = _this.featuredRestrictions(mappingObject); + // Create array for normal locations normalset = $.grep(locationset, function (val) { - return val.featured !== 'true'; + if (val.hasOwnProperty('featured')) { + return val.featured !== 'true'; + } }); // Combine the arrays @@ -2814,6 +3671,15 @@ locationset = featuredset.concat(normalset); } + // Disable filter inputs if there are no locations with the values left. + if ( + (firstRun !== true && _this.settings.exclusiveFiltering === false) || + (_this.settings.fullMapStart === true && _this.settings.exclusiveFiltering === false) || + (_this.settings.defaultLoc === true && _this.settings.exclusiveFiltering === false) + ) { + _this.maybeDisableFilterOptions(); + } + // Slide in the map container if (_this.settings.slideMap === true) { $this.slideDown(); @@ -2847,12 +3713,22 @@ storeNum = _this.settings.storeLimit; } + // If fullMapStart is enabled and taxFilters is reset and name search and origin are empty, swap back to the original length. + if ( + _this.settings.fullMapStart === true && + _this.isEmptyObject(taxFilters) && + (searchInput === '' || typeof searchInput === 'undefined') && + (addressInput === '' || typeof addressInput === 'undefined') + ) { + storeNum = locationset.length; + } + // If pagination is on, change the store limit to the setting and slice the locationset array if (_this.settings.pagination === true) { storeNumToShow = _this.settings.locationsPerPage; storeStart = page * _this.settings.locationsPerPage; - if( (storeStart + storeNumToShow) > locationset.length ) { + if ( (storeStart + storeNumToShow) > locationset.length ) { storeNumToShow = _this.settings.locationsPerPage - ((storeStart + storeNumToShow) - locationset.length); } @@ -2868,7 +3744,13 @@ _this.resultsTotalCount(locationset.length); // Google maps settings - if ((_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || (_this.settings.mapSettings.zoom === 0) || (typeof origin === 'undefined') || (distError === true)) { + if ( + (_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || + (_this.settings.mapSettings.zoom === 0) || + (typeof origin === 'undefined') || + (distError === true) || + ((_this.settings.maxDistance === true && firstRun === false) && this.countFilters() > 0) + ) { myOptions = _this.settings.mapSettings; bounds = new google.maps.LatLngBounds(); } @@ -2894,13 +3776,12 @@ _this.map = new google.maps.Map(document.getElementById(_this.settings.mapID), myOptions); // Re-center the map when the browser is re-sized - google.maps.event.addDomListener(window, 'resize', function() { + window.addEventListener('resize', function() { var center = _this.map.getCenter(); google.maps.event.trigger(_this.map, 'resize'); _this.map.setCenter(center); }); - // Add map drag listener if setting is enabled and re-search on drag end if (_this.settings.dragSearch === true ) { _this.map.addListener('dragend', function() { @@ -2916,7 +3797,7 @@ _this.settings.callbackMapSet.call(this, _this.map, originPoint, originalZoom, myOptions); } - // Initialize the infowondow + // Initialize the infowindow if ( typeof InfoBubble !== 'undefined' && _this.settings.infoBubble !== null ) { var infoBubbleSettings = _this.settings.infoBubble; infoBubbleSettings.map = _this.map; @@ -2926,15 +3807,14 @@ infowindow = new google.maps.InfoWindow(); } - // Add origin marker if the setting is set _this.originMarker(_this.map, origin, originPoint); // Handle pagination - $(document).on('click.'+pluginName, '.bh-sl-pagination li', function (e) { + $(document).on('click.'+pluginName, '.bh-sl-pagination li a', function (e) { e.preventDefault(); // Run paginationChange - _this.paginationChange($(this).attr('data-page')); + _this.paginationChange($(this).parent().attr('data-page')); }); // Inline directions @@ -2953,9 +3833,37 @@ var point = new google.maps.LatLng(locationset[y].lat, locationset[y].lng); marker = _this.createMarker(point, locationset[y].name, locationset[y].address, letter, _this.map, locationset[y].category); - marker.set('id', y); + + if (_this.useLegacyMarkers()) { + marker.set('id', y); + } else { + marker.bhslID = y; + } + markers[y] = marker; - if ((_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || (_this.settings.mapSettings.zoom === 0) || (typeof origin === 'undefined') || (distError === true)) { + + // Add marker ID to location data + if (_this.useLegacyMarkers()) { + locationset[y].markerid = marker.get('id'); + } else { + locationset[y].markerid = marker.bhslID; + } + + if (this.settings.dataRaw !== null) { + for (var l = 0; l < this.settings.dataRaw.length; l++) { + if (this.settings.dataRaw[l] && this.settings.dataRaw[l].hasOwnProperty('id') && this.settings.dataRaw[l].id === locationset[y].id) { + this.settings.dataRaw[l].markerid = locationset[y].markerid; + } + } + } + + if ( + (_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || + (_this.settings.mapSettings.zoom === 0) || + (typeof origin === 'undefined') || + (distError === true) || + ((_this.settings.maxDistance === true && firstRun === false) && this.countFilters() > 0) + ) { bounds.extend(point); } // Pass variables to the pop-up infowindows @@ -2963,8 +3871,22 @@ } // Center and zoom if no origin or zoom was provided, or distance of first marker is greater than distanceAlert - if ((_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || (_this.settings.mapSettings.zoom === 0) || (typeof origin === 'undefined') || (distError === true)) { + if ( + (_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) || + (_this.settings.mapSettings.zoom === 0) || + (typeof origin === 'undefined') || + (distError === true) || + ((_this.settings.maxDistance === true && firstRun === false) && this.countFilters() > 0) + ) { _this.map.fitBounds(bounds); + + // Prevent zooming in too far after fitBounds + var zoomListener = google.maps.event.addListener(_this.map, 'idle', function() { + if (_this.map.getZoom() > 16) { + _this.map.setZoom(16); + } + google.maps.event.removeListener(zoomListener); + }); } // Create the links that focus on the related marker @@ -2972,7 +3894,13 @@ locList.empty(); // Set up the location list markup - if (firstRun && _this.settings.fullMapStartListLimit !== false && !isNaN(_this.settings.fullMapStartListLimit) && _this.settings.fullMapStartListLimit !== -1) { + if ( + firstRun && + _this.settings.fullMapStartListLimit !== false && + !isNaN(_this.settings.fullMapStartListLimit) && + _this.settings.fullMapStartListLimit !== -1 && + markers.length > _this.settings.fullMapStartListLimit + ) { for (var m = 0; m < _this.settings.fullMapStartListLimit; m++) { var currentMarker = markers[m]; _this.listSetup(currentMarker, storeStart, page); @@ -2997,9 +3925,21 @@ // Open nearest location. _this.openNearestLocation(nearestLoc, infowindow, storeStart, page); - // MarkerClusterer setup - if ( typeof MarkerClusterer !== 'undefined' && _this.settings.markerCluster !== null ) { - var markerCluster = new MarkerClusterer(_this.map, markers, _this.settings.markerCluster); + // MarkerClusterer setup. + if (_this.useLegacyMarkers()) { + if ( typeof MarkerClusterer !== 'undefined' && _this.settings.markerCluster !== null ) { + var markerCluster = new MarkerClusterer(_this.map, markers, _this.settings.markerCluster); + } + } else { + if ( typeof markerClusterer !== 'undefined' ) { + var customClustererParams = _this.settings.markerCluster; + + new markerClusterer.MarkerClusterer({ + markers, + map: _this.map, + customClustererParams + }); + } } // Handle clicks from the list @@ -3012,6 +3952,22 @@ // Visible markers list _this.visibleMarkersList(_this.map, markers); + // Fill in form values from query string parameters. + if (_this.settings.querystringParams === true) { + var $addressInput = $('#' + _this.settings.addressID); + var $searchInput = $('#' + _this.settings.searchID); + + // Address field. + if (typeof mappingObj !== 'undefined' && mappingObj.hasOwnProperty('origin') && $addressInput.val() === '') { + $addressInput.val(mappingObj.origin); + } + + // Name search field. + if (typeof mappingObj !== 'undefined' && mappingObj.hasOwnProperty('name') && $searchInput.val() === '') { + $searchInput.val(mappingObj.name); + } + } + // Modal ready callback if (_this.settings.modal === true && _this.settings.callbackModalReady) { _this.settings.callbackModalReady.call(this, mappingObject); diff --git a/src/templates/kml/kml-infowindow-description.html b/src/templates/kml/kml-infowindow-description.html index bf408a2..afababf 100644 --- a/src/templates/kml/kml-infowindow-description.html +++ b/src/templates/kml/kml-infowindow-description.html @@ -1,4 +1,6 @@ {{#location}}
      {{name}}
      -
      {{{description}}}
      -{{/location}} \ No newline at end of file +{{#if description}} +
      {{{description}}}
      +{{/if}} +{{/location}} diff --git a/src/templates/kml/kml-location-list-description.html b/src/templates/kml/kml-location-list-description.html index 17fe9bd..aeaa7ec 100644 --- a/src/templates/kml/kml-location-list-description.html +++ b/src/templates/kml/kml-location-list-description.html @@ -4,8 +4,10 @@
      {{name}}
      -
      {{{description}}}
      + {{#if description}} +
      {{{description}}}
      + {{/if}}
      -{{/location}} \ No newline at end of file +{{/location}} diff --git a/src/templates/standard/infowindow-description.html b/src/templates/standard/infowindow-description.html index d634f71..5981a26 100644 --- a/src/templates/standard/infowindow-description.html +++ b/src/templates/standard/infowindow-description.html @@ -1,11 +1,21 @@ {{#location}}
      {{name}}
      {{address}}
      -
      {{address2}}
      +{{#if address2}} +
      {{address2}}
      +{{/if}}
      {{city}}{{#if city}},{{/if}} {{state}} {{postal}}
      -
      {{hours1}}
      -
      {{hours2}}
      -
      {{hours3}}
      -
      {{phone}}
      +{{#if hours1}} +
      {{hours1}}
      +{{/if}} +{{#if hours2}} +
      {{hours2}}
      +{{/if}} +{{#if hours3}} +
      {{hours3}}
      +{{/if}} +{{#if phone}} +
      {{phone}}
      +{{/if}} -{{/location}} \ No newline at end of file +{{/location}} diff --git a/src/templates/standard/location-list-description.html b/src/templates/standard/location-list-description.html index e2b7d15..ab1f455 100644 --- a/src/templates/standard/location-list-description.html +++ b/src/templates/standard/location-list-description.html @@ -4,16 +4,23 @@
      {{name}}
      -
      {{address}}
      -
      {{address2}}
      +
      {{address}}
      + {{#if address2}} +
      {{address2}}
      + {{/if}}
      {{city}}{{#if city}},{{/if}} {{state}} {{postal}}
      -
      {{phone}}
      - + {{#if phone}} +
      {{phone}}
      + {{/if}} + {{#if web}} + + {{/if}} {{#if distance}} -
      {{distance}} {{length}}
      - +
      {{distance}} {{length}}
      + {{#if altdistance}}
      {{altdistance}} {{altlength}}
      {{/if}} + {{/if}}
      -{{/location}} \ No newline at end of file +{{/location}} diff --git a/storelocator.jquery.json b/storelocator.jquery.json index d42d337..980b344 100644 --- a/storelocator.jquery.json +++ b/storelocator.jquery.json @@ -3,10 +3,10 @@ "title": "jQuery Google Maps Store Locator", "description": "This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information.", "keywords": ["jquery","locator","store","dealer","location", "locations", "maps", "map", "stores", "find"], - "version": "3.0.1", + "version": "3.4.1", "author": { "name": "Bjorn Holine", - "url": "http://www.bjornblog.com/" + "url": "https://www.bjornblog.com/" }, "repository": { "type": "git", diff --git a/test/storeLocator.html b/test/storeLocator.html index a9f7469..c6d9f83 100644 --- a/test/storeLocator.html +++ b/test/storeLocator.html @@ -1,16 +1,16 @@ - + jQuery Google Maps Store Locator Plugin Test Suite - + - +