modified for selfhosting, new umami token
Some checks are pending
Render and Publish / build-deploy (push) Waiting to run
Some checks are pending
Render and Publish / build-deploy (push) Waiting to run
This commit is contained in:
parent
ceedc35709
commit
0de1594d56
76 changed files with 29 additions and 30 deletions
272
_site/site_libs/Proj4Leaflet-1.0.1/proj4leaflet.js
Normal file
272
_site/site_libs/Proj4Leaflet-1.0.1/proj4leaflet.js
Normal file
|
|
@ -0,0 +1,272 @@
|
|||
(function (factory) {
|
||||
var L, proj4;
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD
|
||||
define(['leaflet', 'proj4'], factory);
|
||||
} else if (typeof module === 'object' && typeof module.exports === "object") {
|
||||
// Node/CommonJS
|
||||
L = require('leaflet');
|
||||
proj4 = require('proj4');
|
||||
module.exports = factory(L, proj4);
|
||||
} else {
|
||||
// Browser globals
|
||||
if (typeof window.L === 'undefined' || typeof window.proj4 === 'undefined')
|
||||
throw 'Leaflet and proj4 must be loaded first';
|
||||
factory(window.L, window.proj4);
|
||||
}
|
||||
}(function (L, proj4) {
|
||||
if (proj4.__esModule && proj4.default) {
|
||||
// If proj4 was bundled as an ES6 module, unwrap it to get
|
||||
// to the actual main proj4 object.
|
||||
// See discussion in https://github.com/kartena/Proj4Leaflet/pull/147
|
||||
proj4 = proj4.default;
|
||||
}
|
||||
|
||||
L.Proj = {};
|
||||
|
||||
L.Proj._isProj4Obj = function(a) {
|
||||
return (typeof a.inverse !== 'undefined' &&
|
||||
typeof a.forward !== 'undefined');
|
||||
};
|
||||
|
||||
L.Proj.Projection = L.Class.extend({
|
||||
initialize: function(code, def, bounds) {
|
||||
var isP4 = L.Proj._isProj4Obj(code);
|
||||
this._proj = isP4 ? code : this._projFromCodeDef(code, def);
|
||||
this.bounds = isP4 ? def : bounds;
|
||||
},
|
||||
|
||||
project: function (latlng) {
|
||||
var point = this._proj.forward([latlng.lng, latlng.lat]);
|
||||
return new L.Point(point[0], point[1]);
|
||||
},
|
||||
|
||||
unproject: function (point, unbounded) {
|
||||
var point2 = this._proj.inverse([point.x, point.y]);
|
||||
return new L.LatLng(point2[1], point2[0], unbounded);
|
||||
},
|
||||
|
||||
_projFromCodeDef: function(code, def) {
|
||||
if (def) {
|
||||
proj4.defs(code, def);
|
||||
} else if (proj4.defs[code] === undefined) {
|
||||
var urn = code.split(':');
|
||||
if (urn.length > 3) {
|
||||
code = urn[urn.length - 3] + ':' + urn[urn.length - 1];
|
||||
}
|
||||
if (proj4.defs[code] === undefined) {
|
||||
throw 'No projection definition for code ' + code;
|
||||
}
|
||||
}
|
||||
|
||||
return proj4(code);
|
||||
}
|
||||
});
|
||||
|
||||
L.Proj.CRS = L.Class.extend({
|
||||
includes: L.CRS,
|
||||
|
||||
options: {
|
||||
transformation: new L.Transformation(1, 0, -1, 0)
|
||||
},
|
||||
|
||||
initialize: function(a, b, c) {
|
||||
var code,
|
||||
proj,
|
||||
def,
|
||||
options;
|
||||
|
||||
if (L.Proj._isProj4Obj(a)) {
|
||||
proj = a;
|
||||
code = proj.srsCode;
|
||||
options = b || {};
|
||||
|
||||
this.projection = new L.Proj.Projection(proj, options.bounds);
|
||||
} else {
|
||||
code = a;
|
||||
def = b;
|
||||
options = c || {};
|
||||
this.projection = new L.Proj.Projection(code, def, options.bounds);
|
||||
}
|
||||
|
||||
L.Util.setOptions(this, options);
|
||||
this.code = code;
|
||||
this.transformation = this.options.transformation;
|
||||
|
||||
if (this.options.origin) {
|
||||
this.transformation =
|
||||
new L.Transformation(1, -this.options.origin[0],
|
||||
-1, this.options.origin[1]);
|
||||
}
|
||||
|
||||
if (this.options.scales) {
|
||||
this._scales = this.options.scales;
|
||||
} else if (this.options.resolutions) {
|
||||
this._scales = [];
|
||||
for (var i = this.options.resolutions.length - 1; i >= 0; i--) {
|
||||
if (this.options.resolutions[i]) {
|
||||
this._scales[i] = 1 / this.options.resolutions[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.infinite = !this.options.bounds;
|
||||
|
||||
},
|
||||
|
||||
scale: function(zoom) {
|
||||
var iZoom = Math.floor(zoom),
|
||||
baseScale,
|
||||
nextScale,
|
||||
scaleDiff,
|
||||
zDiff;
|
||||
if (zoom === iZoom) {
|
||||
return this._scales[zoom];
|
||||
} else {
|
||||
// Non-integer zoom, interpolate
|
||||
baseScale = this._scales[iZoom];
|
||||
nextScale = this._scales[iZoom + 1];
|
||||
scaleDiff = nextScale - baseScale;
|
||||
zDiff = (zoom - iZoom);
|
||||
return baseScale + scaleDiff * zDiff;
|
||||
}
|
||||
},
|
||||
|
||||
zoom: function(scale) {
|
||||
// Find closest number in this._scales, down
|
||||
var downScale = this._closestElement(this._scales, scale),
|
||||
downZoom = this._scales.indexOf(downScale),
|
||||
nextScale,
|
||||
nextZoom,
|
||||
scaleDiff;
|
||||
// Check if scale is downScale => return array index
|
||||
if (scale === downScale) {
|
||||
return downZoom;
|
||||
}
|
||||
if (downScale === undefined) {
|
||||
return -Infinity;
|
||||
}
|
||||
// Interpolate
|
||||
nextZoom = downZoom + 1;
|
||||
nextScale = this._scales[nextZoom];
|
||||
if (nextScale === undefined) {
|
||||
return Infinity;
|
||||
}
|
||||
scaleDiff = nextScale - downScale;
|
||||
return (scale - downScale) / scaleDiff + downZoom;
|
||||
},
|
||||
|
||||
distance: L.CRS.Earth.distance,
|
||||
|
||||
R: L.CRS.Earth.R,
|
||||
|
||||
/* Get the closest lowest element in an array */
|
||||
_closestElement: function(array, element) {
|
||||
var low;
|
||||
for (var i = array.length; i--;) {
|
||||
if (array[i] <= element && (low === undefined || low < array[i])) {
|
||||
low = array[i];
|
||||
}
|
||||
}
|
||||
return low;
|
||||
}
|
||||
});
|
||||
|
||||
L.Proj.GeoJSON = L.GeoJSON.extend({
|
||||
initialize: function(geojson, options) {
|
||||
this._callLevel = 0;
|
||||
L.GeoJSON.prototype.initialize.call(this, geojson, options);
|
||||
},
|
||||
|
||||
addData: function(geojson) {
|
||||
var crs;
|
||||
|
||||
if (geojson) {
|
||||
if (geojson.crs && geojson.crs.type === 'name') {
|
||||
crs = new L.Proj.CRS(geojson.crs.properties.name);
|
||||
} else if (geojson.crs && geojson.crs.type) {
|
||||
crs = new L.Proj.CRS(geojson.crs.type + ':' + geojson.crs.properties.code);
|
||||
}
|
||||
|
||||
if (crs !== undefined) {
|
||||
this.options.coordsToLatLng = function(coords) {
|
||||
var point = L.point(coords[0], coords[1]);
|
||||
return crs.projection.unproject(point);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Base class' addData might call us recursively, but
|
||||
// CRS shouldn't be cleared in that case, since CRS applies
|
||||
// to the whole GeoJSON, inluding sub-features.
|
||||
this._callLevel++;
|
||||
try {
|
||||
L.GeoJSON.prototype.addData.call(this, geojson);
|
||||
} finally {
|
||||
this._callLevel--;
|
||||
if (this._callLevel === 0) {
|
||||
delete this.options.coordsToLatLng;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
L.Proj.geoJson = function(geojson, options) {
|
||||
return new L.Proj.GeoJSON(geojson, options);
|
||||
};
|
||||
|
||||
L.Proj.ImageOverlay = L.ImageOverlay.extend({
|
||||
initialize: function (url, bounds, options) {
|
||||
L.ImageOverlay.prototype.initialize.call(this, url, null, options);
|
||||
this._projectedBounds = bounds;
|
||||
},
|
||||
|
||||
// Danger ahead: Overriding internal methods in Leaflet.
|
||||
// Decided to do this rather than making a copy of L.ImageOverlay
|
||||
// and doing very tiny modifications to it.
|
||||
// Future will tell if this was wise or not.
|
||||
_animateZoom: function (event) {
|
||||
var scale = this._map.getZoomScale(event.zoom);
|
||||
var northWest = L.point(this._projectedBounds.min.x, this._projectedBounds.max.y);
|
||||
var offset = this._projectedToNewLayerPoint(northWest, event.zoom, event.center);
|
||||
|
||||
L.DomUtil.setTransform(this._image, offset, scale);
|
||||
},
|
||||
|
||||
_reset: function () {
|
||||
var zoom = this._map.getZoom();
|
||||
var pixelOrigin = this._map.getPixelOrigin();
|
||||
var bounds = L.bounds(
|
||||
this._transform(this._projectedBounds.min, zoom)._subtract(pixelOrigin),
|
||||
this._transform(this._projectedBounds.max, zoom)._subtract(pixelOrigin)
|
||||
);
|
||||
var size = bounds.getSize();
|
||||
|
||||
L.DomUtil.setPosition(this._image, bounds.min);
|
||||
this._image.style.width = size.x + 'px';
|
||||
this._image.style.height = size.y + 'px';
|
||||
},
|
||||
|
||||
_projectedToNewLayerPoint: function (point, zoom, center) {
|
||||
var viewHalf = this._map.getSize()._divideBy(2);
|
||||
var newTopLeft = this._map.project(center, zoom)._subtract(viewHalf)._round();
|
||||
var topLeft = newTopLeft.add(this._map._getMapPanePos());
|
||||
|
||||
return this._transform(point, zoom)._subtract(topLeft);
|
||||
},
|
||||
|
||||
_transform: function (point, zoom) {
|
||||
var crs = this._map.options.crs;
|
||||
var transformation = crs.transformation;
|
||||
var scale = crs.scale(zoom);
|
||||
|
||||
return transformation.transform(point, scale);
|
||||
}
|
||||
});
|
||||
|
||||
L.Proj.imageOverlay = function (url, bounds, options) {
|
||||
return new L.Proj.ImageOverlay(url, bounds, options);
|
||||
};
|
||||
|
||||
return L.Proj;
|
||||
}));
|
||||
12
_site/site_libs/bootstrap/bootstrap-dark.min.css
vendored
Normal file
12
_site/site_libs/bootstrap/bootstrap-dark.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2078
_site/site_libs/bootstrap/bootstrap-icons.css
vendored
Normal file
2078
_site/site_libs/bootstrap/bootstrap-icons.css
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
_site/site_libs/bootstrap/bootstrap-icons.woff
Normal file
BIN
_site/site_libs/bootstrap/bootstrap-icons.woff
Normal file
Binary file not shown.
12
_site/site_libs/bootstrap/bootstrap.min.css
vendored
Normal file
12
_site/site_libs/bootstrap/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
_site/site_libs/bootstrap/bootstrap.min.js
vendored
Normal file
7
_site/site_libs/bootstrap/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
_site/site_libs/clipboard/clipboard.min.js
vendored
Normal file
7
_site/site_libs/clipboard/clipboard.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
901
_site/site_libs/htmlwidgets-1.6.2/htmlwidgets.js
Normal file
901
_site/site_libs/htmlwidgets-1.6.2/htmlwidgets.js
Normal file
|
|
@ -0,0 +1,901 @@
|
|||
(function() {
|
||||
// If window.HTMLWidgets is already defined, then use it; otherwise create a
|
||||
// new object. This allows preceding code to set options that affect the
|
||||
// initialization process (though none currently exist).
|
||||
window.HTMLWidgets = window.HTMLWidgets || {};
|
||||
|
||||
// See if we're running in a viewer pane. If not, we're in a web browser.
|
||||
var viewerMode = window.HTMLWidgets.viewerMode =
|
||||
/\bviewer_pane=1\b/.test(window.location);
|
||||
|
||||
// See if we're running in Shiny mode. If not, it's a static document.
|
||||
// Note that static widgets can appear in both Shiny and static modes, but
|
||||
// obviously, Shiny widgets can only appear in Shiny apps/documents.
|
||||
var shinyMode = window.HTMLWidgets.shinyMode =
|
||||
typeof(window.Shiny) !== "undefined" && !!window.Shiny.outputBindings;
|
||||
|
||||
// We can't count on jQuery being available, so we implement our own
|
||||
// version if necessary.
|
||||
function querySelectorAll(scope, selector) {
|
||||
if (typeof(jQuery) !== "undefined" && scope instanceof jQuery) {
|
||||
return scope.find(selector);
|
||||
}
|
||||
if (scope.querySelectorAll) {
|
||||
return scope.querySelectorAll(selector);
|
||||
}
|
||||
}
|
||||
|
||||
function asArray(value) {
|
||||
if (value === null)
|
||||
return [];
|
||||
if ($.isArray(value))
|
||||
return value;
|
||||
return [value];
|
||||
}
|
||||
|
||||
// Implement jQuery's extend
|
||||
function extend(target /*, ... */) {
|
||||
if (arguments.length == 1) {
|
||||
return target;
|
||||
}
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var prop in source) {
|
||||
if (source.hasOwnProperty(prop)) {
|
||||
target[prop] = source[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
// IE8 doesn't support Array.forEach.
|
||||
function forEach(values, callback, thisArg) {
|
||||
if (values.forEach) {
|
||||
values.forEach(callback, thisArg);
|
||||
} else {
|
||||
for (var i = 0; i < values.length; i++) {
|
||||
callback.call(thisArg, values[i], i, values);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Replaces the specified method with the return value of funcSource.
|
||||
//
|
||||
// Note that funcSource should not BE the new method, it should be a function
|
||||
// that RETURNS the new method. funcSource receives a single argument that is
|
||||
// the overridden method, it can be called from the new method. The overridden
|
||||
// method can be called like a regular function, it has the target permanently
|
||||
// bound to it so "this" will work correctly.
|
||||
function overrideMethod(target, methodName, funcSource) {
|
||||
var superFunc = target[methodName] || function() {};
|
||||
var superFuncBound = function() {
|
||||
return superFunc.apply(target, arguments);
|
||||
};
|
||||
target[methodName] = funcSource(superFuncBound);
|
||||
}
|
||||
|
||||
// Add a method to delegator that, when invoked, calls
|
||||
// delegatee.methodName. If there is no such method on
|
||||
// the delegatee, but there was one on delegator before
|
||||
// delegateMethod was called, then the original version
|
||||
// is invoked instead.
|
||||
// For example:
|
||||
//
|
||||
// var a = {
|
||||
// method1: function() { console.log('a1'); }
|
||||
// method2: function() { console.log('a2'); }
|
||||
// };
|
||||
// var b = {
|
||||
// method1: function() { console.log('b1'); }
|
||||
// };
|
||||
// delegateMethod(a, b, "method1");
|
||||
// delegateMethod(a, b, "method2");
|
||||
// a.method1();
|
||||
// a.method2();
|
||||
//
|
||||
// The output would be "b1", "a2".
|
||||
function delegateMethod(delegator, delegatee, methodName) {
|
||||
var inherited = delegator[methodName];
|
||||
delegator[methodName] = function() {
|
||||
var target = delegatee;
|
||||
var method = delegatee[methodName];
|
||||
|
||||
// The method doesn't exist on the delegatee. Instead,
|
||||
// call the method on the delegator, if it exists.
|
||||
if (!method) {
|
||||
target = delegator;
|
||||
method = inherited;
|
||||
}
|
||||
|
||||
if (method) {
|
||||
return method.apply(target, arguments);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Implement a vague facsimilie of jQuery's data method
|
||||
function elementData(el, name, value) {
|
||||
if (arguments.length == 2) {
|
||||
return el["htmlwidget_data_" + name];
|
||||
} else if (arguments.length == 3) {
|
||||
el["htmlwidget_data_" + name] = value;
|
||||
return el;
|
||||
} else {
|
||||
throw new Error("Wrong number of arguments for elementData: " +
|
||||
arguments.length);
|
||||
}
|
||||
}
|
||||
|
||||
// http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
|
||||
function escapeRegExp(str) {
|
||||
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
||||
}
|
||||
|
||||
function hasClass(el, className) {
|
||||
var re = new RegExp("\\b" + escapeRegExp(className) + "\\b");
|
||||
return re.test(el.className);
|
||||
}
|
||||
|
||||
// elements - array (or array-like object) of HTML elements
|
||||
// className - class name to test for
|
||||
// include - if true, only return elements with given className;
|
||||
// if false, only return elements *without* given className
|
||||
function filterByClass(elements, className, include) {
|
||||
var results = [];
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
if (hasClass(elements[i], className) == include)
|
||||
results.push(elements[i]);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
function on(obj, eventName, func) {
|
||||
if (obj.addEventListener) {
|
||||
obj.addEventListener(eventName, func, false);
|
||||
} else if (obj.attachEvent) {
|
||||
obj.attachEvent(eventName, func);
|
||||
}
|
||||
}
|
||||
|
||||
function off(obj, eventName, func) {
|
||||
if (obj.removeEventListener)
|
||||
obj.removeEventListener(eventName, func, false);
|
||||
else if (obj.detachEvent) {
|
||||
obj.detachEvent(eventName, func);
|
||||
}
|
||||
}
|
||||
|
||||
// Translate array of values to top/right/bottom/left, as usual with
|
||||
// the "padding" CSS property
|
||||
// https://developer.mozilla.org/en-US/docs/Web/CSS/padding
|
||||
function unpackPadding(value) {
|
||||
if (typeof(value) === "number")
|
||||
value = [value];
|
||||
if (value.length === 1) {
|
||||
return {top: value[0], right: value[0], bottom: value[0], left: value[0]};
|
||||
}
|
||||
if (value.length === 2) {
|
||||
return {top: value[0], right: value[1], bottom: value[0], left: value[1]};
|
||||
}
|
||||
if (value.length === 3) {
|
||||
return {top: value[0], right: value[1], bottom: value[2], left: value[1]};
|
||||
}
|
||||
if (value.length === 4) {
|
||||
return {top: value[0], right: value[1], bottom: value[2], left: value[3]};
|
||||
}
|
||||
}
|
||||
|
||||
// Convert an unpacked padding object to a CSS value
|
||||
function paddingToCss(paddingObj) {
|
||||
return paddingObj.top + "px " + paddingObj.right + "px " + paddingObj.bottom + "px " + paddingObj.left + "px";
|
||||
}
|
||||
|
||||
// Makes a number suitable for CSS
|
||||
function px(x) {
|
||||
if (typeof(x) === "number")
|
||||
return x + "px";
|
||||
else
|
||||
return x;
|
||||
}
|
||||
|
||||
// Retrieves runtime widget sizing information for an element.
|
||||
// The return value is either null, or an object with fill, padding,
|
||||
// defaultWidth, defaultHeight fields.
|
||||
function sizingPolicy(el) {
|
||||
var sizingEl = document.querySelector("script[data-for='" + el.id + "'][type='application/htmlwidget-sizing']");
|
||||
if (!sizingEl)
|
||||
return null;
|
||||
var sp = JSON.parse(sizingEl.textContent || sizingEl.text || "{}");
|
||||
if (viewerMode) {
|
||||
return sp.viewer;
|
||||
} else {
|
||||
return sp.browser;
|
||||
}
|
||||
}
|
||||
|
||||
// @param tasks Array of strings (or falsy value, in which case no-op).
|
||||
// Each element must be a valid JavaScript expression that yields a
|
||||
// function. Or, can be an array of objects with "code" and "data"
|
||||
// properties; in this case, the "code" property should be a string
|
||||
// of JS that's an expr that yields a function, and "data" should be
|
||||
// an object that will be added as an additional argument when that
|
||||
// function is called.
|
||||
// @param target The object that will be "this" for each function
|
||||
// execution.
|
||||
// @param args Array of arguments to be passed to the functions. (The
|
||||
// same arguments will be passed to all functions.)
|
||||
function evalAndRun(tasks, target, args) {
|
||||
if (tasks) {
|
||||
forEach(tasks, function(task) {
|
||||
var theseArgs = args;
|
||||
if (typeof(task) === "object") {
|
||||
theseArgs = theseArgs.concat([task.data]);
|
||||
task = task.code;
|
||||
}
|
||||
var taskFunc = tryEval(task);
|
||||
if (typeof(taskFunc) !== "function") {
|
||||
throw new Error("Task must be a function! Source:\n" + task);
|
||||
}
|
||||
taskFunc.apply(target, theseArgs);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Attempt eval() both with and without enclosing in parentheses.
|
||||
// Note that enclosing coerces a function declaration into
|
||||
// an expression that eval() can parse
|
||||
// (otherwise, a SyntaxError is thrown)
|
||||
function tryEval(code) {
|
||||
var result = null;
|
||||
try {
|
||||
result = eval("(" + code + ")");
|
||||
} catch(error) {
|
||||
if (!(error instanceof SyntaxError)) {
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
result = eval(code);
|
||||
} catch(e) {
|
||||
if (e instanceof SyntaxError) {
|
||||
throw error;
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function initSizing(el) {
|
||||
var sizing = sizingPolicy(el);
|
||||
if (!sizing)
|
||||
return;
|
||||
|
||||
var cel = document.getElementById("htmlwidget_container");
|
||||
if (!cel)
|
||||
return;
|
||||
|
||||
if (typeof(sizing.padding) !== "undefined") {
|
||||
document.body.style.margin = "0";
|
||||
document.body.style.padding = paddingToCss(unpackPadding(sizing.padding));
|
||||
}
|
||||
|
||||
if (sizing.fill) {
|
||||
document.body.style.overflow = "hidden";
|
||||
document.body.style.width = "100%";
|
||||
document.body.style.height = "100%";
|
||||
document.documentElement.style.width = "100%";
|
||||
document.documentElement.style.height = "100%";
|
||||
cel.style.position = "absolute";
|
||||
var pad = unpackPadding(sizing.padding);
|
||||
cel.style.top = pad.top + "px";
|
||||
cel.style.right = pad.right + "px";
|
||||
cel.style.bottom = pad.bottom + "px";
|
||||
cel.style.left = pad.left + "px";
|
||||
el.style.width = "100%";
|
||||
el.style.height = "100%";
|
||||
|
||||
return {
|
||||
getWidth: function() { return cel.getBoundingClientRect().width; },
|
||||
getHeight: function() { return cel.getBoundingClientRect().height; }
|
||||
};
|
||||
|
||||
} else {
|
||||
el.style.width = px(sizing.width);
|
||||
el.style.height = px(sizing.height);
|
||||
|
||||
return {
|
||||
getWidth: function() { return cel.getBoundingClientRect().width; },
|
||||
getHeight: function() { return cel.getBoundingClientRect().height; }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Default implementations for methods
|
||||
var defaults = {
|
||||
find: function(scope) {
|
||||
return querySelectorAll(scope, "." + this.name);
|
||||
},
|
||||
renderError: function(el, err) {
|
||||
var $el = $(el);
|
||||
|
||||
this.clearError(el);
|
||||
|
||||
// Add all these error classes, as Shiny does
|
||||
var errClass = "shiny-output-error";
|
||||
if (err.type !== null) {
|
||||
// use the classes of the error condition as CSS class names
|
||||
errClass = errClass + " " + $.map(asArray(err.type), function(type) {
|
||||
return errClass + "-" + type;
|
||||
}).join(" ");
|
||||
}
|
||||
errClass = errClass + " htmlwidgets-error";
|
||||
|
||||
// Is el inline or block? If inline or inline-block, just display:none it
|
||||
// and add an inline error.
|
||||
var display = $el.css("display");
|
||||
$el.data("restore-display-mode", display);
|
||||
|
||||
if (display === "inline" || display === "inline-block") {
|
||||
$el.hide();
|
||||
if (err.message !== "") {
|
||||
var errorSpan = $("<span>").addClass(errClass);
|
||||
errorSpan.text(err.message);
|
||||
$el.after(errorSpan);
|
||||
}
|
||||
} else if (display === "block") {
|
||||
// If block, add an error just after the el, set visibility:none on the
|
||||
// el, and position the error to be on top of the el.
|
||||
// Mark it with a unique ID and CSS class so we can remove it later.
|
||||
$el.css("visibility", "hidden");
|
||||
if (err.message !== "") {
|
||||
var errorDiv = $("<div>").addClass(errClass).css("position", "absolute")
|
||||
.css("top", el.offsetTop)
|
||||
.css("left", el.offsetLeft)
|
||||
// setting width can push out the page size, forcing otherwise
|
||||
// unnecessary scrollbars to appear and making it impossible for
|
||||
// the element to shrink; so use max-width instead
|
||||
.css("maxWidth", el.offsetWidth)
|
||||
.css("height", el.offsetHeight);
|
||||
errorDiv.text(err.message);
|
||||
$el.after(errorDiv);
|
||||
|
||||
// Really dumb way to keep the size/position of the error in sync with
|
||||
// the parent element as the window is resized or whatever.
|
||||
var intId = setInterval(function() {
|
||||
if (!errorDiv[0].parentElement) {
|
||||
clearInterval(intId);
|
||||
return;
|
||||
}
|
||||
errorDiv
|
||||
.css("top", el.offsetTop)
|
||||
.css("left", el.offsetLeft)
|
||||
.css("maxWidth", el.offsetWidth)
|
||||
.css("height", el.offsetHeight);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
},
|
||||
clearError: function(el) {
|
||||
var $el = $(el);
|
||||
var display = $el.data("restore-display-mode");
|
||||
$el.data("restore-display-mode", null);
|
||||
|
||||
if (display === "inline" || display === "inline-block") {
|
||||
if (display)
|
||||
$el.css("display", display);
|
||||
$(el.nextSibling).filter(".htmlwidgets-error").remove();
|
||||
} else if (display === "block"){
|
||||
$el.css("visibility", "inherit");
|
||||
$(el.nextSibling).filter(".htmlwidgets-error").remove();
|
||||
}
|
||||
},
|
||||
sizing: {}
|
||||
};
|
||||
|
||||
// Called by widget bindings to register a new type of widget. The definition
|
||||
// object can contain the following properties:
|
||||
// - name (required) - A string indicating the binding name, which will be
|
||||
// used by default as the CSS classname to look for.
|
||||
// - initialize (optional) - A function(el) that will be called once per
|
||||
// widget element; if a value is returned, it will be passed as the third
|
||||
// value to renderValue.
|
||||
// - renderValue (required) - A function(el, data, initValue) that will be
|
||||
// called with data. Static contexts will cause this to be called once per
|
||||
// element; Shiny apps will cause this to be called multiple times per
|
||||
// element, as the data changes.
|
||||
window.HTMLWidgets.widget = function(definition) {
|
||||
if (!definition.name) {
|
||||
throw new Error("Widget must have a name");
|
||||
}
|
||||
if (!definition.type) {
|
||||
throw new Error("Widget must have a type");
|
||||
}
|
||||
// Currently we only support output widgets
|
||||
if (definition.type !== "output") {
|
||||
throw new Error("Unrecognized widget type '" + definition.type + "'");
|
||||
}
|
||||
// TODO: Verify that .name is a valid CSS classname
|
||||
|
||||
// Support new-style instance-bound definitions. Old-style class-bound
|
||||
// definitions have one widget "object" per widget per type/class of
|
||||
// widget; the renderValue and resize methods on such widget objects
|
||||
// take el and instance arguments, because the widget object can't
|
||||
// store them. New-style instance-bound definitions have one widget
|
||||
// object per widget instance; the definition that's passed in doesn't
|
||||
// provide renderValue or resize methods at all, just the single method
|
||||
// factory(el, width, height)
|
||||
// which returns an object that has renderValue(x) and resize(w, h).
|
||||
// This enables a far more natural programming style for the widget
|
||||
// author, who can store per-instance state using either OO-style
|
||||
// instance fields or functional-style closure variables (I guess this
|
||||
// is in contrast to what can only be called C-style pseudo-OO which is
|
||||
// what we required before).
|
||||
if (definition.factory) {
|
||||
definition = createLegacyDefinitionAdapter(definition);
|
||||
}
|
||||
|
||||
if (!definition.renderValue) {
|
||||
throw new Error("Widget must have a renderValue function");
|
||||
}
|
||||
|
||||
// For static rendering (non-Shiny), use a simple widget registration
|
||||
// scheme. We also use this scheme for Shiny apps/documents that also
|
||||
// contain static widgets.
|
||||
window.HTMLWidgets.widgets = window.HTMLWidgets.widgets || [];
|
||||
// Merge defaults into the definition; don't mutate the original definition.
|
||||
var staticBinding = extend({}, defaults, definition);
|
||||
overrideMethod(staticBinding, "find", function(superfunc) {
|
||||
return function(scope) {
|
||||
var results = superfunc(scope);
|
||||
// Filter out Shiny outputs, we only want the static kind
|
||||
return filterByClass(results, "html-widget-output", false);
|
||||
};
|
||||
});
|
||||
window.HTMLWidgets.widgets.push(staticBinding);
|
||||
|
||||
if (shinyMode) {
|
||||
// Shiny is running. Register the definition with an output binding.
|
||||
// The definition itself will not be the output binding, instead
|
||||
// we will make an output binding object that delegates to the
|
||||
// definition. This is because we foolishly used the same method
|
||||
// name (renderValue) for htmlwidgets definition and Shiny bindings
|
||||
// but they actually have quite different semantics (the Shiny
|
||||
// bindings receive data that includes lots of metadata that it
|
||||
// strips off before calling htmlwidgets renderValue). We can't
|
||||
// just ignore the difference because in some widgets it's helpful
|
||||
// to call this.renderValue() from inside of resize(), and if
|
||||
// we're not delegating, then that call will go to the Shiny
|
||||
// version instead of the htmlwidgets version.
|
||||
|
||||
// Merge defaults with definition, without mutating either.
|
||||
var bindingDef = extend({}, defaults, definition);
|
||||
|
||||
// This object will be our actual Shiny binding.
|
||||
var shinyBinding = new Shiny.OutputBinding();
|
||||
|
||||
// With a few exceptions, we'll want to simply use the bindingDef's
|
||||
// version of methods if they are available, otherwise fall back to
|
||||
// Shiny's defaults. NOTE: If Shiny's output bindings gain additional
|
||||
// methods in the future, and we want them to be overrideable by
|
||||
// HTMLWidget binding definitions, then we'll need to add them to this
|
||||
// list.
|
||||
delegateMethod(shinyBinding, bindingDef, "getId");
|
||||
delegateMethod(shinyBinding, bindingDef, "onValueChange");
|
||||
delegateMethod(shinyBinding, bindingDef, "onValueError");
|
||||
delegateMethod(shinyBinding, bindingDef, "renderError");
|
||||
delegateMethod(shinyBinding, bindingDef, "clearError");
|
||||
delegateMethod(shinyBinding, bindingDef, "showProgress");
|
||||
|
||||
// The find, renderValue, and resize are handled differently, because we
|
||||
// want to actually decorate the behavior of the bindingDef methods.
|
||||
|
||||
shinyBinding.find = function(scope) {
|
||||
var results = bindingDef.find(scope);
|
||||
|
||||
// Only return elements that are Shiny outputs, not static ones
|
||||
var dynamicResults = results.filter(".html-widget-output");
|
||||
|
||||
// It's possible that whatever caused Shiny to think there might be
|
||||
// new dynamic outputs, also caused there to be new static outputs.
|
||||
// Since there might be lots of different htmlwidgets bindings, we
|
||||
// schedule execution for later--no need to staticRender multiple
|
||||
// times.
|
||||
if (results.length !== dynamicResults.length)
|
||||
scheduleStaticRender();
|
||||
|
||||
return dynamicResults;
|
||||
};
|
||||
|
||||
// Wrap renderValue to handle initialization, which unfortunately isn't
|
||||
// supported natively by Shiny at the time of this writing.
|
||||
|
||||
shinyBinding.renderValue = function(el, data) {
|
||||
Shiny.renderDependencies(data.deps);
|
||||
// Resolve strings marked as javascript literals to objects
|
||||
if (!(data.evals instanceof Array)) data.evals = [data.evals];
|
||||
for (var i = 0; data.evals && i < data.evals.length; i++) {
|
||||
window.HTMLWidgets.evaluateStringMember(data.x, data.evals[i]);
|
||||
}
|
||||
if (!bindingDef.renderOnNullValue) {
|
||||
if (data.x === null) {
|
||||
el.style.visibility = "hidden";
|
||||
return;
|
||||
} else {
|
||||
el.style.visibility = "inherit";
|
||||
}
|
||||
}
|
||||
if (!elementData(el, "initialized")) {
|
||||
initSizing(el);
|
||||
|
||||
elementData(el, "initialized", true);
|
||||
if (bindingDef.initialize) {
|
||||
var rect = el.getBoundingClientRect();
|
||||
var result = bindingDef.initialize(el, rect.width, rect.height);
|
||||
elementData(el, "init_result", result);
|
||||
}
|
||||
}
|
||||
bindingDef.renderValue(el, data.x, elementData(el, "init_result"));
|
||||
evalAndRun(data.jsHooks.render, elementData(el, "init_result"), [el, data.x]);
|
||||
};
|
||||
|
||||
// Only override resize if bindingDef implements it
|
||||
if (bindingDef.resize) {
|
||||
shinyBinding.resize = function(el, width, height) {
|
||||
// Shiny can call resize before initialize/renderValue have been
|
||||
// called, which doesn't make sense for widgets.
|
||||
if (elementData(el, "initialized")) {
|
||||
bindingDef.resize(el, width, height, elementData(el, "init_result"));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Shiny.outputBindings.register(shinyBinding, bindingDef.name);
|
||||
}
|
||||
};
|
||||
|
||||
var scheduleStaticRenderTimerId = null;
|
||||
function scheduleStaticRender() {
|
||||
if (!scheduleStaticRenderTimerId) {
|
||||
scheduleStaticRenderTimerId = setTimeout(function() {
|
||||
scheduleStaticRenderTimerId = null;
|
||||
window.HTMLWidgets.staticRender();
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Render static widgets after the document finishes loading
|
||||
// Statically render all elements that are of this widget's class
|
||||
window.HTMLWidgets.staticRender = function() {
|
||||
var bindings = window.HTMLWidgets.widgets || [];
|
||||
forEach(bindings, function(binding) {
|
||||
var matches = binding.find(document.documentElement);
|
||||
forEach(matches, function(el) {
|
||||
var sizeObj = initSizing(el, binding);
|
||||
|
||||
var getSize = function(el) {
|
||||
if (sizeObj) {
|
||||
return {w: sizeObj.getWidth(), h: sizeObj.getHeight()}
|
||||
} else {
|
||||
var rect = el.getBoundingClientRect();
|
||||
return {w: rect.width, h: rect.height}
|
||||
}
|
||||
};
|
||||
|
||||
if (hasClass(el, "html-widget-static-bound"))
|
||||
return;
|
||||
el.className = el.className + " html-widget-static-bound";
|
||||
|
||||
var initResult;
|
||||
if (binding.initialize) {
|
||||
var size = getSize(el);
|
||||
initResult = binding.initialize(el, size.w, size.h);
|
||||
elementData(el, "init_result", initResult);
|
||||
}
|
||||
|
||||
if (binding.resize) {
|
||||
var lastSize = getSize(el);
|
||||
var resizeHandler = function(e) {
|
||||
var size = getSize(el);
|
||||
if (size.w === 0 && size.h === 0)
|
||||
return;
|
||||
if (size.w === lastSize.w && size.h === lastSize.h)
|
||||
return;
|
||||
lastSize = size;
|
||||
binding.resize(el, size.w, size.h, initResult);
|
||||
};
|
||||
|
||||
on(window, "resize", resizeHandler);
|
||||
|
||||
// This is needed for cases where we're running in a Shiny
|
||||
// app, but the widget itself is not a Shiny output, but
|
||||
// rather a simple static widget. One example of this is
|
||||
// an rmarkdown document that has runtime:shiny and widget
|
||||
// that isn't in a render function. Shiny only knows to
|
||||
// call resize handlers for Shiny outputs, not for static
|
||||
// widgets, so we do it ourselves.
|
||||
if (window.jQuery) {
|
||||
window.jQuery(document).on(
|
||||
"shown.htmlwidgets shown.bs.tab.htmlwidgets shown.bs.collapse.htmlwidgets",
|
||||
resizeHandler
|
||||
);
|
||||
window.jQuery(document).on(
|
||||
"hidden.htmlwidgets hidden.bs.tab.htmlwidgets hidden.bs.collapse.htmlwidgets",
|
||||
resizeHandler
|
||||
);
|
||||
}
|
||||
|
||||
// This is needed for the specific case of ioslides, which
|
||||
// flips slides between display:none and display:block.
|
||||
// Ideally we would not have to have ioslide-specific code
|
||||
// here, but rather have ioslides raise a generic event,
|
||||
// but the rmarkdown package just went to CRAN so the
|
||||
// window to getting that fixed may be long.
|
||||
if (window.addEventListener) {
|
||||
// It's OK to limit this to window.addEventListener
|
||||
// browsers because ioslides itself only supports
|
||||
// such browsers.
|
||||
on(document, "slideenter", resizeHandler);
|
||||
on(document, "slideleave", resizeHandler);
|
||||
}
|
||||
}
|
||||
|
||||
var scriptData = document.querySelector("script[data-for='" + el.id + "'][type='application/json']");
|
||||
if (scriptData) {
|
||||
var data = JSON.parse(scriptData.textContent || scriptData.text);
|
||||
// Resolve strings marked as javascript literals to objects
|
||||
if (!(data.evals instanceof Array)) data.evals = [data.evals];
|
||||
for (var k = 0; data.evals && k < data.evals.length; k++) {
|
||||
window.HTMLWidgets.evaluateStringMember(data.x, data.evals[k]);
|
||||
}
|
||||
binding.renderValue(el, data.x, initResult);
|
||||
evalAndRun(data.jsHooks.render, initResult, [el, data.x]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
invokePostRenderHandlers();
|
||||
}
|
||||
|
||||
|
||||
function has_jQuery3() {
|
||||
if (!window.jQuery) {
|
||||
return false;
|
||||
}
|
||||
var $version = window.jQuery.fn.jquery;
|
||||
var $major_version = parseInt($version.split(".")[0]);
|
||||
return $major_version >= 3;
|
||||
}
|
||||
|
||||
/*
|
||||
/ Shiny 1.4 bumped jQuery from 1.x to 3.x which means jQuery's
|
||||
/ on-ready handler (i.e., $(fn)) is now asyncronous (i.e., it now
|
||||
/ really means $(setTimeout(fn)).
|
||||
/ https://jquery.com/upgrade-guide/3.0/#breaking-change-document-ready-handlers-are-now-asynchronous
|
||||
/
|
||||
/ Since Shiny uses $() to schedule initShiny, shiny>=1.4 calls initShiny
|
||||
/ one tick later than it did before, which means staticRender() is
|
||||
/ called renderValue() earlier than (advanced) widget authors might be expecting.
|
||||
/ https://github.com/rstudio/shiny/issues/2630
|
||||
/
|
||||
/ For a concrete example, leaflet has some methods (e.g., updateBounds)
|
||||
/ which reference Shiny methods registered in initShiny (e.g., setInputValue).
|
||||
/ Since leaflet is privy to this life-cycle, it knows to use setTimeout() to
|
||||
/ delay execution of those methods (until Shiny methods are ready)
|
||||
/ https://github.com/rstudio/leaflet/blob/18ec981/javascript/src/index.js#L266-L268
|
||||
/
|
||||
/ Ideally widget authors wouldn't need to use this setTimeout() hack that
|
||||
/ leaflet uses to call Shiny methods on a staticRender(). In the long run,
|
||||
/ the logic initShiny should be broken up so that method registration happens
|
||||
/ right away, but binding happens later.
|
||||
*/
|
||||
function maybeStaticRenderLater() {
|
||||
if (shinyMode && has_jQuery3()) {
|
||||
window.jQuery(window.HTMLWidgets.staticRender);
|
||||
} else {
|
||||
window.HTMLWidgets.staticRender();
|
||||
}
|
||||
}
|
||||
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.removeEventListener("DOMContentLoaded", arguments.callee, false);
|
||||
maybeStaticRenderLater();
|
||||
}, false);
|
||||
} else if (document.attachEvent) {
|
||||
document.attachEvent("onreadystatechange", function() {
|
||||
if (document.readyState === "complete") {
|
||||
document.detachEvent("onreadystatechange", arguments.callee);
|
||||
maybeStaticRenderLater();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
window.HTMLWidgets.getAttachmentUrl = function(depname, key) {
|
||||
// If no key, default to the first item
|
||||
if (typeof(key) === "undefined")
|
||||
key = 1;
|
||||
|
||||
var link = document.getElementById(depname + "-" + key + "-attachment");
|
||||
if (!link) {
|
||||
throw new Error("Attachment " + depname + "/" + key + " not found in document");
|
||||
}
|
||||
return link.getAttribute("href");
|
||||
};
|
||||
|
||||
window.HTMLWidgets.dataframeToD3 = function(df) {
|
||||
var names = [];
|
||||
var length;
|
||||
for (var name in df) {
|
||||
if (df.hasOwnProperty(name))
|
||||
names.push(name);
|
||||
if (typeof(df[name]) !== "object" || typeof(df[name].length) === "undefined") {
|
||||
throw new Error("All fields must be arrays");
|
||||
} else if (typeof(length) !== "undefined" && length !== df[name].length) {
|
||||
throw new Error("All fields must be arrays of the same length");
|
||||
}
|
||||
length = df[name].length;
|
||||
}
|
||||
var results = [];
|
||||
var item;
|
||||
for (var row = 0; row < length; row++) {
|
||||
item = {};
|
||||
for (var col = 0; col < names.length; col++) {
|
||||
item[names[col]] = df[names[col]][row];
|
||||
}
|
||||
results.push(item);
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
window.HTMLWidgets.transposeArray2D = function(array) {
|
||||
if (array.length === 0) return array;
|
||||
var newArray = array[0].map(function(col, i) {
|
||||
return array.map(function(row) {
|
||||
return row[i]
|
||||
})
|
||||
});
|
||||
return newArray;
|
||||
};
|
||||
// Split value at splitChar, but allow splitChar to be escaped
|
||||
// using escapeChar. Any other characters escaped by escapeChar
|
||||
// will be included as usual (including escapeChar itself).
|
||||
function splitWithEscape(value, splitChar, escapeChar) {
|
||||
var results = [];
|
||||
var escapeMode = false;
|
||||
var currentResult = "";
|
||||
for (var pos = 0; pos < value.length; pos++) {
|
||||
if (!escapeMode) {
|
||||
if (value[pos] === splitChar) {
|
||||
results.push(currentResult);
|
||||
currentResult = "";
|
||||
} else if (value[pos] === escapeChar) {
|
||||
escapeMode = true;
|
||||
} else {
|
||||
currentResult += value[pos];
|
||||
}
|
||||
} else {
|
||||
currentResult += value[pos];
|
||||
escapeMode = false;
|
||||
}
|
||||
}
|
||||
if (currentResult !== "") {
|
||||
results.push(currentResult);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
// Function authored by Yihui/JJ Allaire
|
||||
window.HTMLWidgets.evaluateStringMember = function(o, member) {
|
||||
var parts = splitWithEscape(member, '.', '\\');
|
||||
for (var i = 0, l = parts.length; i < l; i++) {
|
||||
var part = parts[i];
|
||||
// part may be a character or 'numeric' member name
|
||||
if (o !== null && typeof o === "object" && part in o) {
|
||||
if (i == (l - 1)) { // if we are at the end of the line then evalulate
|
||||
if (typeof o[part] === "string")
|
||||
o[part] = tryEval(o[part]);
|
||||
} else { // otherwise continue to next embedded object
|
||||
o = o[part];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Retrieve the HTMLWidget instance (i.e. the return value of an
|
||||
// HTMLWidget binding's initialize() or factory() function)
|
||||
// associated with an element, or null if none.
|
||||
window.HTMLWidgets.getInstance = function(el) {
|
||||
return elementData(el, "init_result");
|
||||
};
|
||||
|
||||
// Finds the first element in the scope that matches the selector,
|
||||
// and returns the HTMLWidget instance (i.e. the return value of
|
||||
// an HTMLWidget binding's initialize() or factory() function)
|
||||
// associated with that element, if any. If no element matches the
|
||||
// selector, or the first matching element has no HTMLWidget
|
||||
// instance associated with it, then null is returned.
|
||||
//
|
||||
// The scope argument is optional, and defaults to window.document.
|
||||
window.HTMLWidgets.find = function(scope, selector) {
|
||||
if (arguments.length == 1) {
|
||||
selector = scope;
|
||||
scope = document;
|
||||
}
|
||||
|
||||
var el = scope.querySelector(selector);
|
||||
if (el === null) {
|
||||
return null;
|
||||
} else {
|
||||
return window.HTMLWidgets.getInstance(el);
|
||||
}
|
||||
};
|
||||
|
||||
// Finds all elements in the scope that match the selector, and
|
||||
// returns the HTMLWidget instances (i.e. the return values of
|
||||
// an HTMLWidget binding's initialize() or factory() function)
|
||||
// associated with the elements, in an array. If elements that
|
||||
// match the selector don't have an associated HTMLWidget
|
||||
// instance, the returned array will contain nulls.
|
||||
//
|
||||
// The scope argument is optional, and defaults to window.document.
|
||||
window.HTMLWidgets.findAll = function(scope, selector) {
|
||||
if (arguments.length == 1) {
|
||||
selector = scope;
|
||||
scope = document;
|
||||
}
|
||||
|
||||
var nodes = scope.querySelectorAll(selector);
|
||||
var results = [];
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
results.push(window.HTMLWidgets.getInstance(nodes[i]));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
var postRenderHandlers = [];
|
||||
function invokePostRenderHandlers() {
|
||||
while (postRenderHandlers.length) {
|
||||
var handler = postRenderHandlers.shift();
|
||||
if (handler) {
|
||||
handler();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Register the given callback function to be invoked after the
|
||||
// next time static widgets are rendered.
|
||||
window.HTMLWidgets.addPostRenderHandler = function(callback) {
|
||||
postRenderHandlers.push(callback);
|
||||
};
|
||||
|
||||
// Takes a new-style instance-bound definition, and returns an
|
||||
// old-style class-bound definition. This saves us from having
|
||||
// to rewrite all the logic in this file to accomodate both
|
||||
// types of definitions.
|
||||
function createLegacyDefinitionAdapter(defn) {
|
||||
var result = {
|
||||
name: defn.name,
|
||||
type: defn.type,
|
||||
initialize: function(el, width, height) {
|
||||
return defn.factory(el, width, height);
|
||||
},
|
||||
renderValue: function(el, x, instance) {
|
||||
return instance.renderValue(x);
|
||||
},
|
||||
resize: function(el, width, height, instance) {
|
||||
return instance.resize(width, height);
|
||||
}
|
||||
};
|
||||
|
||||
if (defn.find)
|
||||
result.find = defn.find;
|
||||
if (defn.renderError)
|
||||
result.renderError = defn.renderError;
|
||||
if (defn.clearError)
|
||||
result.clearError = defn.clearError;
|
||||
|
||||
return result;
|
||||
}
|
||||
})();
|
||||
5
_site/site_libs/jquery-1.12.4/jquery.min.js
vendored
Normal file
5
_site/site_libs/jquery-1.12.4/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
_site/site_libs/leaflet-1.3.1/images/layers-2x.png
Normal file
BIN
_site/site_libs/leaflet-1.3.1/images/layers-2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
_site/site_libs/leaflet-1.3.1/images/layers.png
Normal file
BIN
_site/site_libs/leaflet-1.3.1/images/layers.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 696 B |
BIN
_site/site_libs/leaflet-1.3.1/images/marker-icon-2x.png
Normal file
BIN
_site/site_libs/leaflet-1.3.1/images/marker-icon-2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
BIN
_site/site_libs/leaflet-1.3.1/images/marker-icon.png
Normal file
BIN
_site/site_libs/leaflet-1.3.1/images/marker-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
_site/site_libs/leaflet-1.3.1/images/marker-shadow.png
Normal file
BIN
_site/site_libs/leaflet-1.3.1/images/marker-shadow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 618 B |
636
_site/site_libs/leaflet-1.3.1/leaflet.css
Normal file
636
_site/site_libs/leaflet-1.3.1/leaflet.css
Normal file
|
|
@ -0,0 +1,636 @@
|
|||
/* required styles */
|
||||
|
||||
.leaflet-pane,
|
||||
.leaflet-tile,
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow,
|
||||
.leaflet-tile-container,
|
||||
.leaflet-pane > svg,
|
||||
.leaflet-pane > canvas,
|
||||
.leaflet-zoom-box,
|
||||
.leaflet-image-layer,
|
||||
.leaflet-layer {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.leaflet-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
.leaflet-tile,
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
|
||||
.leaflet-safari .leaflet-tile {
|
||||
image-rendering: -webkit-optimize-contrast;
|
||||
}
|
||||
/* hack that prevents hw layers "stretching" when loading new tiles */
|
||||
.leaflet-safari .leaflet-tile-container {
|
||||
width: 1600px;
|
||||
height: 1600px;
|
||||
-webkit-transform-origin: 0 0;
|
||||
}
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow {
|
||||
display: block;
|
||||
}
|
||||
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
|
||||
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
|
||||
.leaflet-container .leaflet-overlay-pane svg,
|
||||
.leaflet-container .leaflet-marker-pane img,
|
||||
.leaflet-container .leaflet-shadow-pane img,
|
||||
.leaflet-container .leaflet-tile-pane img,
|
||||
.leaflet-container img.leaflet-image-layer {
|
||||
max-width: none !important;
|
||||
max-height: none !important;
|
||||
}
|
||||
|
||||
.leaflet-container.leaflet-touch-zoom {
|
||||
-ms-touch-action: pan-x pan-y;
|
||||
touch-action: pan-x pan-y;
|
||||
}
|
||||
.leaflet-container.leaflet-touch-drag {
|
||||
-ms-touch-action: pinch-zoom;
|
||||
/* Fallback for FF which doesn't support pinch-zoom */
|
||||
touch-action: none;
|
||||
touch-action: pinch-zoom;
|
||||
}
|
||||
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
.leaflet-container {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.leaflet-container a {
|
||||
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
|
||||
}
|
||||
.leaflet-tile {
|
||||
filter: inherit;
|
||||
visibility: hidden;
|
||||
}
|
||||
.leaflet-tile-loaded {
|
||||
visibility: inherit;
|
||||
}
|
||||
.leaflet-zoom-box {
|
||||
width: 0;
|
||||
height: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
z-index: 800;
|
||||
}
|
||||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
||||
.leaflet-overlay-pane svg {
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
.leaflet-pane { z-index: 400; }
|
||||
|
||||
.leaflet-tile-pane { z-index: 200; }
|
||||
.leaflet-overlay-pane { z-index: 400; }
|
||||
.leaflet-shadow-pane { z-index: 500; }
|
||||
.leaflet-marker-pane { z-index: 600; }
|
||||
.leaflet-tooltip-pane { z-index: 650; }
|
||||
.leaflet-popup-pane { z-index: 700; }
|
||||
|
||||
.leaflet-map-pane canvas { z-index: 100; }
|
||||
.leaflet-map-pane svg { z-index: 200; }
|
||||
|
||||
.leaflet-vml-shape {
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
}
|
||||
.lvml {
|
||||
behavior: url(#default#VML);
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
||||
/* control positioning */
|
||||
|
||||
.leaflet-control {
|
||||
position: relative;
|
||||
z-index: 800;
|
||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
||||
pointer-events: auto;
|
||||
}
|
||||
.leaflet-top,
|
||||
.leaflet-bottom {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
pointer-events: none;
|
||||
}
|
||||
.leaflet-top {
|
||||
top: 0;
|
||||
}
|
||||
.leaflet-right {
|
||||
right: 0;
|
||||
}
|
||||
.leaflet-bottom {
|
||||
bottom: 0;
|
||||
}
|
||||
.leaflet-left {
|
||||
left: 0;
|
||||
}
|
||||
.leaflet-control {
|
||||
float: left;
|
||||
clear: both;
|
||||
}
|
||||
.leaflet-right .leaflet-control {
|
||||
float: right;
|
||||
}
|
||||
.leaflet-top .leaflet-control {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.leaflet-bottom .leaflet-control {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.leaflet-left .leaflet-control {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.leaflet-right .leaflet-control {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* zoom and fade animations */
|
||||
|
||||
.leaflet-fade-anim .leaflet-tile {
|
||||
will-change: opacity;
|
||||
}
|
||||
.leaflet-fade-anim .leaflet-popup {
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
-moz-transition: opacity 0.2s linear;
|
||||
-o-transition: opacity 0.2s linear;
|
||||
transition: opacity 0.2s linear;
|
||||
}
|
||||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
||||
opacity: 1;
|
||||
}
|
||||
.leaflet-zoom-animated {
|
||||
-webkit-transform-origin: 0 0;
|
||||
-ms-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||
will-change: transform;
|
||||
}
|
||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
}
|
||||
.leaflet-zoom-anim .leaflet-tile,
|
||||
.leaflet-pan-anim .leaflet-tile {
|
||||
-webkit-transition: none;
|
||||
-moz-transition: none;
|
||||
-o-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* cursors */
|
||||
|
||||
.leaflet-interactive {
|
||||
cursor: pointer;
|
||||
}
|
||||
.leaflet-grab {
|
||||
cursor: -webkit-grab;
|
||||
cursor: -moz-grab;
|
||||
}
|
||||
.leaflet-crosshair,
|
||||
.leaflet-crosshair .leaflet-interactive {
|
||||
cursor: crosshair;
|
||||
}
|
||||
.leaflet-popup-pane,
|
||||
.leaflet-control {
|
||||
cursor: auto;
|
||||
}
|
||||
.leaflet-dragging .leaflet-grab,
|
||||
.leaflet-dragging .leaflet-grab .leaflet-interactive,
|
||||
.leaflet-dragging .leaflet-marker-draggable {
|
||||
cursor: move;
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: -moz-grabbing;
|
||||
}
|
||||
|
||||
/* marker & overlays interactivity */
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow,
|
||||
.leaflet-image-layer,
|
||||
.leaflet-pane > svg path,
|
||||
.leaflet-tile-container {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.leaflet-marker-icon.leaflet-interactive,
|
||||
.leaflet-image-layer.leaflet-interactive,
|
||||
.leaflet-pane > svg path.leaflet-interactive {
|
||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
/* visual tweaks */
|
||||
|
||||
.leaflet-container {
|
||||
background: #ddd;
|
||||
outline: 0;
|
||||
}
|
||||
.leaflet-container a {
|
||||
color: #0078A8;
|
||||
}
|
||||
.leaflet-container a.leaflet-active {
|
||||
outline: 2px solid orange;
|
||||
}
|
||||
.leaflet-zoom-box {
|
||||
border: 2px dotted #38f;
|
||||
background: rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
|
||||
/* general typography */
|
||||
.leaflet-container {
|
||||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
|
||||
/* general toolbar styles */
|
||||
|
||||
.leaflet-bar {
|
||||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.leaflet-bar a,
|
||||
.leaflet-bar a:hover {
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #ccc;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
.leaflet-bar a,
|
||||
.leaflet-control-layers-toggle {
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
}
|
||||
.leaflet-bar a:hover {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
.leaflet-bar a:first-child {
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
.leaflet-bar a:last-child {
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-bottom: none;
|
||||
}
|
||||
.leaflet-bar a.leaflet-disabled {
|
||||
cursor: default;
|
||||
background-color: #f4f4f4;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.leaflet-touch .leaflet-bar a {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.leaflet-touch .leaflet-bar a:first-child {
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 2px;
|
||||
}
|
||||
.leaflet-touch .leaflet-bar a:last-child {
|
||||
border-bottom-left-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
}
|
||||
|
||||
/* zoom control */
|
||||
|
||||
.leaflet-control-zoom-in,
|
||||
.leaflet-control-zoom-out {
|
||||
font: bold 18px 'Lucida Console', Monaco, monospace;
|
||||
text-indent: 1px;
|
||||
}
|
||||
|
||||
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
|
||||
/* layers control */
|
||||
|
||||
.leaflet-control-layers {
|
||||
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
|
||||
background: #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.leaflet-control-layers-toggle {
|
||||
background-image: url(images/layers.png);
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
.leaflet-retina .leaflet-control-layers-toggle {
|
||||
background-image: url(images/layers-2x.png);
|
||||
background-size: 26px 26px;
|
||||
}
|
||||
.leaflet-touch .leaflet-control-layers-toggle {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
}
|
||||
.leaflet-control-layers .leaflet-control-layers-list,
|
||||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
||||
display: none;
|
||||
}
|
||||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
.leaflet-control-layers-expanded {
|
||||
padding: 6px 10px 6px 6px;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
}
|
||||
.leaflet-control-layers-scrollbar {
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.leaflet-control-layers-selector {
|
||||
margin-top: 2px;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
.leaflet-control-layers label {
|
||||
display: block;
|
||||
}
|
||||
.leaflet-control-layers-separator {
|
||||
height: 0;
|
||||
border-top: 1px solid #ddd;
|
||||
margin: 5px -10px 5px -6px;
|
||||
}
|
||||
|
||||
/* Default icon URLs */
|
||||
.leaflet-default-icon-path {
|
||||
background-image: url(images/marker-icon.png);
|
||||
}
|
||||
|
||||
|
||||
/* attribution and scale controls */
|
||||
|
||||
.leaflet-container .leaflet-control-attribution {
|
||||
background: #fff;
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
margin: 0;
|
||||
}
|
||||
.leaflet-control-attribution,
|
||||
.leaflet-control-scale-line {
|
||||
padding: 0 5px;
|
||||
color: #333;
|
||||
}
|
||||
.leaflet-control-attribution a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.leaflet-control-attribution a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.leaflet-container .leaflet-control-attribution,
|
||||
.leaflet-container .leaflet-control-scale {
|
||||
font-size: 11px;
|
||||
}
|
||||
.leaflet-left .leaflet-control-scale {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.leaflet-bottom .leaflet-control-scale {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.leaflet-control-scale-line {
|
||||
border: 2px solid #777;
|
||||
border-top: none;
|
||||
line-height: 1.1;
|
||||
padding: 2px 5px 1px;
|
||||
font-size: 11px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
background: #fff;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.leaflet-control-scale-line:not(:first-child) {
|
||||
border-top: 2px solid #777;
|
||||
border-bottom: none;
|
||||
margin-top: -2px;
|
||||
}
|
||||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
||||
border-bottom: 2px solid #777;
|
||||
}
|
||||
|
||||
.leaflet-touch .leaflet-control-attribution,
|
||||
.leaflet-touch .leaflet-control-layers,
|
||||
.leaflet-touch .leaflet-bar {
|
||||
box-shadow: none;
|
||||
}
|
||||
.leaflet-touch .leaflet-control-layers,
|
||||
.leaflet-touch .leaflet-bar {
|
||||
border: 2px solid rgba(0,0,0,0.2);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
|
||||
/* popup */
|
||||
|
||||
.leaflet-popup {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.leaflet-popup-content-wrapper {
|
||||
padding: 1px;
|
||||
text-align: left;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.leaflet-popup-content {
|
||||
margin: 13px 19px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.leaflet-popup-content p {
|
||||
margin: 18px 0;
|
||||
}
|
||||
.leaflet-popup-tip-container {
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -20px;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
.leaflet-popup-tip {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
padding: 1px;
|
||||
|
||||
margin: -10px auto 0;
|
||||
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.leaflet-popup-content-wrapper,
|
||||
.leaflet-popup-tip {
|
||||
background: white;
|
||||
color: #333;
|
||||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
||||
}
|
||||
.leaflet-container a.leaflet-popup-close-button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 4px 4px 0 0;
|
||||
border: none;
|
||||
text-align: center;
|
||||
width: 18px;
|
||||
height: 14px;
|
||||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
||||
color: #c3c3c3;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
background: transparent;
|
||||
}
|
||||
.leaflet-container a.leaflet-popup-close-button:hover {
|
||||
color: #999;
|
||||
}
|
||||
.leaflet-popup-scrolled {
|
||||
overflow: auto;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
||||
zoom: 1;
|
||||
}
|
||||
.leaflet-oldie .leaflet-popup-tip {
|
||||
width: 24px;
|
||||
margin: 0 auto;
|
||||
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
||||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
||||
}
|
||||
.leaflet-oldie .leaflet-popup-tip-container {
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.leaflet-oldie .leaflet-control-zoom,
|
||||
.leaflet-oldie .leaflet-control-layers,
|
||||
.leaflet-oldie .leaflet-popup-content-wrapper,
|
||||
.leaflet-oldie .leaflet-popup-tip {
|
||||
border: 1px solid #999;
|
||||
}
|
||||
|
||||
|
||||
/* div icon */
|
||||
|
||||
.leaflet-div-icon {
|
||||
background: #fff;
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
|
||||
/* Tooltip */
|
||||
/* Base styles for the element that has a tooltip */
|
||||
.leaflet-tooltip {
|
||||
position: absolute;
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 3px;
|
||||
color: #222;
|
||||
white-space: nowrap;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
|
||||
}
|
||||
.leaflet-tooltip.leaflet-clickable {
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
}
|
||||
.leaflet-tooltip-top:before,
|
||||
.leaflet-tooltip-bottom:before,
|
||||
.leaflet-tooltip-left:before,
|
||||
.leaflet-tooltip-right:before {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
border: 6px solid transparent;
|
||||
background: transparent;
|
||||
content: "";
|
||||
}
|
||||
|
||||
/* Directions */
|
||||
|
||||
.leaflet-tooltip-bottom {
|
||||
margin-top: 6px;
|
||||
}
|
||||
.leaflet-tooltip-top {
|
||||
margin-top: -6px;
|
||||
}
|
||||
.leaflet-tooltip-bottom:before,
|
||||
.leaflet-tooltip-top:before {
|
||||
left: 50%;
|
||||
margin-left: -6px;
|
||||
}
|
||||
.leaflet-tooltip-top:before {
|
||||
bottom: 0;
|
||||
margin-bottom: -12px;
|
||||
border-top-color: #fff;
|
||||
}
|
||||
.leaflet-tooltip-bottom:before {
|
||||
top: 0;
|
||||
margin-top: -12px;
|
||||
margin-left: -6px;
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
.leaflet-tooltip-left {
|
||||
margin-left: -6px;
|
||||
}
|
||||
.leaflet-tooltip-right {
|
||||
margin-left: 6px;
|
||||
}
|
||||
.leaflet-tooltip-left:before,
|
||||
.leaflet-tooltip-right:before {
|
||||
top: 50%;
|
||||
margin-top: -6px;
|
||||
}
|
||||
.leaflet-tooltip-left:before {
|
||||
right: 0;
|
||||
margin-right: -12px;
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.leaflet-tooltip-right:before {
|
||||
left: 0;
|
||||
margin-left: -12px;
|
||||
border-right-color: #fff;
|
||||
}
|
||||
5
_site/site_libs/leaflet-1.3.1/leaflet.js
Normal file
5
_site/site_libs/leaflet-1.3.1/leaflet.js
Normal file
File diff suppressed because one or more lines are too long
2785
_site/site_libs/leaflet-binding-2.1.2/leaflet.js
Normal file
2785
_site/site_libs/leaflet-binding-2.1.2/leaflet.js
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,855 @@
|
|||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['leaflet'], factory);
|
||||
} else if (typeof modules === 'object' && module.exports) {
|
||||
// define a Common JS module that relies on 'leaflet'
|
||||
module.exports = factory(require('leaflet'));
|
||||
} else {
|
||||
// Assume Leaflet is loaded into global object L already
|
||||
factory(L);
|
||||
}
|
||||
}(this, function (L) {
|
||||
'use strict';
|
||||
|
||||
L.TileLayer.Provider = L.TileLayer.extend({
|
||||
initialize: function (arg, options) {
|
||||
var providers = L.TileLayer.Provider.providers;
|
||||
|
||||
var parts = arg.split('.');
|
||||
|
||||
var providerName = parts[0];
|
||||
var variantName = parts[1];
|
||||
|
||||
if (!providers[providerName]) {
|
||||
throw 'No such provider (' + providerName + ')';
|
||||
}
|
||||
|
||||
var provider = {
|
||||
url: providers[providerName].url,
|
||||
options: providers[providerName].options
|
||||
};
|
||||
|
||||
// overwrite values in provider from variant.
|
||||
if (variantName && 'variants' in providers[providerName]) {
|
||||
if (!(variantName in providers[providerName].variants)) {
|
||||
throw 'No such variant of ' + providerName + ' (' + variantName + ')';
|
||||
}
|
||||
var variant = providers[providerName].variants[variantName];
|
||||
var variantOptions;
|
||||
if (typeof variant === 'string') {
|
||||
variantOptions = {
|
||||
variant: variant
|
||||
};
|
||||
} else {
|
||||
variantOptions = variant.options;
|
||||
}
|
||||
provider = {
|
||||
url: variant.url || provider.url,
|
||||
options: L.Util.extend({}, provider.options, variantOptions)
|
||||
};
|
||||
}
|
||||
|
||||
// replace attribution placeholders with their values from toplevel provider attribution,
|
||||
// recursively
|
||||
var attributionReplacer = function (attr) {
|
||||
if (attr.indexOf('{attribution.') === -1) {
|
||||
return attr;
|
||||
}
|
||||
return attr.replace(/\{attribution.(\w*)\}/g,
|
||||
function (match, attributionName) {
|
||||
return attributionReplacer(providers[attributionName].options.attribution);
|
||||
}
|
||||
);
|
||||
};
|
||||
provider.options.attribution = attributionReplacer(provider.options.attribution);
|
||||
|
||||
// Compute final options combining provider options with any user overrides
|
||||
var layerOpts = L.Util.extend({}, provider.options, options);
|
||||
L.TileLayer.prototype.initialize.call(this, provider.url, layerOpts);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Definition of providers.
|
||||
* see http://leafletjs.com/reference.html#tilelayer for options in the options map.
|
||||
*/
|
||||
|
||||
L.TileLayer.Provider.providers = {
|
||||
OpenStreetMap: {
|
||||
url: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
attribution:
|
||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
},
|
||||
variants: {
|
||||
Mapnik: {},
|
||||
DE: {
|
||||
url: '//{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 18
|
||||
}
|
||||
},
|
||||
CH: {
|
||||
url: '//tile.osm.ch/switzerland/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 18,
|
||||
bounds: [[45, 5], [48, 11]]
|
||||
}
|
||||
},
|
||||
France: {
|
||||
url: '//{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 20,
|
||||
attribution: '© Openstreetmap France | {attribution.OpenStreetMap}'
|
||||
}
|
||||
},
|
||||
HOT: {
|
||||
url: '//{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution:
|
||||
'{attribution.OpenStreetMap}, ' +
|
||||
'Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> ' +
|
||||
'hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>'
|
||||
}
|
||||
},
|
||||
BZH: {
|
||||
url: '//tile.openstreetmap.bzh/br/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://www.openstreetmap.bzh/" target="_blank">Breton OpenStreetMap Team</a>',
|
||||
bounds: [[46.2, -5.5], [50, 0.7]]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
OpenSeaMap: {
|
||||
url: '//tiles.openseamap.org/seamark/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution: 'Map data: © <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'
|
||||
}
|
||||
},
|
||||
OpenPtMap: {
|
||||
url: 'http://openptmap.org/tiles/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 17,
|
||||
attribution: 'Map data: © <a href="http://www.openptmap.org">OpenPtMap</a> contributors'
|
||||
}
|
||||
},
|
||||
OpenTopoMap: {
|
||||
url: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 17,
|
||||
attribution: 'Map data: {attribution.OpenStreetMap}, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: © <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
|
||||
}
|
||||
},
|
||||
OpenRailwayMap: {
|
||||
url: 'https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © <a href="https://www.OpenRailwayMap.org">OpenRailwayMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
|
||||
}
|
||||
},
|
||||
OpenFireMap: {
|
||||
url: 'http://openfiremap.org/hytiles/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © <a href="http://www.openfiremap.org">OpenFireMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
|
||||
}
|
||||
},
|
||||
SafeCast: {
|
||||
url: '//s3.amazonaws.com/te512.safecast.org/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 16,
|
||||
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © <a href="https://blog.safecast.org/about/">SafeCast</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
|
||||
}
|
||||
},
|
||||
Thunderforest: {
|
||||
url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
|
||||
options: {
|
||||
attribution:
|
||||
'© <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}',
|
||||
variant: 'cycle',
|
||||
apikey: '<insert your api key here>',
|
||||
maxZoom: 22
|
||||
},
|
||||
variants: {
|
||||
OpenCycleMap: 'cycle',
|
||||
Transport: {
|
||||
options: {
|
||||
variant: 'transport'
|
||||
}
|
||||
},
|
||||
TransportDark: {
|
||||
options: {
|
||||
variant: 'transport-dark'
|
||||
}
|
||||
},
|
||||
SpinalMap: {
|
||||
options: {
|
||||
variant: 'spinal-map'
|
||||
}
|
||||
},
|
||||
Landscape: 'landscape',
|
||||
Outdoors: 'outdoors',
|
||||
Pioneer: 'pioneer',
|
||||
MobileAtlas: 'mobile-atlas',
|
||||
Neighbourhood: 'neighbourhood'
|
||||
}
|
||||
},
|
||||
OpenMapSurfer: {
|
||||
url: 'https://maps.heigit.org/openmapsurfer/tiles/{variant}/webmercator/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
variant: 'roads',
|
||||
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> | Map data '
|
||||
},
|
||||
variants: {
|
||||
Roads: {
|
||||
options: {
|
||||
variant: 'roads',
|
||||
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||
}
|
||||
},
|
||||
Hybrid: {
|
||||
options: {
|
||||
variant: 'hybrid',
|
||||
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||
}
|
||||
},
|
||||
AdminBounds: {
|
||||
options: {
|
||||
variant: 'adminb',
|
||||
maxZoom: 18,
|
||||
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||
}
|
||||
},
|
||||
ContourLines: {
|
||||
options: {
|
||||
variant: 'asterc',
|
||||
maxZoom: 18,
|
||||
minZoom: 13,
|
||||
attribution: '{attribution.OpenMapSurfer} <a href="https://lpdaac.usgs.gov/products/aster_policies">ASTER GDEM</a>'
|
||||
}
|
||||
},
|
||||
Hillshade: {
|
||||
options: {
|
||||
variant: 'asterh',
|
||||
maxZoom: 18,
|
||||
attribution: '{attribution.OpenMapSurfer} <a href="https://lpdaac.usgs.gov/products/aster_policies">ASTER GDEM</a>, <a href="http://srtm.csi.cgiar.org/">SRTM</a>'
|
||||
}
|
||||
},
|
||||
ElementsAtRisk: {
|
||||
options: {
|
||||
variant: 'elements_at_risk',
|
||||
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Hydda: {
|
||||
url: '//{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 18,
|
||||
variant: 'full',
|
||||
attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> — Map data {attribution.OpenStreetMap}'
|
||||
},
|
||||
variants: {
|
||||
Full: 'full',
|
||||
Base: 'base',
|
||||
RoadsAndLabels: 'roads_and_labels'
|
||||
}
|
||||
},
|
||||
MapBox: {
|
||||
url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}{r}.png?access_token={accessToken}',
|
||||
options: {
|
||||
attribution:
|
||||
'<a href="https://www.mapbox.com/about/maps/" target="_blank">© Mapbox</a> ' +
|
||||
'{attribution.OpenStreetMap} ' +
|
||||
'<a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>',
|
||||
subdomains: 'abcd',
|
||||
id: 'mapbox.streets',
|
||||
accessToken: '<insert your access token here>',
|
||||
}
|
||||
},
|
||||
Stamen: {
|
||||
url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.{ext}',
|
||||
options: {
|
||||
attribution:
|
||||
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' +
|
||||
'<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — ' +
|
||||
'Map data {attribution.OpenStreetMap}',
|
||||
subdomains: 'abcd',
|
||||
minZoom: 0,
|
||||
maxZoom: 20,
|
||||
variant: 'toner',
|
||||
ext: 'png'
|
||||
},
|
||||
variants: {
|
||||
Toner: 'toner',
|
||||
TonerBackground: 'toner-background',
|
||||
TonerHybrid: 'toner-hybrid',
|
||||
TonerLines: 'toner-lines',
|
||||
TonerLabels: 'toner-labels',
|
||||
TonerLite: 'toner-lite',
|
||||
Watercolor: {
|
||||
url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
|
||||
options: {
|
||||
variant: 'watercolor',
|
||||
ext: 'jpg',
|
||||
minZoom: 1,
|
||||
maxZoom: 16
|
||||
}
|
||||
},
|
||||
Terrain: {
|
||||
options: {
|
||||
variant: 'terrain',
|
||||
minZoom: 0,
|
||||
maxZoom: 18
|
||||
}
|
||||
},
|
||||
TerrainBackground: {
|
||||
options: {
|
||||
variant: 'terrain-background',
|
||||
minZoom: 0,
|
||||
maxZoom: 18
|
||||
}
|
||||
},
|
||||
TerrainLabels: {
|
||||
options: {
|
||||
variant: 'terrain-labels',
|
||||
minZoom: 0,
|
||||
maxZoom: 18
|
||||
}
|
||||
},
|
||||
TopOSMRelief: {
|
||||
url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
|
||||
options: {
|
||||
variant: 'toposm-color-relief',
|
||||
ext: 'jpg',
|
||||
bounds: [[22, -132], [51, -56]]
|
||||
}
|
||||
},
|
||||
TopOSMFeatures: {
|
||||
options: {
|
||||
variant: 'toposm-features',
|
||||
bounds: [[22, -132], [51, -56]],
|
||||
opacity: 0.9
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
TomTom: {
|
||||
url: 'https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}',
|
||||
options: {
|
||||
variant: 'basic',
|
||||
maxZoom: 22,
|
||||
attribution:
|
||||
'<a href="https://tomtom.com" target="_blank">© 1992 - ' + new Date().getFullYear() + ' TomTom.</a> ',
|
||||
subdomains: 'abcd',
|
||||
style: 'main',
|
||||
ext: 'png',
|
||||
apikey: '<insert your API key here>',
|
||||
},
|
||||
variants: {
|
||||
Basic: 'basic',
|
||||
Hybrid: 'hybrid',
|
||||
Labels: 'labels'
|
||||
}
|
||||
},
|
||||
Esri: {
|
||||
url: '//server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',
|
||||
options: {
|
||||
variant: 'World_Street_Map',
|
||||
attribution: 'Tiles © Esri'
|
||||
},
|
||||
variants: {
|
||||
WorldStreetMap: {
|
||||
options: {
|
||||
attribution:
|
||||
'{attribution.Esri} — ' +
|
||||
'Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012'
|
||||
}
|
||||
},
|
||||
DeLorme: {
|
||||
options: {
|
||||
variant: 'Specialty/DeLorme_World_Base_Map',
|
||||
minZoom: 1,
|
||||
maxZoom: 11,
|
||||
attribution: '{attribution.Esri} — Copyright: ©2012 DeLorme'
|
||||
}
|
||||
},
|
||||
WorldTopoMap: {
|
||||
options: {
|
||||
variant: 'World_Topo_Map',
|
||||
attribution:
|
||||
'{attribution.Esri} — ' +
|
||||
'Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community'
|
||||
}
|
||||
},
|
||||
WorldImagery: {
|
||||
options: {
|
||||
variant: 'World_Imagery',
|
||||
attribution:
|
||||
'{attribution.Esri} — ' +
|
||||
'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
||||
}
|
||||
},
|
||||
WorldTerrain: {
|
||||
options: {
|
||||
variant: 'World_Terrain_Base',
|
||||
maxZoom: 13,
|
||||
attribution:
|
||||
'{attribution.Esri} — ' +
|
||||
'Source: USGS, Esri, TANA, DeLorme, and NPS'
|
||||
}
|
||||
},
|
||||
WorldShadedRelief: {
|
||||
options: {
|
||||
variant: 'World_Shaded_Relief',
|
||||
maxZoom: 13,
|
||||
attribution: '{attribution.Esri} — Source: Esri'
|
||||
}
|
||||
},
|
||||
WorldPhysical: {
|
||||
options: {
|
||||
variant: 'World_Physical_Map',
|
||||
maxZoom: 8,
|
||||
attribution: '{attribution.Esri} — Source: US National Park Service'
|
||||
}
|
||||
},
|
||||
OceanBasemap: {
|
||||
options: {
|
||||
variant: 'Ocean_Basemap',
|
||||
maxZoom: 13,
|
||||
attribution: '{attribution.Esri} — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri'
|
||||
}
|
||||
},
|
||||
NatGeoWorldMap: {
|
||||
options: {
|
||||
variant: 'NatGeo_World_Map',
|
||||
maxZoom: 16,
|
||||
attribution: '{attribution.Esri} — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC'
|
||||
}
|
||||
},
|
||||
WorldGrayCanvas: {
|
||||
options: {
|
||||
variant: 'Canvas/World_Light_Gray_Base',
|
||||
maxZoom: 16,
|
||||
attribution: '{attribution.Esri} — Esri, DeLorme, NAVTEQ'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
OpenWeatherMap: {
|
||||
url: 'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png?appid={apiKey}',
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
attribution: 'Map data © <a href="http://openweathermap.org">OpenWeatherMap</a>',
|
||||
apiKey:'<insert your api key here>',
|
||||
opacity: 0.5
|
||||
},
|
||||
variants: {
|
||||
Clouds: 'clouds',
|
||||
CloudsClassic: 'clouds_cls',
|
||||
Precipitation: 'precipitation',
|
||||
PrecipitationClassic: 'precipitation_cls',
|
||||
Rain: 'rain',
|
||||
RainClassic: 'rain_cls',
|
||||
Pressure: 'pressure',
|
||||
PressureContour: 'pressure_cntr',
|
||||
Wind: 'wind',
|
||||
Temperature: 'temp',
|
||||
Snow: 'snow'
|
||||
}
|
||||
},
|
||||
HERE: {
|
||||
/*
|
||||
* HERE maps, formerly Nokia maps.
|
||||
* These basemaps are free, but you need an API key. Please sign up at
|
||||
* https://developer.here.com/plans
|
||||
*/
|
||||
url:
|
||||
'https://{s}.{base}.maps.api.here.com/maptile/2.1/' +
|
||||
'{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' +
|
||||
'app_id={app_id}&app_code={app_code}&lg={language}',
|
||||
options: {
|
||||
attribution:
|
||||
'Map © 1987-' + new Date().getFullYear() + ' <a href="http://developer.here.com">HERE</a>',
|
||||
subdomains: '1234',
|
||||
mapID: 'newest',
|
||||
'app_id': '<insert your app_id here>',
|
||||
'app_code': '<insert your app_code here>',
|
||||
base: 'base',
|
||||
variant: 'normal.day',
|
||||
maxZoom: 20,
|
||||
type: 'maptile',
|
||||
language: 'eng',
|
||||
format: 'png8',
|
||||
size: '256'
|
||||
},
|
||||
variants: {
|
||||
normalDay: 'normal.day',
|
||||
normalDayCustom: 'normal.day.custom',
|
||||
normalDayGrey: 'normal.day.grey',
|
||||
normalDayMobile: 'normal.day.mobile',
|
||||
normalDayGreyMobile: 'normal.day.grey.mobile',
|
||||
normalDayTransit: 'normal.day.transit',
|
||||
normalDayTransitMobile: 'normal.day.transit.mobile',
|
||||
normalDayTraffic: {
|
||||
options: {
|
||||
variant: 'normal.traffic.day',
|
||||
base: 'traffic',
|
||||
type: 'traffictile'
|
||||
}
|
||||
},
|
||||
normalNight: 'normal.night',
|
||||
normalNightMobile: 'normal.night.mobile',
|
||||
normalNightGrey: 'normal.night.grey',
|
||||
normalNightGreyMobile: 'normal.night.grey.mobile',
|
||||
normalNightTransit: 'normal.night.transit',
|
||||
normalNightTransitMobile: 'normal.night.transit.mobile',
|
||||
reducedDay: 'reduced.day',
|
||||
reducedNight: 'reduced.night',
|
||||
basicMap: {
|
||||
options: {
|
||||
type: 'basetile'
|
||||
}
|
||||
},
|
||||
mapLabels: {
|
||||
options: {
|
||||
type: 'labeltile',
|
||||
format: 'png'
|
||||
}
|
||||
},
|
||||
trafficFlow: {
|
||||
options: {
|
||||
base: 'traffic',
|
||||
type: 'flowtile'
|
||||
}
|
||||
},
|
||||
carnavDayGrey: 'carnav.day.grey',
|
||||
hybridDay: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'hybrid.day'
|
||||
}
|
||||
},
|
||||
hybridDayMobile: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'hybrid.day.mobile'
|
||||
}
|
||||
},
|
||||
hybridDayTransit: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'hybrid.day.transit'
|
||||
}
|
||||
},
|
||||
hybridDayGrey: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'hybrid.grey.day'
|
||||
}
|
||||
},
|
||||
hybridDayTraffic: {
|
||||
options: {
|
||||
variant: 'hybrid.traffic.day',
|
||||
base: 'traffic',
|
||||
type: 'traffictile'
|
||||
}
|
||||
},
|
||||
pedestrianDay: 'pedestrian.day',
|
||||
pedestrianNight: 'pedestrian.night',
|
||||
satelliteDay: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'satellite.day'
|
||||
}
|
||||
},
|
||||
terrainDay: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'terrain.day'
|
||||
}
|
||||
},
|
||||
terrainDayMobile: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'terrain.day.mobile'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
FreeMapSK: {
|
||||
url: 'http://t{s}.freemap.sk/T/{z}/{x}/{y}.jpeg',
|
||||
options: {
|
||||
minZoom: 8,
|
||||
maxZoom: 16,
|
||||
subdomains: '1234',
|
||||
bounds: [[47.204642, 15.996093], [49.830896, 22.576904]],
|
||||
attribution:
|
||||
'{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 <a href="http://freemap.sk">Freemap.sk</a>'
|
||||
}
|
||||
},
|
||||
MtbMap: {
|
||||
url: 'http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution:
|
||||
'{attribution.OpenStreetMap} & USGS'
|
||||
}
|
||||
},
|
||||
CartoDB: {
|
||||
url: 'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png',
|
||||
options: {
|
||||
attribution: '{attribution.OpenStreetMap} © <a href="https://carto.com/attributions">CARTO</a>',
|
||||
subdomains: 'abcd',
|
||||
maxZoom: 19,
|
||||
variant: 'light_all'
|
||||
},
|
||||
variants: {
|
||||
Positron: 'light_all',
|
||||
PositronNoLabels: 'light_nolabels',
|
||||
PositronOnlyLabels: 'light_only_labels',
|
||||
DarkMatter: 'dark_all',
|
||||
DarkMatterNoLabels: 'dark_nolabels',
|
||||
DarkMatterOnlyLabels: 'dark_only_labels',
|
||||
Voyager: 'rastertiles/voyager',
|
||||
VoyagerNoLabels: 'rastertiles/voyager_nolabels',
|
||||
VoyagerOnlyLabels: 'rastertiles/voyager_only_labels',
|
||||
VoyagerLabelsUnder: 'rastertiles/voyager_labels_under'
|
||||
}
|
||||
},
|
||||
HikeBike: {
|
||||
url: 'https://tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
attribution: '{attribution.OpenStreetMap}',
|
||||
variant: 'hikebike'
|
||||
},
|
||||
variants: {
|
||||
HikeBike: {},
|
||||
HillShading: {
|
||||
options: {
|
||||
maxZoom: 15,
|
||||
variant: 'hillshading'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
BasemapAT: {
|
||||
url: '//maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.{format}',
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
attribution: 'Datenquelle: <a href="https://www.basemap.at">basemap.at</a>',
|
||||
subdomains: ['', '1', '2', '3', '4'],
|
||||
format: 'png',
|
||||
bounds: [[46.358770, 8.782379], [49.037872, 17.189532]],
|
||||
variant: 'geolandbasemap'
|
||||
},
|
||||
variants: {
|
||||
basemap: {
|
||||
options: {
|
||||
maxZoom: 20, // currently only in Vienna
|
||||
variant: 'geolandbasemap'
|
||||
}
|
||||
},
|
||||
grau: 'bmapgrau',
|
||||
overlay: 'bmapoverlay',
|
||||
highdpi: {
|
||||
options: {
|
||||
variant: 'bmaphidpi',
|
||||
format: 'jpeg'
|
||||
}
|
||||
},
|
||||
orthofoto: {
|
||||
options: {
|
||||
maxZoom: 20, // currently only in Vienna
|
||||
variant: 'bmaporthofoto30cm',
|
||||
format: 'jpeg'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
nlmaps: {
|
||||
url: '//geodata.nationaalgeoregister.nl/tiles/service/wmts/{variant}/EPSG:3857/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
minZoom: 6,
|
||||
maxZoom: 19,
|
||||
bounds: [[50.5, 3.25], [54, 7.6]],
|
||||
attribution: 'Kaartgegevens © <a href="kadaster.nl">Kadaster</a>'
|
||||
},
|
||||
variants: {
|
||||
'standaard': 'brtachtergrondkaart',
|
||||
'pastel': 'brtachtergrondkaartpastel',
|
||||
'grijs': 'brtachtergrondkaartgrijs',
|
||||
'luchtfoto': {
|
||||
'url': '//geodata.nationaalgeoregister.nl/luchtfoto/rgb/wmts/1.0.0/2016_ortho25/EPSG:3857/{z}/{x}/{y}.png',
|
||||
}
|
||||
}
|
||||
},
|
||||
NASAGIBS: {
|
||||
url: 'https://map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}',
|
||||
options: {
|
||||
attribution:
|
||||
'Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System ' +
|
||||
'(<a href="https://earthdata.nasa.gov">ESDIS</a>) with funding provided by NASA/HQ.',
|
||||
bounds: [[-85.0511287776, -179.999999975], [85.0511287776, 179.999999975]],
|
||||
minZoom: 1,
|
||||
maxZoom: 9,
|
||||
format: 'jpg',
|
||||
time: '',
|
||||
tilematrixset: 'GoogleMapsCompatible_Level'
|
||||
},
|
||||
variants: {
|
||||
ModisTerraTrueColorCR: 'MODIS_Terra_CorrectedReflectance_TrueColor',
|
||||
ModisTerraBands367CR: 'MODIS_Terra_CorrectedReflectance_Bands367',
|
||||
ViirsEarthAtNight2012: {
|
||||
options: {
|
||||
variant: 'VIIRS_CityLights_2012',
|
||||
maxZoom: 8
|
||||
}
|
||||
},
|
||||
ModisTerraLSTDay: {
|
||||
options: {
|
||||
variant: 'MODIS_Terra_Land_Surface_Temp_Day',
|
||||
format: 'png',
|
||||
maxZoom: 7,
|
||||
opacity: 0.75
|
||||
}
|
||||
},
|
||||
ModisTerraSnowCover: {
|
||||
options: {
|
||||
variant: 'MODIS_Terra_Snow_Cover',
|
||||
format: 'png',
|
||||
maxZoom: 8,
|
||||
opacity: 0.75
|
||||
}
|
||||
},
|
||||
ModisTerraAOD: {
|
||||
options: {
|
||||
variant: 'MODIS_Terra_Aerosol',
|
||||
format: 'png',
|
||||
maxZoom: 6,
|
||||
opacity: 0.75
|
||||
}
|
||||
},
|
||||
ModisTerraChlorophyll: {
|
||||
options: {
|
||||
variant: 'MODIS_Terra_Chlorophyll_A',
|
||||
format: 'png',
|
||||
maxZoom: 7,
|
||||
opacity: 0.75
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
NLS: {
|
||||
// NLS maps are copyright National library of Scotland.
|
||||
// http://maps.nls.uk/projects/api/index.html
|
||||
// Please contact NLS for anything other than non-commercial low volume usage
|
||||
//
|
||||
// Map sources: Ordnance Survey 1:1m to 1:63K, 1920s-1940s
|
||||
// z0-9 - 1:1m
|
||||
// z10-11 - quarter inch (1:253440)
|
||||
// z12-18 - one inch (1:63360)
|
||||
url: '//nls-{s}.tileserver.com/nls/{z}/{x}/{y}.jpg',
|
||||
options: {
|
||||
attribution: '<a href="http://geo.nls.uk/maps/">National Library of Scotland Historic Maps</a>',
|
||||
bounds: [[49.6, -12], [61.7, 3]],
|
||||
minZoom: 1,
|
||||
maxZoom: 18,
|
||||
subdomains: '0123',
|
||||
}
|
||||
},
|
||||
JusticeMap: {
|
||||
// Justice Map (http://www.justicemap.org/)
|
||||
// Visualize race and income data for your community, county and country.
|
||||
// Includes tools for data journalists, bloggers and community activists.
|
||||
url: 'http://www.justicemap.org/tile/{size}/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution: '<a href="http://www.justicemap.org/terms.php">Justice Map</a>',
|
||||
// one of 'county', 'tract', 'block'
|
||||
size: 'county',
|
||||
// Bounds for USA, including Alaska and Hawaii
|
||||
bounds: [[14, -180], [72, -56]]
|
||||
},
|
||||
variants: {
|
||||
income: 'income',
|
||||
americanIndian: 'indian',
|
||||
asian: 'asian',
|
||||
black: 'black',
|
||||
hispanic: 'hispanic',
|
||||
multi: 'multi',
|
||||
nonWhite: 'nonwhite',
|
||||
white: 'white',
|
||||
plurality: 'plural'
|
||||
}
|
||||
},
|
||||
Wikimedia: {
|
||||
url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png',
|
||||
options: {
|
||||
attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia</a>',
|
||||
minZoom: 1,
|
||||
maxZoom: 19
|
||||
}
|
||||
},
|
||||
GeoportailFrance: {
|
||||
url: 'https://wxs.ign.fr/{apikey}/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}',
|
||||
options: {
|
||||
attribution: '<a target="_blank" href="https://www.geoportail.gouv.fr/">Geoportail France</a>',
|
||||
bounds: [[-75, -180], [81, 180]],
|
||||
minZoom: 2,
|
||||
maxZoom: 18,
|
||||
// Get your own geoportail apikey here : http://professionnels.ign.fr/ign/contrats/
|
||||
// NB : 'choisirgeoportail' is a demonstration key that comes with no guarantee
|
||||
apikey: 'choisirgeoportail',
|
||||
format: 'image/jpeg',
|
||||
style : 'normal',
|
||||
variant: 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD'
|
||||
},
|
||||
variants: {
|
||||
parcels: {
|
||||
options : {
|
||||
variant: 'CADASTRALPARCELS.PARCELS',
|
||||
maxZoom: 20,
|
||||
style : 'bdparcellaire',
|
||||
format: 'image/png'
|
||||
}
|
||||
},
|
||||
ignMaps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS',
|
||||
maps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD',
|
||||
orthos: {
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
variant: 'ORTHOIMAGERY.ORTHOPHOTOS'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
OneMapSG: {
|
||||
url: '//maps-{s}.onemap.sg/v3/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
variant: 'Default',
|
||||
minZoom: 11,
|
||||
maxZoom: 18,
|
||||
bounds: [[1.56073, 104.11475], [1.16, 103.502]],
|
||||
attribution: '<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
|
||||
},
|
||||
variants: {
|
||||
Default: 'Default',
|
||||
Night: 'Night',
|
||||
Original: 'Original',
|
||||
Grey: 'Grey',
|
||||
LandLot: 'LandLot'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
L.tileLayer.provider = function (provider, options) {
|
||||
return new L.TileLayer.Provider(provider, options);
|
||||
};
|
||||
|
||||
return L;
|
||||
}));
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
LeafletWidget.methods.addProviderTiles = function(provider, layerId, group, options) {
|
||||
this.layerManager.addLayer(L.tileLayer.provider(provider, options), "tile", layerId, group);
|
||||
};
|
||||
36
_site/site_libs/leafletfix-1.0.0/leafletfix.css
Normal file
36
_site/site_libs/leafletfix-1.0.0/leafletfix.css
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* Work around CSS properties introduced on img by bootstrap */
|
||||
img.leaflet-tile {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
}
|
||||
.info {
|
||||
padding: 6px 8px;
|
||||
font: 14px/16px Arial, Helvetica, sans-serif;
|
||||
background: white;
|
||||
background: rgba(255,255,255,0.8);
|
||||
box-shadow: 0 0 15px rgba(0,0,0,0.2);
|
||||
border-radius: 5px;
|
||||
}
|
||||
.legend {
|
||||
line-height: 18px;
|
||||
color: #555;
|
||||
}
|
||||
.legend svg text {
|
||||
fill: #555;
|
||||
}
|
||||
.legend svg line {
|
||||
stroke: #555;
|
||||
}
|
||||
.legend i {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-right: 4px;
|
||||
opacity: 0.7;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
/*For IE 7*/
|
||||
zoom: 1;
|
||||
*display: inline;
|
||||
}
|
||||
1
_site/site_libs/proj4-2.6.2/proj4.min.js
vendored
Normal file
1
_site/site_libs/proj4-2.6.2/proj4.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7971
_site/site_libs/quarto-contrib/fontawesome6-0.1.0/all.css
Normal file
7971
_site/site_libs/quarto-contrib/fontawesome6-0.1.0/all.css
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,30 @@
|
|||
.fa-tiny {
|
||||
font-size: 0.5em;
|
||||
}
|
||||
.fa-scriptsize {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
.fa-footnotesize {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.fa-small {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.fa-normalsize {
|
||||
font-size: 1em;
|
||||
}
|
||||
.fa-large {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.fa-Large {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.fa-LARGE {
|
||||
font-size: 1.75em;
|
||||
}
|
||||
.fa-huge {
|
||||
font-size: 2em;
|
||||
}
|
||||
.fa-Huge {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
9
_site/site_libs/quarto-html/anchor.min.js
vendored
Normal file
9
_site/site_libs/quarto-html/anchor.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
_site/site_libs/quarto-html/popper.min.js
vendored
Normal file
6
_site/site_libs/quarto-html/popper.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
189
_site/site_libs/quarto-html/quarto-syntax-highlighting-dark.css
Normal file
189
_site/site_libs/quarto-html/quarto-syntax-highlighting-dark.css
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
/* quarto syntax highlight colors */
|
||||
:root {
|
||||
--quarto-hl-al-color: #f07178;
|
||||
--quarto-hl-an-color: #d4d0ab;
|
||||
--quarto-hl-at-color: #00e0e0;
|
||||
--quarto-hl-bn-color: #d4d0ab;
|
||||
--quarto-hl-bu-color: #abe338;
|
||||
--quarto-hl-ch-color: #abe338;
|
||||
--quarto-hl-co-color: #f8f8f2;
|
||||
--quarto-hl-cv-color: #ffd700;
|
||||
--quarto-hl-cn-color: #ffd700;
|
||||
--quarto-hl-cf-color: #ffa07a;
|
||||
--quarto-hl-dt-color: #ffa07a;
|
||||
--quarto-hl-dv-color: #d4d0ab;
|
||||
--quarto-hl-do-color: #f8f8f2;
|
||||
--quarto-hl-er-color: #f07178;
|
||||
--quarto-hl-ex-color: #00e0e0;
|
||||
--quarto-hl-fl-color: #d4d0ab;
|
||||
--quarto-hl-fu-color: #ffa07a;
|
||||
--quarto-hl-im-color: #abe338;
|
||||
--quarto-hl-in-color: #d4d0ab;
|
||||
--quarto-hl-kw-color: #ffa07a;
|
||||
--quarto-hl-op-color: #ffa07a;
|
||||
--quarto-hl-ot-color: #00e0e0;
|
||||
--quarto-hl-pp-color: #dcc6e0;
|
||||
--quarto-hl-re-color: #00e0e0;
|
||||
--quarto-hl-sc-color: #abe338;
|
||||
--quarto-hl-ss-color: #abe338;
|
||||
--quarto-hl-st-color: #abe338;
|
||||
--quarto-hl-va-color: #00e0e0;
|
||||
--quarto-hl-vs-color: #abe338;
|
||||
--quarto-hl-wa-color: #dcc6e0;
|
||||
}
|
||||
|
||||
/* other quarto variables */
|
||||
:root {
|
||||
--quarto-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
}
|
||||
|
||||
code span.al {
|
||||
background-color: #2a0f15;
|
||||
font-weight: bold;
|
||||
color: #f07178;
|
||||
}
|
||||
|
||||
code span.an {
|
||||
color: #d4d0ab;
|
||||
}
|
||||
|
||||
code span.at {
|
||||
color: #00e0e0;
|
||||
}
|
||||
|
||||
code span.bn {
|
||||
color: #d4d0ab;
|
||||
}
|
||||
|
||||
code span.bu {
|
||||
color: #abe338;
|
||||
}
|
||||
|
||||
code span.ch {
|
||||
color: #abe338;
|
||||
}
|
||||
|
||||
code span.co {
|
||||
font-style: italic;
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
code span.cv {
|
||||
color: #ffd700;
|
||||
}
|
||||
|
||||
code span.cn {
|
||||
color: #ffd700;
|
||||
}
|
||||
|
||||
code span.cf {
|
||||
font-weight: bold;
|
||||
color: #ffa07a;
|
||||
}
|
||||
|
||||
code span.dt {
|
||||
color: #ffa07a;
|
||||
}
|
||||
|
||||
code span.dv {
|
||||
color: #d4d0ab;
|
||||
}
|
||||
|
||||
code span.do {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
code span.er {
|
||||
color: #f07178;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
code span.ex {
|
||||
font-weight: bold;
|
||||
color: #00e0e0;
|
||||
}
|
||||
|
||||
code span.fl {
|
||||
color: #d4d0ab;
|
||||
}
|
||||
|
||||
code span.fu {
|
||||
color: #ffa07a;
|
||||
}
|
||||
|
||||
code span.im {
|
||||
color: #abe338;
|
||||
}
|
||||
|
||||
code span.in {
|
||||
color: #d4d0ab;
|
||||
}
|
||||
|
||||
code span.kw {
|
||||
font-weight: bold;
|
||||
color: #ffa07a;
|
||||
}
|
||||
|
||||
pre > code.sourceCode > span {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
code span {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
code.sourceCode > span {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
div.sourceCode,
|
||||
div.sourceCode pre.sourceCode {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
code span.op {
|
||||
color: #ffa07a;
|
||||
}
|
||||
|
||||
code span.ot {
|
||||
color: #00e0e0;
|
||||
}
|
||||
|
||||
code span.pp {
|
||||
color: #dcc6e0;
|
||||
}
|
||||
|
||||
code span.re {
|
||||
background-color: #f8f8f2;
|
||||
color: #00e0e0;
|
||||
}
|
||||
|
||||
code span.sc {
|
||||
color: #abe338;
|
||||
}
|
||||
|
||||
code span.ss {
|
||||
color: #abe338;
|
||||
}
|
||||
|
||||
code span.st {
|
||||
color: #abe338;
|
||||
}
|
||||
|
||||
code span.va {
|
||||
color: #00e0e0;
|
||||
}
|
||||
|
||||
code span.vs {
|
||||
color: #abe338;
|
||||
}
|
||||
|
||||
code span.wa {
|
||||
color: #dcc6e0;
|
||||
}
|
||||
|
||||
.prevent-inlining {
|
||||
content: "</";
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=935a306eefa94366c21e1a970dddb765.css.map */
|
||||
205
_site/site_libs/quarto-html/quarto-syntax-highlighting.css
Normal file
205
_site/site_libs/quarto-html/quarto-syntax-highlighting.css
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
/* quarto syntax highlight colors */
|
||||
:root {
|
||||
--quarto-hl-ot-color: #003B4F;
|
||||
--quarto-hl-at-color: #657422;
|
||||
--quarto-hl-ss-color: #20794D;
|
||||
--quarto-hl-an-color: #5E5E5E;
|
||||
--quarto-hl-fu-color: #4758AB;
|
||||
--quarto-hl-st-color: #20794D;
|
||||
--quarto-hl-cf-color: #003B4F;
|
||||
--quarto-hl-op-color: #5E5E5E;
|
||||
--quarto-hl-er-color: #AD0000;
|
||||
--quarto-hl-bn-color: #AD0000;
|
||||
--quarto-hl-al-color: #AD0000;
|
||||
--quarto-hl-va-color: #111111;
|
||||
--quarto-hl-bu-color: inherit;
|
||||
--quarto-hl-ex-color: inherit;
|
||||
--quarto-hl-pp-color: #AD0000;
|
||||
--quarto-hl-in-color: #5E5E5E;
|
||||
--quarto-hl-vs-color: #20794D;
|
||||
--quarto-hl-wa-color: #5E5E5E;
|
||||
--quarto-hl-do-color: #5E5E5E;
|
||||
--quarto-hl-im-color: #00769E;
|
||||
--quarto-hl-ch-color: #20794D;
|
||||
--quarto-hl-dt-color: #AD0000;
|
||||
--quarto-hl-fl-color: #AD0000;
|
||||
--quarto-hl-co-color: #5E5E5E;
|
||||
--quarto-hl-cv-color: #5E5E5E;
|
||||
--quarto-hl-cn-color: #8f5902;
|
||||
--quarto-hl-sc-color: #5E5E5E;
|
||||
--quarto-hl-dv-color: #AD0000;
|
||||
--quarto-hl-kw-color: #003B4F;
|
||||
}
|
||||
|
||||
/* other quarto variables */
|
||||
:root {
|
||||
--quarto-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
}
|
||||
|
||||
pre > code.sourceCode > span {
|
||||
color: #003B4F;
|
||||
}
|
||||
|
||||
code span {
|
||||
color: #003B4F;
|
||||
}
|
||||
|
||||
code.sourceCode > span {
|
||||
color: #003B4F;
|
||||
}
|
||||
|
||||
div.sourceCode,
|
||||
div.sourceCode pre.sourceCode {
|
||||
color: #003B4F;
|
||||
}
|
||||
|
||||
code span.ot {
|
||||
color: #003B4F;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.at {
|
||||
color: #657422;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.ss {
|
||||
color: #20794D;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.an {
|
||||
color: #5E5E5E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.fu {
|
||||
color: #4758AB;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.st {
|
||||
color: #20794D;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.cf {
|
||||
color: #003B4F;
|
||||
font-weight: bold;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.op {
|
||||
color: #5E5E5E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.er {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.bn {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.al {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.va {
|
||||
color: #111111;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.bu {
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.ex {
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.pp {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.in {
|
||||
color: #5E5E5E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.vs {
|
||||
color: #20794D;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.wa {
|
||||
color: #5E5E5E;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
code span.do {
|
||||
color: #5E5E5E;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
code span.im {
|
||||
color: #00769E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.ch {
|
||||
color: #20794D;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.dt {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.fl {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.co {
|
||||
color: #5E5E5E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.cv {
|
||||
color: #5E5E5E;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
code span.cn {
|
||||
color: #8f5902;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.sc {
|
||||
color: #5E5E5E;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.dv {
|
||||
color: #AD0000;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
code span.kw {
|
||||
color: #003B4F;
|
||||
font-weight: bold;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
.prevent-inlining {
|
||||
content: "</";
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=debc5d5d77c3f9108843748ff7464032.css.map */
|
||||
908
_site/site_libs/quarto-html/quarto.js
Normal file
908
_site/site_libs/quarto-html/quarto.js
Normal file
|
|
@ -0,0 +1,908 @@
|
|||
const sectionChanged = new CustomEvent("quarto-sectionChanged", {
|
||||
detail: {},
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: false,
|
||||
});
|
||||
|
||||
const layoutMarginEls = () => {
|
||||
// Find any conflicting margin elements and add margins to the
|
||||
// top to prevent overlap
|
||||
const marginChildren = window.document.querySelectorAll(
|
||||
".column-margin.column-container > *, .margin-caption, .aside"
|
||||
);
|
||||
|
||||
let lastBottom = 0;
|
||||
for (const marginChild of marginChildren) {
|
||||
if (marginChild.offsetParent !== null) {
|
||||
// clear the top margin so we recompute it
|
||||
marginChild.style.marginTop = null;
|
||||
const top = marginChild.getBoundingClientRect().top + window.scrollY;
|
||||
if (top < lastBottom) {
|
||||
const marginChildStyle = window.getComputedStyle(marginChild);
|
||||
const marginBottom = parseFloat(marginChildStyle["marginBottom"]);
|
||||
const margin = lastBottom - top + marginBottom;
|
||||
marginChild.style.marginTop = `${margin}px`;
|
||||
}
|
||||
const styles = window.getComputedStyle(marginChild);
|
||||
const marginTop = parseFloat(styles["marginTop"]);
|
||||
lastBottom = top + marginChild.getBoundingClientRect().height + marginTop;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.document.addEventListener("DOMContentLoaded", function (_event) {
|
||||
// Recompute the position of margin elements anytime the body size changes
|
||||
if (window.ResizeObserver) {
|
||||
const resizeObserver = new window.ResizeObserver(
|
||||
throttle(() => {
|
||||
layoutMarginEls();
|
||||
if (
|
||||
window.document.body.getBoundingClientRect().width < 990 &&
|
||||
isReaderMode()
|
||||
) {
|
||||
quartoToggleReader();
|
||||
}
|
||||
}, 50)
|
||||
);
|
||||
resizeObserver.observe(window.document.body);
|
||||
}
|
||||
|
||||
const tocEl = window.document.querySelector('nav.toc-active[role="doc-toc"]');
|
||||
const sidebarEl = window.document.getElementById("quarto-sidebar");
|
||||
const leftTocEl = window.document.getElementById("quarto-sidebar-toc-left");
|
||||
const marginSidebarEl = window.document.getElementById(
|
||||
"quarto-margin-sidebar"
|
||||
);
|
||||
// function to determine whether the element has a previous sibling that is active
|
||||
const prevSiblingIsActiveLink = (el) => {
|
||||
const sibling = el.previousElementSibling;
|
||||
if (sibling && sibling.tagName === "A") {
|
||||
return sibling.classList.contains("active");
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// fire slideEnter for bootstrap tab activations (for htmlwidget resize behavior)
|
||||
function fireSlideEnter(e) {
|
||||
const event = window.document.createEvent("Event");
|
||||
event.initEvent("slideenter", true, true);
|
||||
window.document.dispatchEvent(event);
|
||||
}
|
||||
const tabs = window.document.querySelectorAll('a[data-bs-toggle="tab"]');
|
||||
tabs.forEach((tab) => {
|
||||
tab.addEventListener("shown.bs.tab", fireSlideEnter);
|
||||
});
|
||||
|
||||
// fire slideEnter for tabby tab activations (for htmlwidget resize behavior)
|
||||
document.addEventListener("tabby", fireSlideEnter, false);
|
||||
|
||||
// Track scrolling and mark TOC links as active
|
||||
// get table of contents and sidebar (bail if we don't have at least one)
|
||||
const tocLinks = tocEl
|
||||
? [...tocEl.querySelectorAll("a[data-scroll-target]")]
|
||||
: [];
|
||||
const makeActive = (link) => tocLinks[link].classList.add("active");
|
||||
const removeActive = (link) => tocLinks[link].classList.remove("active");
|
||||
const removeAllActive = () =>
|
||||
[...Array(tocLinks.length).keys()].forEach((link) => removeActive(link));
|
||||
|
||||
// activate the anchor for a section associated with this TOC entry
|
||||
tocLinks.forEach((link) => {
|
||||
link.addEventListener("click", () => {
|
||||
if (link.href.indexOf("#") !== -1) {
|
||||
const anchor = link.href.split("#")[1];
|
||||
const heading = window.document.querySelector(
|
||||
`[data-anchor-id="${anchor}"]`
|
||||
);
|
||||
if (heading) {
|
||||
// Add the class
|
||||
heading.classList.add("reveal-anchorjs-link");
|
||||
|
||||
// function to show the anchor
|
||||
const handleMouseout = () => {
|
||||
heading.classList.remove("reveal-anchorjs-link");
|
||||
heading.removeEventListener("mouseout", handleMouseout);
|
||||
};
|
||||
|
||||
// add a function to clear the anchor when the user mouses out of it
|
||||
heading.addEventListener("mouseout", handleMouseout);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const sections = tocLinks.map((link) => {
|
||||
const target = link.getAttribute("data-scroll-target");
|
||||
if (target.startsWith("#")) {
|
||||
return window.document.getElementById(decodeURI(`${target.slice(1)}`));
|
||||
} else {
|
||||
return window.document.querySelector(decodeURI(`${target}`));
|
||||
}
|
||||
});
|
||||
|
||||
const sectionMargin = 200;
|
||||
let currentActive = 0;
|
||||
// track whether we've initialized state the first time
|
||||
let init = false;
|
||||
|
||||
const updateActiveLink = () => {
|
||||
// The index from bottom to top (e.g. reversed list)
|
||||
let sectionIndex = -1;
|
||||
if (
|
||||
window.innerHeight + window.pageYOffset >=
|
||||
window.document.body.offsetHeight
|
||||
) {
|
||||
// This is the no-scroll case where last section should be the active one
|
||||
sectionIndex = 0;
|
||||
} else {
|
||||
// This finds the last section visible on screen that should be made active
|
||||
sectionIndex = [...sections].reverse().findIndex((section) => {
|
||||
if (section) {
|
||||
return window.pageYOffset >= section.offsetTop - sectionMargin;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (sectionIndex > -1) {
|
||||
const current = sections.length - sectionIndex - 1;
|
||||
if (current !== currentActive) {
|
||||
removeAllActive();
|
||||
currentActive = current;
|
||||
makeActive(current);
|
||||
if (init) {
|
||||
window.dispatchEvent(sectionChanged);
|
||||
}
|
||||
init = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const inHiddenRegion = (top, bottom, hiddenRegions) => {
|
||||
for (const region of hiddenRegions) {
|
||||
if (top <= region.bottom && bottom >= region.top) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const categorySelector = "header.quarto-title-block .quarto-category";
|
||||
const activateCategories = (href) => {
|
||||
// Find any categories
|
||||
// Surround them with a link pointing back to:
|
||||
// #category=Authoring
|
||||
try {
|
||||
const categoryEls = window.document.querySelectorAll(categorySelector);
|
||||
for (const categoryEl of categoryEls) {
|
||||
const categoryText = categoryEl.textContent;
|
||||
if (categoryText) {
|
||||
const link = `${href}#category=${encodeURIComponent(categoryText)}`;
|
||||
const linkEl = window.document.createElement("a");
|
||||
linkEl.setAttribute("href", link);
|
||||
for (const child of categoryEl.childNodes) {
|
||||
linkEl.append(child);
|
||||
}
|
||||
categoryEl.appendChild(linkEl);
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
// Ignore errors
|
||||
}
|
||||
};
|
||||
function hasTitleCategories() {
|
||||
return window.document.querySelector(categorySelector) !== null;
|
||||
}
|
||||
|
||||
function offsetRelativeUrl(url) {
|
||||
const offset = getMeta("quarto:offset");
|
||||
return offset ? offset + url : url;
|
||||
}
|
||||
|
||||
function offsetAbsoluteUrl(url) {
|
||||
const offset = getMeta("quarto:offset");
|
||||
const baseUrl = new URL(offset, window.location);
|
||||
|
||||
const projRelativeUrl = url.replace(baseUrl, "");
|
||||
if (projRelativeUrl.startsWith("/")) {
|
||||
return projRelativeUrl;
|
||||
} else {
|
||||
return "/" + projRelativeUrl;
|
||||
}
|
||||
}
|
||||
|
||||
// read a meta tag value
|
||||
function getMeta(metaName) {
|
||||
const metas = window.document.getElementsByTagName("meta");
|
||||
for (let i = 0; i < metas.length; i++) {
|
||||
if (metas[i].getAttribute("name") === metaName) {
|
||||
return metas[i].getAttribute("content");
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
async function findAndActivateCategories() {
|
||||
const currentPagePath = offsetAbsoluteUrl(window.location.href);
|
||||
const response = await fetch(offsetRelativeUrl("listings.json"));
|
||||
if (response.status == 200) {
|
||||
return response.json().then(function (listingPaths) {
|
||||
const listingHrefs = [];
|
||||
for (const listingPath of listingPaths) {
|
||||
const pathWithoutLeadingSlash = listingPath.listing.substring(1);
|
||||
for (const item of listingPath.items) {
|
||||
if (
|
||||
item === currentPagePath ||
|
||||
item === currentPagePath + "index.html"
|
||||
) {
|
||||
// Resolve this path against the offset to be sure
|
||||
// we already are using the correct path to the listing
|
||||
// (this adjusts the listing urls to be rooted against
|
||||
// whatever root the page is actually running against)
|
||||
const relative = offsetRelativeUrl(pathWithoutLeadingSlash);
|
||||
const baseUrl = window.location;
|
||||
const resolvedPath = new URL(relative, baseUrl);
|
||||
listingHrefs.push(resolvedPath.pathname);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Look up the tree for a nearby linting and use that if we find one
|
||||
const nearestListing = findNearestParentListing(
|
||||
offsetAbsoluteUrl(window.location.pathname),
|
||||
listingHrefs
|
||||
);
|
||||
if (nearestListing) {
|
||||
activateCategories(nearestListing);
|
||||
} else {
|
||||
// See if the referrer is a listing page for this item
|
||||
const referredRelativePath = offsetAbsoluteUrl(document.referrer);
|
||||
const referrerListing = listingHrefs.find((listingHref) => {
|
||||
const isListingReferrer =
|
||||
listingHref === referredRelativePath ||
|
||||
listingHref === referredRelativePath + "index.html";
|
||||
return isListingReferrer;
|
||||
});
|
||||
|
||||
if (referrerListing) {
|
||||
// Try to use the referrer if possible
|
||||
activateCategories(referrerListing);
|
||||
} else if (listingHrefs.length > 0) {
|
||||
// Otherwise, just fall back to the first listing
|
||||
activateCategories(listingHrefs[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (hasTitleCategories()) {
|
||||
findAndActivateCategories();
|
||||
}
|
||||
|
||||
const findNearestParentListing = (href, listingHrefs) => {
|
||||
if (!href || !listingHrefs) {
|
||||
return undefined;
|
||||
}
|
||||
// Look up the tree for a nearby linting and use that if we find one
|
||||
const relativeParts = href.substring(1).split("/");
|
||||
while (relativeParts.length > 0) {
|
||||
const path = relativeParts.join("/");
|
||||
for (const listingHref of listingHrefs) {
|
||||
if (listingHref.startsWith(path)) {
|
||||
return listingHref;
|
||||
}
|
||||
}
|
||||
relativeParts.pop();
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
const manageSidebarVisiblity = (el, placeholderDescriptor) => {
|
||||
let isVisible = true;
|
||||
let elRect;
|
||||
|
||||
return (hiddenRegions) => {
|
||||
if (el === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the last element of the TOC
|
||||
const lastChildEl = el.lastElementChild;
|
||||
|
||||
if (lastChildEl) {
|
||||
// Converts the sidebar to a menu
|
||||
const convertToMenu = () => {
|
||||
for (const child of el.children) {
|
||||
child.style.opacity = 0;
|
||||
child.style.overflow = "hidden";
|
||||
child.style.pointerEvents = "none";
|
||||
}
|
||||
|
||||
nexttick(() => {
|
||||
const toggleContainer = window.document.createElement("div");
|
||||
toggleContainer.style.width = "100%";
|
||||
toggleContainer.classList.add("zindex-over-content");
|
||||
toggleContainer.classList.add("quarto-sidebar-toggle");
|
||||
toggleContainer.classList.add("headroom-target"); // Marks this to be managed by headeroom
|
||||
toggleContainer.id = placeholderDescriptor.id;
|
||||
toggleContainer.style.position = "fixed";
|
||||
|
||||
const toggleIcon = window.document.createElement("i");
|
||||
toggleIcon.classList.add("quarto-sidebar-toggle-icon");
|
||||
toggleIcon.classList.add("bi");
|
||||
toggleIcon.classList.add("bi-caret-down-fill");
|
||||
|
||||
const toggleTitle = window.document.createElement("div");
|
||||
const titleEl = window.document.body.querySelector(
|
||||
placeholderDescriptor.titleSelector
|
||||
);
|
||||
if (titleEl) {
|
||||
toggleTitle.append(
|
||||
titleEl.textContent || titleEl.innerText,
|
||||
toggleIcon
|
||||
);
|
||||
}
|
||||
toggleTitle.classList.add("zindex-over-content");
|
||||
toggleTitle.classList.add("quarto-sidebar-toggle-title");
|
||||
toggleContainer.append(toggleTitle);
|
||||
|
||||
const toggleContents = window.document.createElement("div");
|
||||
toggleContents.classList = el.classList;
|
||||
toggleContents.classList.add("zindex-over-content");
|
||||
toggleContents.classList.add("quarto-sidebar-toggle-contents");
|
||||
for (const child of el.children) {
|
||||
if (child.id === "toc-title") {
|
||||
continue;
|
||||
}
|
||||
|
||||
const clone = child.cloneNode(true);
|
||||
clone.style.opacity = 1;
|
||||
clone.style.pointerEvents = null;
|
||||
clone.style.display = null;
|
||||
toggleContents.append(clone);
|
||||
}
|
||||
toggleContents.style.height = "0px";
|
||||
const positionToggle = () => {
|
||||
// position the element (top left of parent, same width as parent)
|
||||
if (!elRect) {
|
||||
elRect = el.getBoundingClientRect();
|
||||
}
|
||||
toggleContainer.style.left = `${elRect.left}px`;
|
||||
toggleContainer.style.top = `${elRect.top}px`;
|
||||
toggleContainer.style.width = `${elRect.width}px`;
|
||||
};
|
||||
positionToggle();
|
||||
|
||||
toggleContainer.append(toggleContents);
|
||||
el.parentElement.prepend(toggleContainer);
|
||||
|
||||
// Process clicks
|
||||
let tocShowing = false;
|
||||
// Allow the caller to control whether this is dismissed
|
||||
// when it is clicked (e.g. sidebar navigation supports
|
||||
// opening and closing the nav tree, so don't dismiss on click)
|
||||
const clickEl = placeholderDescriptor.dismissOnClick
|
||||
? toggleContainer
|
||||
: toggleTitle;
|
||||
|
||||
const closeToggle = () => {
|
||||
if (tocShowing) {
|
||||
toggleContainer.classList.remove("expanded");
|
||||
toggleContents.style.height = "0px";
|
||||
tocShowing = false;
|
||||
}
|
||||
};
|
||||
|
||||
// Get rid of any expanded toggle if the user scrolls
|
||||
window.document.addEventListener(
|
||||
"scroll",
|
||||
throttle(() => {
|
||||
closeToggle();
|
||||
}, 50)
|
||||
);
|
||||
|
||||
// Handle positioning of the toggle
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
throttle(() => {
|
||||
elRect = undefined;
|
||||
positionToggle();
|
||||
}, 50)
|
||||
);
|
||||
|
||||
window.addEventListener("quarto-hrChanged", () => {
|
||||
elRect = undefined;
|
||||
});
|
||||
|
||||
// Process the click
|
||||
clickEl.onclick = () => {
|
||||
if (!tocShowing) {
|
||||
toggleContainer.classList.add("expanded");
|
||||
toggleContents.style.height = null;
|
||||
tocShowing = true;
|
||||
} else {
|
||||
closeToggle();
|
||||
}
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
// Converts a sidebar from a menu back to a sidebar
|
||||
const convertToSidebar = () => {
|
||||
for (const child of el.children) {
|
||||
child.style.opacity = 1;
|
||||
child.style.overflow = null;
|
||||
child.style.pointerEvents = null;
|
||||
}
|
||||
|
||||
const placeholderEl = window.document.getElementById(
|
||||
placeholderDescriptor.id
|
||||
);
|
||||
if (placeholderEl) {
|
||||
placeholderEl.remove();
|
||||
}
|
||||
|
||||
el.classList.remove("rollup");
|
||||
};
|
||||
|
||||
if (isReaderMode()) {
|
||||
convertToMenu();
|
||||
isVisible = false;
|
||||
} else {
|
||||
// Find the top and bottom o the element that is being managed
|
||||
const elTop = el.offsetTop;
|
||||
const elBottom =
|
||||
elTop + lastChildEl.offsetTop + lastChildEl.offsetHeight;
|
||||
|
||||
if (!isVisible) {
|
||||
// If the element is current not visible reveal if there are
|
||||
// no conflicts with overlay regions
|
||||
if (!inHiddenRegion(elTop, elBottom, hiddenRegions)) {
|
||||
convertToSidebar();
|
||||
isVisible = true;
|
||||
}
|
||||
} else {
|
||||
// If the element is visible, hide it if it conflicts with overlay regions
|
||||
// and insert a placeholder toggle (or if we're in reader mode)
|
||||
if (inHiddenRegion(elTop, elBottom, hiddenRegions)) {
|
||||
convertToMenu();
|
||||
isVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const tabEls = document.querySelectorAll('a[data-bs-toggle="tab"]');
|
||||
for (const tabEl of tabEls) {
|
||||
const id = tabEl.getAttribute("data-bs-target");
|
||||
if (id) {
|
||||
const columnEl = document.querySelector(
|
||||
`${id} .column-margin, .tabset-margin-content`
|
||||
);
|
||||
if (columnEl)
|
||||
tabEl.addEventListener("shown.bs.tab", function (event) {
|
||||
const el = event.srcElement;
|
||||
if (el) {
|
||||
const visibleCls = `${el.id}-margin-content`;
|
||||
// walk up until we find a parent tabset
|
||||
let panelTabsetEl = el.parentElement;
|
||||
while (panelTabsetEl) {
|
||||
if (panelTabsetEl.classList.contains("panel-tabset")) {
|
||||
break;
|
||||
}
|
||||
panelTabsetEl = panelTabsetEl.parentElement;
|
||||
}
|
||||
|
||||
if (panelTabsetEl) {
|
||||
const prevSib = panelTabsetEl.previousElementSibling;
|
||||
if (
|
||||
prevSib &&
|
||||
prevSib.classList.contains("tabset-margin-container")
|
||||
) {
|
||||
const childNodes = prevSib.querySelectorAll(
|
||||
".tabset-margin-content"
|
||||
);
|
||||
for (const childEl of childNodes) {
|
||||
if (childEl.classList.contains(visibleCls)) {
|
||||
childEl.classList.remove("collapse");
|
||||
} else {
|
||||
childEl.classList.add("collapse");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
layoutMarginEls();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Manage the visibility of the toc and the sidebar
|
||||
const marginScrollVisibility = manageSidebarVisiblity(marginSidebarEl, {
|
||||
id: "quarto-toc-toggle",
|
||||
titleSelector: "#toc-title",
|
||||
dismissOnClick: true,
|
||||
});
|
||||
const sidebarScrollVisiblity = manageSidebarVisiblity(sidebarEl, {
|
||||
id: "quarto-sidebarnav-toggle",
|
||||
titleSelector: ".title",
|
||||
dismissOnClick: false,
|
||||
});
|
||||
let tocLeftScrollVisibility;
|
||||
if (leftTocEl) {
|
||||
tocLeftScrollVisibility = manageSidebarVisiblity(leftTocEl, {
|
||||
id: "quarto-lefttoc-toggle",
|
||||
titleSelector: "#toc-title",
|
||||
dismissOnClick: true,
|
||||
});
|
||||
}
|
||||
|
||||
// Find the first element that uses formatting in special columns
|
||||
const conflictingEls = window.document.body.querySelectorAll(
|
||||
'[class^="column-"], [class*=" column-"], aside, [class*="margin-caption"], [class*=" margin-caption"], [class*="margin-ref"], [class*=" margin-ref"]'
|
||||
);
|
||||
|
||||
// Filter all the possibly conflicting elements into ones
|
||||
// the do conflict on the left or ride side
|
||||
const arrConflictingEls = Array.from(conflictingEls);
|
||||
const leftSideConflictEls = arrConflictingEls.filter((el) => {
|
||||
if (el.tagName === "ASIDE") {
|
||||
return false;
|
||||
}
|
||||
return Array.from(el.classList).find((className) => {
|
||||
return (
|
||||
className !== "column-body" &&
|
||||
className.startsWith("column-") &&
|
||||
!className.endsWith("right") &&
|
||||
!className.endsWith("container") &&
|
||||
className !== "column-margin"
|
||||
);
|
||||
});
|
||||
});
|
||||
const rightSideConflictEls = arrConflictingEls.filter((el) => {
|
||||
if (el.tagName === "ASIDE") {
|
||||
return true;
|
||||
}
|
||||
|
||||
const hasMarginCaption = Array.from(el.classList).find((className) => {
|
||||
return className == "margin-caption";
|
||||
});
|
||||
if (hasMarginCaption) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return Array.from(el.classList).find((className) => {
|
||||
return (
|
||||
className !== "column-body" &&
|
||||
!className.endsWith("container") &&
|
||||
className.startsWith("column-") &&
|
||||
!className.endsWith("left")
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
const kOverlapPaddingSize = 10;
|
||||
function toRegions(els) {
|
||||
return els.map((el) => {
|
||||
const boundRect = el.getBoundingClientRect();
|
||||
const top =
|
||||
boundRect.top +
|
||||
document.documentElement.scrollTop -
|
||||
kOverlapPaddingSize;
|
||||
return {
|
||||
top,
|
||||
bottom: top + el.scrollHeight + 2 * kOverlapPaddingSize,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
let hasObserved = false;
|
||||
const visibleItemObserver = (els) => {
|
||||
let visibleElements = [...els];
|
||||
const intersectionObserver = new IntersectionObserver(
|
||||
(entries, _observer) => {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
if (visibleElements.indexOf(entry.target) === -1) {
|
||||
visibleElements.push(entry.target);
|
||||
}
|
||||
} else {
|
||||
visibleElements = visibleElements.filter((visibleEntry) => {
|
||||
return visibleEntry !== entry;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (!hasObserved) {
|
||||
hideOverlappedSidebars();
|
||||
}
|
||||
hasObserved = true;
|
||||
},
|
||||
{}
|
||||
);
|
||||
els.forEach((el) => {
|
||||
intersectionObserver.observe(el);
|
||||
});
|
||||
|
||||
return {
|
||||
getVisibleEntries: () => {
|
||||
return visibleElements;
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const rightElementObserver = visibleItemObserver(rightSideConflictEls);
|
||||
const leftElementObserver = visibleItemObserver(leftSideConflictEls);
|
||||
|
||||
const hideOverlappedSidebars = () => {
|
||||
marginScrollVisibility(toRegions(rightElementObserver.getVisibleEntries()));
|
||||
sidebarScrollVisiblity(toRegions(leftElementObserver.getVisibleEntries()));
|
||||
if (tocLeftScrollVisibility) {
|
||||
tocLeftScrollVisibility(
|
||||
toRegions(leftElementObserver.getVisibleEntries())
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
window.quartoToggleReader = () => {
|
||||
// Applies a slow class (or removes it)
|
||||
// to update the transition speed
|
||||
const slowTransition = (slow) => {
|
||||
const manageTransition = (id, slow) => {
|
||||
const el = document.getElementById(id);
|
||||
if (el) {
|
||||
if (slow) {
|
||||
el.classList.add("slow");
|
||||
} else {
|
||||
el.classList.remove("slow");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
manageTransition("TOC", slow);
|
||||
manageTransition("quarto-sidebar", slow);
|
||||
};
|
||||
const readerMode = !isReaderMode();
|
||||
setReaderModeValue(readerMode);
|
||||
|
||||
// If we're entering reader mode, slow the transition
|
||||
if (readerMode) {
|
||||
slowTransition(readerMode);
|
||||
}
|
||||
highlightReaderToggle(readerMode);
|
||||
hideOverlappedSidebars();
|
||||
|
||||
// If we're exiting reader mode, restore the non-slow transition
|
||||
if (!readerMode) {
|
||||
slowTransition(!readerMode);
|
||||
}
|
||||
};
|
||||
|
||||
const highlightReaderToggle = (readerMode) => {
|
||||
const els = document.querySelectorAll(".quarto-reader-toggle");
|
||||
if (els) {
|
||||
els.forEach((el) => {
|
||||
if (readerMode) {
|
||||
el.classList.add("reader");
|
||||
} else {
|
||||
el.classList.remove("reader");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const setReaderModeValue = (val) => {
|
||||
if (window.location.protocol !== "file:") {
|
||||
window.localStorage.setItem("quarto-reader-mode", val);
|
||||
} else {
|
||||
localReaderMode = val;
|
||||
}
|
||||
};
|
||||
|
||||
const isReaderMode = () => {
|
||||
if (window.location.protocol !== "file:") {
|
||||
return window.localStorage.getItem("quarto-reader-mode") === "true";
|
||||
} else {
|
||||
return localReaderMode;
|
||||
}
|
||||
};
|
||||
let localReaderMode = null;
|
||||
|
||||
const tocOpenDepthStr = tocEl?.getAttribute("data-toc-expanded");
|
||||
const tocOpenDepth = tocOpenDepthStr ? Number(tocOpenDepthStr) : 1;
|
||||
|
||||
// Walk the TOC and collapse/expand nodes
|
||||
// Nodes are expanded if:
|
||||
// - they are top level
|
||||
// - they have children that are 'active' links
|
||||
// - they are directly below an link that is 'active'
|
||||
const walk = (el, depth) => {
|
||||
// Tick depth when we enter a UL
|
||||
if (el.tagName === "UL") {
|
||||
depth = depth + 1;
|
||||
}
|
||||
|
||||
// It this is active link
|
||||
let isActiveNode = false;
|
||||
if (el.tagName === "A" && el.classList.contains("active")) {
|
||||
isActiveNode = true;
|
||||
}
|
||||
|
||||
// See if there is an active child to this element
|
||||
let hasActiveChild = false;
|
||||
for (child of el.children) {
|
||||
hasActiveChild = walk(child, depth) || hasActiveChild;
|
||||
}
|
||||
|
||||
// Process the collapse state if this is an UL
|
||||
if (el.tagName === "UL") {
|
||||
if (tocOpenDepth === -1 && depth > 1) {
|
||||
// toc-expand: false
|
||||
el.classList.add("collapse");
|
||||
} else if (
|
||||
depth <= tocOpenDepth ||
|
||||
hasActiveChild ||
|
||||
prevSiblingIsActiveLink(el)
|
||||
) {
|
||||
el.classList.remove("collapse");
|
||||
} else {
|
||||
el.classList.add("collapse");
|
||||
}
|
||||
|
||||
// untick depth when we leave a UL
|
||||
depth = depth - 1;
|
||||
}
|
||||
return hasActiveChild || isActiveNode;
|
||||
};
|
||||
|
||||
// walk the TOC and expand / collapse any items that should be shown
|
||||
if (tocEl) {
|
||||
updateActiveLink();
|
||||
walk(tocEl, 0);
|
||||
}
|
||||
|
||||
// Throttle the scroll event and walk peridiocally
|
||||
window.document.addEventListener(
|
||||
"scroll",
|
||||
throttle(() => {
|
||||
if (tocEl) {
|
||||
updateActiveLink();
|
||||
walk(tocEl, 0);
|
||||
}
|
||||
if (!isReaderMode()) {
|
||||
hideOverlappedSidebars();
|
||||
}
|
||||
}, 5)
|
||||
);
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
throttle(() => {
|
||||
if (tocEl) {
|
||||
updateActiveLink();
|
||||
walk(tocEl, 0);
|
||||
}
|
||||
if (!isReaderMode()) {
|
||||
hideOverlappedSidebars();
|
||||
}
|
||||
}, 10)
|
||||
);
|
||||
hideOverlappedSidebars();
|
||||
highlightReaderToggle(isReaderMode());
|
||||
});
|
||||
|
||||
// grouped tabsets
|
||||
window.addEventListener("pageshow", (_event) => {
|
||||
function getTabSettings() {
|
||||
const data = localStorage.getItem("quarto-persistent-tabsets-data");
|
||||
if (!data) {
|
||||
localStorage.setItem("quarto-persistent-tabsets-data", "{}");
|
||||
return {};
|
||||
}
|
||||
if (data) {
|
||||
return JSON.parse(data);
|
||||
}
|
||||
}
|
||||
|
||||
function setTabSettings(data) {
|
||||
localStorage.setItem(
|
||||
"quarto-persistent-tabsets-data",
|
||||
JSON.stringify(data)
|
||||
);
|
||||
}
|
||||
|
||||
function setTabState(groupName, groupValue) {
|
||||
const data = getTabSettings();
|
||||
data[groupName] = groupValue;
|
||||
setTabSettings(data);
|
||||
}
|
||||
|
||||
function toggleTab(tab, active) {
|
||||
const tabPanelId = tab.getAttribute("aria-controls");
|
||||
const tabPanel = document.getElementById(tabPanelId);
|
||||
if (active) {
|
||||
tab.classList.add("active");
|
||||
tabPanel.classList.add("active");
|
||||
} else {
|
||||
tab.classList.remove("active");
|
||||
tabPanel.classList.remove("active");
|
||||
}
|
||||
}
|
||||
|
||||
function toggleAll(selectedGroup, selectorsToSync) {
|
||||
for (const [thisGroup, tabs] of Object.entries(selectorsToSync)) {
|
||||
const active = selectedGroup === thisGroup;
|
||||
for (const tab of tabs) {
|
||||
toggleTab(tab, active);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function findSelectorsToSyncByLanguage() {
|
||||
const result = {};
|
||||
const tabs = Array.from(
|
||||
document.querySelectorAll(`div[data-group] a[id^='tabset-']`)
|
||||
);
|
||||
for (const item of tabs) {
|
||||
const div = item.parentElement.parentElement.parentElement;
|
||||
const group = div.getAttribute("data-group");
|
||||
if (!result[group]) {
|
||||
result[group] = {};
|
||||
}
|
||||
const selectorsToSync = result[group];
|
||||
const value = item.innerHTML;
|
||||
if (!selectorsToSync[value]) {
|
||||
selectorsToSync[value] = [];
|
||||
}
|
||||
selectorsToSync[value].push(item);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function setupSelectorSync() {
|
||||
const selectorsToSync = findSelectorsToSyncByLanguage();
|
||||
Object.entries(selectorsToSync).forEach(([group, tabSetsByValue]) => {
|
||||
Object.entries(tabSetsByValue).forEach(([value, items]) => {
|
||||
items.forEach((item) => {
|
||||
item.addEventListener("click", (_event) => {
|
||||
setTabState(group, value);
|
||||
toggleAll(value, selectorsToSync[group]);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
return selectorsToSync;
|
||||
}
|
||||
|
||||
const selectorsToSync = setupSelectorSync();
|
||||
for (const [group, selectedName] of Object.entries(getTabSettings())) {
|
||||
const selectors = selectorsToSync[group];
|
||||
// it's possible that stale state gives us empty selections, so we explicitly check here.
|
||||
if (selectors) {
|
||||
toggleAll(selectedName, selectors);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function throttle(func, wait) {
|
||||
let waiting = false;
|
||||
return function () {
|
||||
if (!waiting) {
|
||||
func.apply(this, arguments);
|
||||
waiting = true;
|
||||
setTimeout(function () {
|
||||
waiting = false;
|
||||
}, wait);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function nexttick(func) {
|
||||
return setTimeout(func, 0);
|
||||
}
|
||||
1
_site/site_libs/quarto-html/tippy.css
Normal file
1
_site/site_libs/quarto-html/tippy.css
Normal file
|
|
@ -0,0 +1 @@
|
|||
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
|
||||
2
_site/site_libs/quarto-html/tippy.umd.min.js
vendored
Normal file
2
_site/site_libs/quarto-html/tippy.umd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
_site/site_libs/quarto-listing/list.min.js
vendored
Normal file
2
_site/site_libs/quarto-listing/list.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
243
_site/site_libs/quarto-listing/quarto-listing.js
Normal file
243
_site/site_libs/quarto-listing/quarto-listing.js
Normal file
|
|
@ -0,0 +1,243 @@
|
|||
const kProgressiveAttr = "data-src";
|
||||
let categoriesLoaded = false;
|
||||
|
||||
window.quartoListingCategory = (category) => {
|
||||
if (categoriesLoaded) {
|
||||
activateCategory(category);
|
||||
setCategoryHash(category);
|
||||
}
|
||||
};
|
||||
|
||||
window["quarto-listing-loaded"] = () => {
|
||||
// Process any existing hash
|
||||
const hash = getHash();
|
||||
|
||||
if (hash) {
|
||||
// If there is a category, switch to that
|
||||
if (hash.category) {
|
||||
activateCategory(hash.category);
|
||||
}
|
||||
// Paginate a specific listing
|
||||
const listingIds = Object.keys(window["quarto-listings"]);
|
||||
for (const listingId of listingIds) {
|
||||
const page = hash[getListingPageKey(listingId)];
|
||||
if (page) {
|
||||
showPage(listingId, page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const listingIds = Object.keys(window["quarto-listings"]);
|
||||
for (const listingId of listingIds) {
|
||||
// The actual list
|
||||
const list = window["quarto-listings"][listingId];
|
||||
|
||||
// Update the handlers for pagination events
|
||||
refreshPaginationHandlers(listingId);
|
||||
|
||||
// Render any visible items that need it
|
||||
renderVisibleProgressiveImages(list);
|
||||
|
||||
// Whenever the list is updated, we also need to
|
||||
// attach handlers to the new pagination elements
|
||||
// and refresh any newly visible items.
|
||||
list.on("updated", function () {
|
||||
renderVisibleProgressiveImages(list);
|
||||
setTimeout(() => refreshPaginationHandlers(listingId));
|
||||
|
||||
// Show or hide the no matching message
|
||||
toggleNoMatchingMessage(list);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
window.document.addEventListener("DOMContentLoaded", function (_event) {
|
||||
// Attach click handlers to categories
|
||||
const categoryEls = window.document.querySelectorAll(
|
||||
".quarto-listing-category .category"
|
||||
);
|
||||
|
||||
for (const categoryEl of categoryEls) {
|
||||
const category = categoryEl.getAttribute("data-category");
|
||||
categoryEl.onclick = () => {
|
||||
activateCategory(category);
|
||||
setCategoryHash(category);
|
||||
};
|
||||
}
|
||||
|
||||
// Attach a click handler to the category title
|
||||
// (there should be only one, but since it is a class name, handle N)
|
||||
const categoryTitleEls = window.document.querySelectorAll(
|
||||
".quarto-listing-category-title"
|
||||
);
|
||||
for (const categoryTitleEl of categoryTitleEls) {
|
||||
categoryTitleEl.onclick = () => {
|
||||
activateCategory("");
|
||||
setCategoryHash("");
|
||||
};
|
||||
}
|
||||
|
||||
categoriesLoaded = true;
|
||||
});
|
||||
|
||||
function toggleNoMatchingMessage(list) {
|
||||
const selector = `#${list.listContainer.id} .listing-no-matching`;
|
||||
const noMatchingEl = window.document.querySelector(selector);
|
||||
if (noMatchingEl) {
|
||||
if (list.visibleItems.length === 0) {
|
||||
noMatchingEl.classList.remove("d-none");
|
||||
} else {
|
||||
if (!noMatchingEl.classList.contains("d-none")) {
|
||||
noMatchingEl.classList.add("d-none");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setCategoryHash(category) {
|
||||
setHash({ category });
|
||||
}
|
||||
|
||||
function setPageHash(listingId, page) {
|
||||
const currentHash = getHash() || {};
|
||||
currentHash[getListingPageKey(listingId)] = page;
|
||||
setHash(currentHash);
|
||||
}
|
||||
|
||||
function getListingPageKey(listingId) {
|
||||
return `${listingId}-page`;
|
||||
}
|
||||
|
||||
function refreshPaginationHandlers(listingId) {
|
||||
const listingEl = window.document.getElementById(listingId);
|
||||
const paginationEls = listingEl.querySelectorAll(
|
||||
".pagination li.page-item:not(.disabled) .page.page-link"
|
||||
);
|
||||
for (const paginationEl of paginationEls) {
|
||||
paginationEl.onclick = (sender) => {
|
||||
setPageHash(listingId, sender.target.getAttribute("data-i"));
|
||||
showPage(listingId, sender.target.getAttribute("data-i"));
|
||||
return false;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function renderVisibleProgressiveImages(list) {
|
||||
// Run through the visible items and render any progressive images
|
||||
for (const item of list.visibleItems) {
|
||||
const itemEl = item.elm;
|
||||
if (itemEl) {
|
||||
const progressiveImgs = itemEl.querySelectorAll(
|
||||
`img[${kProgressiveAttr}]`
|
||||
);
|
||||
for (const progressiveImg of progressiveImgs) {
|
||||
const srcValue = progressiveImg.getAttribute(kProgressiveAttr);
|
||||
if (srcValue) {
|
||||
progressiveImg.setAttribute("src", srcValue);
|
||||
}
|
||||
progressiveImg.removeAttribute(kProgressiveAttr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getHash() {
|
||||
// Hashes are of the form
|
||||
// #name:value|name1:value1|name2:value2
|
||||
const currentUrl = new URL(window.location);
|
||||
const hashRaw = currentUrl.hash ? currentUrl.hash.slice(1) : undefined;
|
||||
return parseHash(hashRaw);
|
||||
}
|
||||
|
||||
const kAnd = "&";
|
||||
const kEquals = "=";
|
||||
|
||||
function parseHash(hash) {
|
||||
if (!hash) {
|
||||
return undefined;
|
||||
}
|
||||
const hasValuesStrs = hash.split(kAnd);
|
||||
const hashValues = hasValuesStrs
|
||||
.map((hashValueStr) => {
|
||||
const vals = hashValueStr.split(kEquals);
|
||||
if (vals.length === 2) {
|
||||
return { name: vals[0], value: vals[1] };
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
})
|
||||
.filter((value) => {
|
||||
return value !== undefined;
|
||||
});
|
||||
|
||||
const hashObj = {};
|
||||
hashValues.forEach((hashValue) => {
|
||||
hashObj[hashValue.name] = decodeURIComponent(hashValue.value);
|
||||
});
|
||||
return hashObj;
|
||||
}
|
||||
|
||||
function makeHash(obj) {
|
||||
return Object.keys(obj)
|
||||
.map((key) => {
|
||||
return `${key}${kEquals}${obj[key]}`;
|
||||
})
|
||||
.join(kAnd);
|
||||
}
|
||||
|
||||
function setHash(obj) {
|
||||
const hash = makeHash(obj);
|
||||
window.history.pushState(null, null, `#${hash}`);
|
||||
}
|
||||
|
||||
function showPage(listingId, page) {
|
||||
const list = window["quarto-listings"][listingId];
|
||||
if (list) {
|
||||
list.show((page - 1) * list.page + 1, list.page);
|
||||
}
|
||||
}
|
||||
|
||||
function activateCategory(category) {
|
||||
// Deactivate existing categories
|
||||
const activeEls = window.document.querySelectorAll(
|
||||
".quarto-listing-category .category.active"
|
||||
);
|
||||
for (const activeEl of activeEls) {
|
||||
activeEl.classList.remove("active");
|
||||
}
|
||||
|
||||
// Activate this category
|
||||
const categoryEl = window.document.querySelector(
|
||||
`.quarto-listing-category .category[data-category='${category}'`
|
||||
);
|
||||
if (categoryEl) {
|
||||
categoryEl.classList.add("active");
|
||||
}
|
||||
|
||||
// Filter the listings to this category
|
||||
filterListingCategory(category);
|
||||
}
|
||||
|
||||
function filterListingCategory(category) {
|
||||
const listingIds = Object.keys(window["quarto-listings"]);
|
||||
for (const listingId of listingIds) {
|
||||
const list = window["quarto-listings"][listingId];
|
||||
if (list) {
|
||||
if (category === "") {
|
||||
// resets the filter
|
||||
list.filter();
|
||||
} else {
|
||||
// filter to this category
|
||||
list.filter(function (item) {
|
||||
const itemValues = item.values();
|
||||
if (itemValues.categories !== null) {
|
||||
const categories = itemValues.categories.split(",");
|
||||
return categories.includes(category);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
_site/site_libs/quarto-nav/headroom.min.js
vendored
Normal file
7
_site/site_libs/quarto-nav/headroom.min.js
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/*!
|
||||
* headroom.js v0.12.0 - Give your page some headroom. Hide your header until you need it
|
||||
* Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js
|
||||
* License: MIT
|
||||
*/
|
||||
|
||||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).Headroom=n()}(this,function(){"use strict";function t(){return"undefined"!=typeof window}function d(t){return function(t){return t&&t.document&&function(t){return 9===t.nodeType}(t.document)}(t)?function(t){var n=t.document,o=n.body,s=n.documentElement;return{scrollHeight:function(){return Math.max(o.scrollHeight,s.scrollHeight,o.offsetHeight,s.offsetHeight,o.clientHeight,s.clientHeight)},height:function(){return t.innerHeight||s.clientHeight||o.clientHeight},scrollY:function(){return void 0!==t.pageYOffset?t.pageYOffset:(s||o.parentNode||o).scrollTop}}}(t):function(t){return{scrollHeight:function(){return Math.max(t.scrollHeight,t.offsetHeight,t.clientHeight)},height:function(){return Math.max(t.offsetHeight,t.clientHeight)},scrollY:function(){return t.scrollTop}}}(t)}function n(t,s,e){var n,o=function(){var n=!1;try{var t={get passive(){n=!0}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){n=!1}return n}(),i=!1,r=d(t),l=r.scrollY(),a={};function c(){var t=Math.round(r.scrollY()),n=r.height(),o=r.scrollHeight();a.scrollY=t,a.lastScrollY=l,a.direction=l<t?"down":"up",a.distance=Math.abs(t-l),a.isOutOfBounds=t<0||o<t+n,a.top=t<=s.offset[a.direction],a.bottom=o<=t+n,a.toleranceExceeded=a.distance>s.tolerance[a.direction],e(a),l=t,i=!1}function h(){i||(i=!0,n=requestAnimationFrame(c))}var u=!!o&&{passive:!0,capture:!1};return t.addEventListener("scroll",h,u),c(),{destroy:function(){cancelAnimationFrame(n),t.removeEventListener("scroll",h,u)}}}function o(t){return t===Object(t)?t:{down:t,up:t}}function s(t,n){n=n||{},Object.assign(this,s.options,n),this.classes=Object.assign({},s.options.classes,n.classes),this.elem=t,this.tolerance=o(this.tolerance),this.offset=o(this.offset),this.initialised=!1,this.frozen=!1}return s.prototype={constructor:s,init:function(){return s.cutsTheMustard&&!this.initialised&&(this.addClass("initial"),this.initialised=!0,setTimeout(function(t){t.scrollTracker=n(t.scroller,{offset:t.offset,tolerance:t.tolerance},t.update.bind(t))},100,this)),this},destroy:function(){this.initialised=!1,Object.keys(this.classes).forEach(this.removeClass,this),this.scrollTracker.destroy()},unpin:function(){!this.hasClass("pinned")&&this.hasClass("unpinned")||(this.addClass("unpinned"),this.removeClass("pinned"),this.onUnpin&&this.onUnpin.call(this))},pin:function(){this.hasClass("unpinned")&&(this.addClass("pinned"),this.removeClass("unpinned"),this.onPin&&this.onPin.call(this))},freeze:function(){this.frozen=!0,this.addClass("frozen")},unfreeze:function(){this.frozen=!1,this.removeClass("frozen")},top:function(){this.hasClass("top")||(this.addClass("top"),this.removeClass("notTop"),this.onTop&&this.onTop.call(this))},notTop:function(){this.hasClass("notTop")||(this.addClass("notTop"),this.removeClass("top"),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){this.hasClass("bottom")||(this.addClass("bottom"),this.removeClass("notBottom"),this.onBottom&&this.onBottom.call(this))},notBottom:function(){this.hasClass("notBottom")||(this.addClass("notBottom"),this.removeClass("bottom"),this.onNotBottom&&this.onNotBottom.call(this))},shouldUnpin:function(t){return"down"===t.direction&&!t.top&&t.toleranceExceeded},shouldPin:function(t){return"up"===t.direction&&t.toleranceExceeded||t.top},addClass:function(t){this.elem.classList.add.apply(this.elem.classList,this.classes[t].split(" "))},removeClass:function(t){this.elem.classList.remove.apply(this.elem.classList,this.classes[t].split(" "))},hasClass:function(t){return this.classes[t].split(" ").every(function(t){return this.classList.contains(t)},this.elem)},update:function(t){t.isOutOfBounds||!0!==this.frozen&&(t.top?this.top():this.notTop(),t.bottom?this.bottom():this.notBottom(),this.shouldUnpin(t)?this.unpin():this.shouldPin(t)&&this.pin())}},s.options={tolerance:{up:0,down:0},offset:0,scroller:t()?window:null,classes:{frozen:"headroom--frozen",pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},s.cutsTheMustard=!!(t()&&function(){}.bind&&"classList"in document.documentElement&&Object.assign&&Object.keys&&requestAnimationFrame),s});
|
||||
325
_site/site_libs/quarto-nav/quarto-nav.js
Normal file
325
_site/site_libs/quarto-nav/quarto-nav.js
Normal file
|
|
@ -0,0 +1,325 @@
|
|||
const headroomChanged = new CustomEvent("quarto-hrChanged", {
|
||||
detail: {},
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: false,
|
||||
});
|
||||
|
||||
const announceDismiss = () => {
|
||||
const annEl = window.document.getElementById("quarto-announcement");
|
||||
if (annEl) {
|
||||
annEl.remove();
|
||||
|
||||
const annId = annEl.getAttribute("data-announcement-id");
|
||||
window.localStorage.setItem(`quarto-announce-${annId}`, "true");
|
||||
}
|
||||
};
|
||||
|
||||
const announceRegister = () => {
|
||||
const annEl = window.document.getElementById("quarto-announcement");
|
||||
if (annEl) {
|
||||
const annId = annEl.getAttribute("data-announcement-id");
|
||||
const isDismissed =
|
||||
window.localStorage.getItem(`quarto-announce-${annId}`) || false;
|
||||
if (isDismissed) {
|
||||
announceDismiss();
|
||||
return;
|
||||
} else {
|
||||
annEl.classList.remove("hidden");
|
||||
}
|
||||
|
||||
const actionEl = annEl.querySelector(".quarto-announcement-action");
|
||||
if (actionEl) {
|
||||
actionEl.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
// Hide the bar immediately
|
||||
announceDismiss();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.document.addEventListener("DOMContentLoaded", function () {
|
||||
let init = false;
|
||||
|
||||
announceRegister();
|
||||
|
||||
// Manage the back to top button, if one is present.
|
||||
let lastScrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||
const scrollDownBuffer = 5;
|
||||
const scrollUpBuffer = 35;
|
||||
const btn = document.getElementById("quarto-back-to-top");
|
||||
const hideBackToTop = () => {
|
||||
btn.style.display = "none";
|
||||
};
|
||||
const showBackToTop = () => {
|
||||
btn.style.display = "inline-block";
|
||||
};
|
||||
if (btn) {
|
||||
window.document.addEventListener(
|
||||
"scroll",
|
||||
function () {
|
||||
const currentScrollTop =
|
||||
window.pageYOffset || document.documentElement.scrollTop;
|
||||
|
||||
// Shows and hides the button 'intelligently' as the user scrolls
|
||||
if (currentScrollTop - scrollDownBuffer > lastScrollTop) {
|
||||
hideBackToTop();
|
||||
lastScrollTop = currentScrollTop <= 0 ? 0 : currentScrollTop;
|
||||
} else if (currentScrollTop < lastScrollTop - scrollUpBuffer) {
|
||||
showBackToTop();
|
||||
lastScrollTop = currentScrollTop <= 0 ? 0 : currentScrollTop;
|
||||
}
|
||||
|
||||
// Show the button at the bottom, hides it at the top
|
||||
if (currentScrollTop <= 0) {
|
||||
hideBackToTop();
|
||||
} else if (
|
||||
window.innerHeight + currentScrollTop >=
|
||||
document.body.offsetHeight
|
||||
) {
|
||||
showBackToTop();
|
||||
}
|
||||
},
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
function throttle(func, wait) {
|
||||
var timeout;
|
||||
return function () {
|
||||
const context = this;
|
||||
const args = arguments;
|
||||
const later = function () {
|
||||
clearTimeout(timeout);
|
||||
timeout = null;
|
||||
func.apply(context, args);
|
||||
};
|
||||
|
||||
if (!timeout) {
|
||||
timeout = setTimeout(later, wait);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function headerOffset() {
|
||||
// Set an offset if there is are fixed top navbar
|
||||
const headerEl = window.document.querySelector("header.fixed-top");
|
||||
if (headerEl) {
|
||||
return headerEl.clientHeight;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function footerOffset() {
|
||||
const footerEl = window.document.querySelector("footer.footer");
|
||||
if (footerEl) {
|
||||
return footerEl.clientHeight;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function dashboardOffset() {
|
||||
const dashboardNavEl = window.document.getElementById(
|
||||
"quarto-dashboard-header"
|
||||
);
|
||||
if (dashboardNavEl !== null) {
|
||||
return dashboardNavEl.clientHeight;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function updateDocumentOffsetWithoutAnimation() {
|
||||
updateDocumentOffset(false);
|
||||
}
|
||||
|
||||
function updateDocumentOffset(animated) {
|
||||
// set body offset
|
||||
const topOffset = headerOffset();
|
||||
const bodyOffset = topOffset + footerOffset() + dashboardOffset();
|
||||
const bodyEl = window.document.body;
|
||||
bodyEl.setAttribute("data-bs-offset", topOffset);
|
||||
bodyEl.style.paddingTop = topOffset + "px";
|
||||
|
||||
// deal with sidebar offsets
|
||||
const sidebars = window.document.querySelectorAll(
|
||||
".sidebar, .headroom-target"
|
||||
);
|
||||
sidebars.forEach((sidebar) => {
|
||||
if (!animated) {
|
||||
sidebar.classList.add("notransition");
|
||||
// Remove the no transition class after the animation has time to complete
|
||||
setTimeout(function () {
|
||||
sidebar.classList.remove("notransition");
|
||||
}, 201);
|
||||
}
|
||||
|
||||
if (window.Headroom && sidebar.classList.contains("sidebar-unpinned")) {
|
||||
sidebar.style.top = "0";
|
||||
sidebar.style.maxHeight = "100vh";
|
||||
} else {
|
||||
sidebar.style.top = topOffset + "px";
|
||||
sidebar.style.maxHeight = "calc(100vh - " + topOffset + "px)";
|
||||
}
|
||||
});
|
||||
|
||||
// allow space for footer
|
||||
const mainContainer = window.document.querySelector(".quarto-container");
|
||||
if (mainContainer) {
|
||||
mainContainer.style.minHeight = "calc(100vh - " + bodyOffset + "px)";
|
||||
}
|
||||
|
||||
// link offset
|
||||
let linkStyle = window.document.querySelector("#quarto-target-style");
|
||||
if (!linkStyle) {
|
||||
linkStyle = window.document.createElement("style");
|
||||
linkStyle.setAttribute("id", "quarto-target-style");
|
||||
window.document.head.appendChild(linkStyle);
|
||||
}
|
||||
while (linkStyle.firstChild) {
|
||||
linkStyle.removeChild(linkStyle.firstChild);
|
||||
}
|
||||
if (topOffset > 0) {
|
||||
linkStyle.appendChild(
|
||||
window.document.createTextNode(`
|
||||
section:target::before {
|
||||
content: "";
|
||||
display: block;
|
||||
height: ${topOffset}px;
|
||||
margin: -${topOffset}px 0 0;
|
||||
}`)
|
||||
);
|
||||
}
|
||||
if (init) {
|
||||
window.dispatchEvent(headroomChanged);
|
||||
}
|
||||
init = true;
|
||||
}
|
||||
|
||||
// initialize headroom
|
||||
var header = window.document.querySelector("#quarto-header");
|
||||
if (header && window.Headroom) {
|
||||
const headroom = new window.Headroom(header, {
|
||||
tolerance: 5,
|
||||
onPin: function () {
|
||||
const sidebars = window.document.querySelectorAll(
|
||||
".sidebar, .headroom-target"
|
||||
);
|
||||
sidebars.forEach((sidebar) => {
|
||||
sidebar.classList.remove("sidebar-unpinned");
|
||||
});
|
||||
updateDocumentOffset();
|
||||
},
|
||||
onUnpin: function () {
|
||||
const sidebars = window.document.querySelectorAll(
|
||||
".sidebar, .headroom-target"
|
||||
);
|
||||
sidebars.forEach((sidebar) => {
|
||||
sidebar.classList.add("sidebar-unpinned");
|
||||
});
|
||||
updateDocumentOffset();
|
||||
},
|
||||
});
|
||||
headroom.init();
|
||||
|
||||
let frozen = false;
|
||||
window.quartoToggleHeadroom = function () {
|
||||
if (frozen) {
|
||||
headroom.unfreeze();
|
||||
frozen = false;
|
||||
} else {
|
||||
headroom.freeze();
|
||||
frozen = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
window.addEventListener(
|
||||
"hashchange",
|
||||
function (e) {
|
||||
if (
|
||||
getComputedStyle(document.documentElement).scrollBehavior !== "smooth"
|
||||
) {
|
||||
window.scrollTo(0, window.pageYOffset - headerOffset());
|
||||
}
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
// Observe size changed for the header
|
||||
const headerEl = window.document.querySelector("header.fixed-top");
|
||||
if (headerEl && window.ResizeObserver) {
|
||||
const observer = new window.ResizeObserver(() => {
|
||||
setTimeout(updateDocumentOffsetWithoutAnimation, 0);
|
||||
});
|
||||
observer.observe(headerEl, {
|
||||
attributes: true,
|
||||
childList: true,
|
||||
characterData: true,
|
||||
});
|
||||
} else {
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
throttle(updateDocumentOffsetWithoutAnimation, 50)
|
||||
);
|
||||
}
|
||||
setTimeout(updateDocumentOffsetWithoutAnimation, 250);
|
||||
|
||||
// fixup index.html links if we aren't on the filesystem
|
||||
if (window.location.protocol !== "file:") {
|
||||
const links = window.document.querySelectorAll("a");
|
||||
for (let i = 0; i < links.length; i++) {
|
||||
if (links[i].href) {
|
||||
links[i].dataset.originalHref = links[i].href;
|
||||
links[i].href = links[i].href.replace(/\/index\.html/, "/");
|
||||
}
|
||||
}
|
||||
|
||||
// Fixup any sharing links that require urls
|
||||
// Append url to any sharing urls
|
||||
const sharingLinks = window.document.querySelectorAll(
|
||||
"a.sidebar-tools-main-item, a.quarto-navigation-tool, a.quarto-navbar-tools, a.quarto-navbar-tools-item"
|
||||
);
|
||||
for (let i = 0; i < sharingLinks.length; i++) {
|
||||
const sharingLink = sharingLinks[i];
|
||||
const href = sharingLink.getAttribute("href");
|
||||
if (href) {
|
||||
sharingLink.setAttribute(
|
||||
"href",
|
||||
href.replace("|url|", window.location.href)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Scroll the active navigation item into view, if necessary
|
||||
const navSidebar = window.document.querySelector("nav#quarto-sidebar");
|
||||
if (navSidebar) {
|
||||
// Find the active item
|
||||
const activeItem = navSidebar.querySelector("li.sidebar-item a.active");
|
||||
if (activeItem) {
|
||||
// Wait for the scroll height and height to resolve by observing size changes on the
|
||||
// nav element that is scrollable
|
||||
const resizeObserver = new ResizeObserver((_entries) => {
|
||||
// The bottom of the element
|
||||
const elBottom = activeItem.offsetTop;
|
||||
const viewBottom = navSidebar.scrollTop + navSidebar.clientHeight;
|
||||
|
||||
// The element height and scroll height are the same, then we are still loading
|
||||
if (viewBottom !== navSidebar.scrollHeight) {
|
||||
// Determine if the item isn't visible and scroll to it
|
||||
if (elBottom >= viewBottom) {
|
||||
navSidebar.scrollTop = elBottom;
|
||||
}
|
||||
|
||||
// stop observing now since we've completed the scroll
|
||||
resizeObserver.unobserve(navSidebar);
|
||||
}
|
||||
});
|
||||
resizeObserver.observe(navSidebar);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
3
_site/site_libs/quarto-search/autocomplete.umd.js
Normal file
3
_site/site_libs/quarto-search/autocomplete.umd.js
Normal file
File diff suppressed because one or more lines are too long
9
_site/site_libs/quarto-search/fuse.min.js
vendored
Normal file
9
_site/site_libs/quarto-search/fuse.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1290
_site/site_libs/quarto-search/quarto-search.js
Normal file
1290
_site/site_libs/quarto-search/quarto-search.js
Normal file
File diff suppressed because it is too large
Load diff
BIN
_site/site_libs/rstudio_leaflet-1.3.1/images/1px.png
Normal file
BIN
_site/site_libs/rstudio_leaflet-1.3.1/images/1px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 B |
41
_site/site_libs/rstudio_leaflet-1.3.1/rstudio_leaflet.css
Normal file
41
_site/site_libs/rstudio_leaflet-1.3.1/rstudio_leaflet.css
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
.leaflet-tooltip.leaflet-tooltip-text-only,
|
||||
.leaflet-tooltip.leaflet-tooltip-text-only:before,
|
||||
.leaflet-tooltip.leaflet-tooltip-text-only:after {
|
||||
background: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.leaflet-tooltip.leaflet-tooltip-text-only.leaflet-tooltip-left {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.leaflet-tooltip.leaflet-tooltip-text-only.leaflet-tooltip-right {
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
.leaflet-tooltip:after {
|
||||
border-right: 6px solid transparent;
|
||||
/* right: -16px; */
|
||||
}
|
||||
|
||||
.leaflet-popup-pane .leaflet-popup-tip-container {
|
||||
/* when the tooltip container is clicked, it is closed */
|
||||
pointer-events: all;
|
||||
/* tooltips should display the "hand" icon, just like .leaflet-interactive*/
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* have the widget be displayed in the right 'layer' */
|
||||
.leaflet-map-pane {
|
||||
z-index: auto;
|
||||
}
|
||||
|
||||
/* Add missing rule from leaflet for img.
|
||||
This complete existing leaflet.css.
|
||||
Fix for https://github.com/rstudio/rmarkdown/issues/1949 */
|
||||
.leaflet-container .leaflet-right-pane img,
|
||||
.leaflet-container .leaflet-left-pane img {
|
||||
max-width: none !important;
|
||||
max-height: none !important;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue