@3dwayfinder/wayfinder-vue-components
Version:
VueJS UI components for 3D Wayfinder floor plans
7,013 lines • 228 kB
JavaScript
import Vue$1 from 'vue';
//
//
//
//
//
//
const urls$1 = {
api: {
live: "//wayfinder-cdn.com/api",
enterprise: "../../../api/",
dev: "//api.3dwayfinder.com",
snapshot: "../../../api/"
},
assets: {
live: "https://wayfinder-cdn.com/shared/",
dev: "//static.3dwayfinder.com/shared/",
enterprise: "../../../shared/",
snapshot: "../../../shared/"
},
js: {
live: "https://wayfinder-cdn.com/",
dev: "//static.3dwayfinder.com",
enterprise: "../../../",
snapshot: "../../../"
}
};
var script$B = {
data() {
return {
lastClick: false,
landscape: false,
screensaver: false,
maxInActivity: 30
};
},
mounted() {
this.resize();
window.onresize = () => {
this.resize();
};
this.$wayfinder.events.on("data-loaded", () => {
this.maxInActivity = this.$wayfinder.settings.getInt("kiosk.max-inactivity", 30);
});
this.lastClick = setTimeout(() => {
// Start screensaver
this.$emit("screensaving");
this.screensaver = true;
}, this.maxInActivity * 1000);
},
methods: {
onTouch(e) {
clearTimeout(this.lastClick);
this.$emit("touched", e);
this.screensaver = false;
this.$wayfinder.run();
this.lastClick = setTimeout(() => {
// Start screensaver
this.$emit("screensaving");
this.screensaver = true;
this.$wayfinder.showKiosk();
this.$wayfinder.restoreDefaultState();
setTimeout(() => {
this.$wayfinder.pause();
}, 1000);
this.$store.dispatch('wf/SET_RESET', Date.now());
}, this.maxInActivity * 1000);
return false;
},
resize() {
let _l = window.matchMedia("(orientation: landscape)");
let _pm = window.matchMedia("(max-height: 1024px) and (orientation: portrait)");
let _lm = window.matchMedia("(max-width: 1024px) and (orientation: landscape)");
this.landscape = _l ? _l.matches : false;
let mobile = (_pm ? _pm.matches : false) || (_lm ? _lm.matches : false);
this.$store.dispatch('wf/SET_LANDSCAPE', this.landscape);
this.$store.dispatch('wf/SET_PORTRAIT', !this.landscape);
this.$store.dispatch('wf/SET_MOBILE', mobile);
},
getURL(_env, type) {
return urls$1[type][_env];
},
loadScript(url, callback) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
var x = document.getElementsByTagName('head')[0];
x.appendChild(s);
if (typeof callback == "function") {
s.onload = callback;
s.src = url;
}
}
}
};
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
if (typeof shadowMode !== 'boolean') {
createInjectorSSR = createInjector;
createInjector = shadowMode;
shadowMode = false;
}
// Vue.extend constructor export interop.
const options = typeof script === 'function' ? script.options : script;
// render functions
if (template && template.render) {
options.render = template.render;
options.staticRenderFns = template.staticRenderFns;
options._compiled = true;
// functional template
if (isFunctionalTemplate) {
options.functional = true;
}
}
// scopedId
if (scopeId) {
options._scopeId = scopeId;
}
let hook;
if (moduleIdentifier) {
// server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__;
}
// inject component styles
if (style) {
style.call(this, createInjectorSSR(context));
}
// register component module identifier for async chunk inference
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier);
}
};
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook;
}
else if (style) {
hook = shadowMode
? function (context) {
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
}
: function (context) {
style.call(this, createInjector(context));
};
}
if (hook) {
if (options.functional) {
// register for functional component in vue file
const originalRender = options.render;
options.render = function renderWithStyleInjection(h, context) {
hook.call(context);
return originalRender(h, context);
};
}
else {
// inject component registration as beforeCreate hook
const existing = options.beforeCreate;
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
}
}
return script;
}
/* script */
const __vue_script__$B = script$B;
/* template */
var __vue_render__$B = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
directives: [{
name: "touch",
rawName: "v-touch:start",
value: _vm.onTouch,
expression: "onTouch",
arg: "start"
}],
staticClass: "wf-app",
class: {
'wf-screensaving': _vm.screensaver
}
}, [_vm._t("default")], 2);
};
var __vue_staticRenderFns__$B = [];
/* style */
const __vue_inject_styles__$B = undefined;
/* scoped */
const __vue_scope_id__$B = undefined;
/* module identifier */
const __vue_module_identifier__$B = undefined;
/* functional template */
const __vue_is_functional_template__$B = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$13 = /*#__PURE__*/normalizeComponent({
render: __vue_render__$B,
staticRenderFns: __vue_staticRenderFns__$B
}, __vue_inject_styles__$B, __vue_script__$B, __vue_scope_id__$B, __vue_is_functional_template__$B, __vue_module_identifier__$B, false, undefined, undefined, undefined);
var __vue_component__$14 = __vue_component__$13;
/*!
* vuex v3.6.2
* (c) 2021 Evan You
* @license MIT
*/
function applyMixin (Vue) {
var version = Number(Vue.version.split('.')[0]);
if (version >= 2) {
Vue.mixin({ beforeCreate: vuexInit });
} else {
// override init and inject vuex init procedure
// for 1.x backwards compatibility.
var _init = Vue.prototype._init;
Vue.prototype._init = function (options) {
if ( options === void 0 ) options = {};
options.init = options.init
? [vuexInit].concat(options.init)
: vuexInit;
_init.call(this, options);
};
}
/**
* Vuex init hook, injected into each instances init hooks list.
*/
function vuexInit () {
var options = this.$options;
// store injection
if (options.store) {
this.$store = typeof options.store === 'function'
? options.store()
: options.store;
} else if (options.parent && options.parent.$store) {
this.$store = options.parent.$store;
}
}
}
var target = typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: {};
var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
function devtoolPlugin (store) {
if (!devtoolHook) { return }
store._devtoolHook = devtoolHook;
devtoolHook.emit('vuex:init', store);
devtoolHook.on('vuex:travel-to-state', function (targetState) {
store.replaceState(targetState);
});
store.subscribe(function (mutation, state) {
devtoolHook.emit('vuex:mutation', mutation, state);
}, { prepend: true });
store.subscribeAction(function (action, state) {
devtoolHook.emit('vuex:action', action, state);
}, { prepend: true });
}
/**
* forEach for object
*/
function forEachValue (obj, fn) {
Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
}
function isObject (obj) {
return obj !== null && typeof obj === 'object'
}
function isPromise (val) {
return val && typeof val.then === 'function'
}
function partial (fn, arg) {
return function () {
return fn(arg)
}
}
// Base data struct for store's module, package with some attribute and method
var Module = function Module (rawModule, runtime) {
this.runtime = runtime;
// Store some children item
this._children = Object.create(null);
// Store the origin module object which passed by programmer
this._rawModule = rawModule;
var rawState = rawModule.state;
// Store the origin module's state
this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
};
var prototypeAccessors = { namespaced: { configurable: true } };
prototypeAccessors.namespaced.get = function () {
return !!this._rawModule.namespaced
};
Module.prototype.addChild = function addChild (key, module) {
this._children[key] = module;
};
Module.prototype.removeChild = function removeChild (key) {
delete this._children[key];
};
Module.prototype.getChild = function getChild (key) {
return this._children[key]
};
Module.prototype.hasChild = function hasChild (key) {
return key in this._children
};
Module.prototype.update = function update (rawModule) {
this._rawModule.namespaced = rawModule.namespaced;
if (rawModule.actions) {
this._rawModule.actions = rawModule.actions;
}
if (rawModule.mutations) {
this._rawModule.mutations = rawModule.mutations;
}
if (rawModule.getters) {
this._rawModule.getters = rawModule.getters;
}
};
Module.prototype.forEachChild = function forEachChild (fn) {
forEachValue(this._children, fn);
};
Module.prototype.forEachGetter = function forEachGetter (fn) {
if (this._rawModule.getters) {
forEachValue(this._rawModule.getters, fn);
}
};
Module.prototype.forEachAction = function forEachAction (fn) {
if (this._rawModule.actions) {
forEachValue(this._rawModule.actions, fn);
}
};
Module.prototype.forEachMutation = function forEachMutation (fn) {
if (this._rawModule.mutations) {
forEachValue(this._rawModule.mutations, fn);
}
};
Object.defineProperties( Module.prototype, prototypeAccessors );
var ModuleCollection = function ModuleCollection (rawRootModule) {
// register root module (Vuex.Store options)
this.register([], rawRootModule, false);
};
ModuleCollection.prototype.get = function get (path) {
return path.reduce(function (module, key) {
return module.getChild(key)
}, this.root)
};
ModuleCollection.prototype.getNamespace = function getNamespace (path) {
var module = this.root;
return path.reduce(function (namespace, key) {
module = module.getChild(key);
return namespace + (module.namespaced ? key + '/' : '')
}, '')
};
ModuleCollection.prototype.update = function update$1 (rawRootModule) {
update([], this.root, rawRootModule);
};
ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
var this$1$1 = this;
if ( runtime === void 0 ) runtime = true;
var newModule = new Module(rawModule, runtime);
if (path.length === 0) {
this.root = newModule;
} else {
var parent = this.get(path.slice(0, -1));
parent.addChild(path[path.length - 1], newModule);
}
// register nested modules
if (rawModule.modules) {
forEachValue(rawModule.modules, function (rawChildModule, key) {
this$1$1.register(path.concat(key), rawChildModule, runtime);
});
}
};
ModuleCollection.prototype.unregister = function unregister (path) {
var parent = this.get(path.slice(0, -1));
var key = path[path.length - 1];
var child = parent.getChild(key);
if (!child) {
return
}
if (!child.runtime) {
return
}
parent.removeChild(key);
};
ModuleCollection.prototype.isRegistered = function isRegistered (path) {
var parent = this.get(path.slice(0, -1));
var key = path[path.length - 1];
if (parent) {
return parent.hasChild(key)
}
return false
};
function update (path, targetModule, newModule) {
// update target module
targetModule.update(newModule);
// update nested modules
if (newModule.modules) {
for (var key in newModule.modules) {
if (!targetModule.getChild(key)) {
return
}
update(
path.concat(key),
targetModule.getChild(key),
newModule.modules[key]
);
}
}
}
var Vue; // bind on install
var Store = function Store (options) {
var this$1$1 = this;
if ( options === void 0 ) options = {};
// Auto install if it is not done yet and `window` has `Vue`.
// To allow users to avoid auto-installation in some cases,
// this code should be placed here. See #731
if (!Vue && typeof window !== 'undefined' && window.Vue) {
install$1(window.Vue);
}
var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
var strict = options.strict; if ( strict === void 0 ) strict = false;
// store internal state
this._committing = false;
this._actions = Object.create(null);
this._actionSubscribers = [];
this._mutations = Object.create(null);
this._wrappedGetters = Object.create(null);
this._modules = new ModuleCollection(options);
this._modulesNamespaceMap = Object.create(null);
this._subscribers = [];
this._watcherVM = new Vue();
this._makeLocalGettersCache = Object.create(null);
// bind commit and dispatch to self
var store = this;
var ref = this;
var dispatch = ref.dispatch;
var commit = ref.commit;
this.dispatch = function boundDispatch (type, payload) {
return dispatch.call(store, type, payload)
};
this.commit = function boundCommit (type, payload, options) {
return commit.call(store, type, payload, options)
};
// strict mode
this.strict = strict;
var state = this._modules.root.state;
// init root module.
// this also recursively registers all sub-modules
// and collects all module getters inside this._wrappedGetters
installModule(this, state, [], this._modules.root);
// initialize the store vm, which is responsible for the reactivity
// (also registers _wrappedGetters as computed properties)
resetStoreVM(this, state);
// apply plugins
plugins.forEach(function (plugin) { return plugin(this$1$1); });
var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
if (useDevtools) {
devtoolPlugin(this);
}
};
var prototypeAccessors$1 = { state: { configurable: true } };
prototypeAccessors$1.state.get = function () {
return this._vm._data.$$state
};
prototypeAccessors$1.state.set = function (v) {
};
Store.prototype.commit = function commit (_type, _payload, _options) {
var this$1$1 = this;
// check object-style commit
var ref = unifyObjectStyle(_type, _payload, _options);
var type = ref.type;
var payload = ref.payload;
var mutation = { type: type, payload: payload };
var entry = this._mutations[type];
if (!entry) {
return
}
this._withCommit(function () {
entry.forEach(function commitIterator (handler) {
handler(payload);
});
});
this._subscribers
.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
.forEach(function (sub) { return sub(mutation, this$1$1.state); });
};
Store.prototype.dispatch = function dispatch (_type, _payload) {
var this$1$1 = this;
// check object-style dispatch
var ref = unifyObjectStyle(_type, _payload);
var type = ref.type;
var payload = ref.payload;
var action = { type: type, payload: payload };
var entry = this._actions[type];
if (!entry) {
return
}
try {
this._actionSubscribers
.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
.filter(function (sub) { return sub.before; })
.forEach(function (sub) { return sub.before(action, this$1$1.state); });
} catch (e) {
}
var result = entry.length > 1
? Promise.all(entry.map(function (handler) { return handler(payload); }))
: entry[0](payload);
return new Promise(function (resolve, reject) {
result.then(function (res) {
try {
this$1$1._actionSubscribers
.filter(function (sub) { return sub.after; })
.forEach(function (sub) { return sub.after(action, this$1$1.state); });
} catch (e) {
}
resolve(res);
}, function (error) {
try {
this$1$1._actionSubscribers
.filter(function (sub) { return sub.error; })
.forEach(function (sub) { return sub.error(action, this$1$1.state, error); });
} catch (e) {
}
reject(error);
});
})
};
Store.prototype.subscribe = function subscribe (fn, options) {
return genericSubscribe(fn, this._subscribers, options)
};
Store.prototype.subscribeAction = function subscribeAction (fn, options) {
var subs = typeof fn === 'function' ? { before: fn } : fn;
return genericSubscribe(subs, this._actionSubscribers, options)
};
Store.prototype.watch = function watch (getter, cb, options) {
var this$1$1 = this;
return this._watcherVM.$watch(function () { return getter(this$1$1.state, this$1$1.getters); }, cb, options)
};
Store.prototype.replaceState = function replaceState (state) {
var this$1$1 = this;
this._withCommit(function () {
this$1$1._vm._data.$$state = state;
});
};
Store.prototype.registerModule = function registerModule (path, rawModule, options) {
if ( options === void 0 ) options = {};
if (typeof path === 'string') { path = [path]; }
this._modules.register(path, rawModule);
installModule(this, this.state, path, this._modules.get(path), options.preserveState);
// reset store to update getters...
resetStoreVM(this, this.state);
};
Store.prototype.unregisterModule = function unregisterModule (path) {
var this$1$1 = this;
if (typeof path === 'string') { path = [path]; }
this._modules.unregister(path);
this._withCommit(function () {
var parentState = getNestedState(this$1$1.state, path.slice(0, -1));
Vue.delete(parentState, path[path.length - 1]);
});
resetStore(this);
};
Store.prototype.hasModule = function hasModule (path) {
if (typeof path === 'string') { path = [path]; }
return this._modules.isRegistered(path)
};
Store.prototype.hotUpdate = function hotUpdate (newOptions) {
this._modules.update(newOptions);
resetStore(this, true);
};
Store.prototype._withCommit = function _withCommit (fn) {
var committing = this._committing;
this._committing = true;
fn();
this._committing = committing;
};
Object.defineProperties( Store.prototype, prototypeAccessors$1 );
function genericSubscribe (fn, subs, options) {
if (subs.indexOf(fn) < 0) {
options && options.prepend
? subs.unshift(fn)
: subs.push(fn);
}
return function () {
var i = subs.indexOf(fn);
if (i > -1) {
subs.splice(i, 1);
}
}
}
function resetStore (store, hot) {
store._actions = Object.create(null);
store._mutations = Object.create(null);
store._wrappedGetters = Object.create(null);
store._modulesNamespaceMap = Object.create(null);
var state = store.state;
// init all modules
installModule(store, state, [], store._modules.root, true);
// reset vm
resetStoreVM(store, state, hot);
}
function resetStoreVM (store, state, hot) {
var oldVm = store._vm;
// bind store public getters
store.getters = {};
// reset local getters cache
store._makeLocalGettersCache = Object.create(null);
var wrappedGetters = store._wrappedGetters;
var computed = {};
forEachValue(wrappedGetters, function (fn, key) {
// use computed to leverage its lazy-caching mechanism
// direct inline function use will lead to closure preserving oldVm.
// using partial to return function with only arguments preserved in closure environment.
computed[key] = partial(fn, store);
Object.defineProperty(store.getters, key, {
get: function () { return store._vm[key]; },
enumerable: true // for local getters
});
});
// use a Vue instance to store the state tree
// suppress warnings just in case the user has added
// some funky global mixins
var silent = Vue.config.silent;
Vue.config.silent = true;
store._vm = new Vue({
data: {
$$state: state
},
computed: computed
});
Vue.config.silent = silent;
// enable strict mode for new vm
if (store.strict) {
enableStrictMode(store);
}
if (oldVm) {
if (hot) {
// dispatch changes in all subscribed watchers
// to force getter re-evaluation for hot reloading.
store._withCommit(function () {
oldVm._data.$$state = null;
});
}
Vue.nextTick(function () { return oldVm.$destroy(); });
}
}
function installModule (store, rootState, path, module, hot) {
var isRoot = !path.length;
var namespace = store._modules.getNamespace(path);
// register in namespace map
if (module.namespaced) {
if (store._modulesNamespaceMap[namespace] && ("production" !== 'production')) {
console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
}
store._modulesNamespaceMap[namespace] = module;
}
// set state
if (!isRoot && !hot) {
var parentState = getNestedState(rootState, path.slice(0, -1));
var moduleName = path[path.length - 1];
store._withCommit(function () {
Vue.set(parentState, moduleName, module.state);
});
}
var local = module.context = makeLocalContext(store, namespace, path);
module.forEachMutation(function (mutation, key) {
var namespacedType = namespace + key;
registerMutation(store, namespacedType, mutation, local);
});
module.forEachAction(function (action, key) {
var type = action.root ? key : namespace + key;
var handler = action.handler || action;
registerAction(store, type, handler, local);
});
module.forEachGetter(function (getter, key) {
var namespacedType = namespace + key;
registerGetter(store, namespacedType, getter, local);
});
module.forEachChild(function (child, key) {
installModule(store, rootState, path.concat(key), child, hot);
});
}
/**
* make localized dispatch, commit, getters and state
* if there is no namespace, just use root ones
*/
function makeLocalContext (store, namespace, path) {
var noNamespace = namespace === '';
var local = {
dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
var args = unifyObjectStyle(_type, _payload, _options);
var payload = args.payload;
var options = args.options;
var type = args.type;
if (!options || !options.root) {
type = namespace + type;
}
return store.dispatch(type, payload)
},
commit: noNamespace ? store.commit : function (_type, _payload, _options) {
var args = unifyObjectStyle(_type, _payload, _options);
var payload = args.payload;
var options = args.options;
var type = args.type;
if (!options || !options.root) {
type = namespace + type;
}
store.commit(type, payload, options);
}
};
// getters and state object must be gotten lazily
// because they will be changed by vm update
Object.defineProperties(local, {
getters: {
get: noNamespace
? function () { return store.getters; }
: function () { return makeLocalGetters(store, namespace); }
},
state: {
get: function () { return getNestedState(store.state, path); }
}
});
return local
}
function makeLocalGetters (store, namespace) {
if (!store._makeLocalGettersCache[namespace]) {
var gettersProxy = {};
var splitPos = namespace.length;
Object.keys(store.getters).forEach(function (type) {
// skip if the target getter is not match this namespace
if (type.slice(0, splitPos) !== namespace) { return }
// extract local getter type
var localType = type.slice(splitPos);
// Add a port to the getters proxy.
// Define as getter property because
// we do not want to evaluate the getters in this time.
Object.defineProperty(gettersProxy, localType, {
get: function () { return store.getters[type]; },
enumerable: true
});
});
store._makeLocalGettersCache[namespace] = gettersProxy;
}
return store._makeLocalGettersCache[namespace]
}
function registerMutation (store, type, handler, local) {
var entry = store._mutations[type] || (store._mutations[type] = []);
entry.push(function wrappedMutationHandler (payload) {
handler.call(store, local.state, payload);
});
}
function registerAction (store, type, handler, local) {
var entry = store._actions[type] || (store._actions[type] = []);
entry.push(function wrappedActionHandler (payload) {
var res = handler.call(store, {
dispatch: local.dispatch,
commit: local.commit,
getters: local.getters,
state: local.state,
rootGetters: store.getters,
rootState: store.state
}, payload);
if (!isPromise(res)) {
res = Promise.resolve(res);
}
if (store._devtoolHook) {
return res.catch(function (err) {
store._devtoolHook.emit('vuex:error', err);
throw err
})
} else {
return res
}
});
}
function registerGetter (store, type, rawGetter, local) {
if (store._wrappedGetters[type]) {
return
}
store._wrappedGetters[type] = function wrappedGetter (store) {
return rawGetter(
local.state, // local state
local.getters, // local getters
store.state, // root state
store.getters // root getters
)
};
}
function enableStrictMode (store) {
store._vm.$watch(function () { return this._data.$$state }, function () {
}, { deep: true, sync: true });
}
function getNestedState (state, path) {
return path.reduce(function (state, key) { return state[key]; }, state)
}
function unifyObjectStyle (type, payload, options) {
if (isObject(type) && type.type) {
options = payload;
payload = type;
type = type.type;
}
return { type: type, payload: payload, options: options }
}
function install$1 (_Vue) {
if (Vue && _Vue === Vue) {
return
}
Vue = _Vue;
applyMixin(Vue);
}
/**
* Reduce the code which written in Vue.js for getting the state.
* @param {String} [namespace] - Module's namespace
* @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
* @param {Object}
*/
var mapState = normalizeNamespace(function (namespace, states) {
var res = {};
normalizeMap(states).forEach(function (ref) {
var key = ref.key;
var val = ref.val;
res[key] = function mappedState () {
var state = this.$store.state;
var getters = this.$store.getters;
if (namespace) {
var module = getModuleByNamespace(this.$store, 'mapState', namespace);
if (!module) {
return
}
state = module.context.state;
getters = module.context.getters;
}
return typeof val === 'function'
? val.call(this, state, getters)
: state[val]
};
// mark vuex getter for devtools
res[key].vuex = true;
});
return res
});
/**
* Normalize the map
* normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
* normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
* @param {Array|Object} map
* @return {Object}
*/
function normalizeMap (map) {
if (!isValidMap(map)) {
return []
}
return Array.isArray(map)
? map.map(function (key) { return ({ key: key, val: key }); })
: Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
}
/**
* Validate whether given map is valid or not
* @param {*} map
* @return {Boolean}
*/
function isValidMap (map) {
return Array.isArray(map) || isObject(map)
}
/**
* Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
* @param {Function} fn
* @return {Function}
*/
function normalizeNamespace (fn) {
return function (namespace, map) {
if (typeof namespace !== 'string') {
map = namespace;
namespace = '';
} else if (namespace.charAt(namespace.length - 1) !== '/') {
namespace += '/';
}
return fn(namespace, map)
}
}
/**
* Search a special module from store by namespace. if module not exist, print error message.
* @param {Object} store
* @param {String} helper
* @param {String} namespace
* @return {Object}
*/
function getModuleByNamespace (store, helper, namespace) {
var module = store._modulesNamespaceMap[namespace];
return module
}
//
var script$A = {
name: "POI",
computed: {
...mapState('wf', ['language']),
hasShowPathListener() {
return !!(this.$listeners && this.$listeners.showPath);
},
hasShowAccessibilityPathListener() {
return !!(this.$listeners && this.$listeners.showAccessibilityPath);
},
hasAdvertisements() {
if (this.poi && typeof this.poi.getAdvertisements() == "object" && this.poi.getAdvertisements().length > 0) {
return true;
}
return false;
}
},
props: {
poi: {
type: Object,
default: null
},
showLogo: {
type: Boolean,
default: false
},
showName: {
type: Boolean,
default: true
},
showPathButton: {
type: Boolean,
default: false
},
showAccessibilityPathButton: {
type: Boolean,
default: false
},
showDescription: {
type: Boolean,
default: false
},
showRoomID: {
type: Boolean,
default: false
},
showFloor: {
type: Boolean,
default: false
},
showDistance: {
type: Boolean,
default: false
},
showPath2Text: {
type: Boolean,
default: false
},
showPathTime: {
type: Boolean,
default: false
},
showPathStepCount: {
type: Boolean,
default: false
},
pathIcon: {
type: String,
default: "path"
},
showPathIcon: {
type: Boolean,
default: true
},
accessibilityPathIcon: {
type: String,
default: "accessibility-path"
},
showAds: {
type: Boolean,
default: false
}
},
mounted() {
if (this.$wayfinder) {
this.show_path = this.$wayfinder.translator.get('show_path');
this.show_accessibility_path = this.$wayfinder.translator.get('show_accessibility_path');
}
},
watch: {
language() {
if (this.$wayfinder) {
this.show_path = this.$wayfinder.translator.get('show_path');
this.show_accessibility_path = this.$wayfinder.translator.get('show_accessibility_path');
}
},
poi() {
if (this.showDistance && this.$wayfinder) {
let path = this.$wayfinder.findPath(this.$wayfinder.getKioskNode(), this.poi.getNode());
this.path2Text = Object.freeze(this.$wayfinder.pathToText(path));
console.log('watch.path', this.path2Text);
}
}
},
methods: {
showPath() {
if (this.poi) {
if (this.hasShowPathListener) {
this.$emit('showPath', this.poi);
} else {
this.$wayfinder.showPath(this.poi.getNode(), this.poi);
}
}
},
showAccessibilityPath() {
if (this.poi) {
if (this.hasShowAccessibilityPathListener) {
this.$emit('showAccessibilityPath', this.poi);
} else {
this.$wayfinder.showPath(this.poi.getNode(), this.poi, {
"ignoreTypes": ["escalator", "stairs"]
});
}
}
},
open(type) {
if (type && this.poi[type]) {
if (type === 'shop_email') {
window.open('mailto:' + this.poi[type], '_system');
} else if (type === 'shop_phone') {
window.open('tel:' + this.poi[type], '_system');
} else {
window.open(this.poi[type], '_system');
}
}
},
getImage() {
if (!!this.poi.getBackgroundUrl()) return this.poi.getBackgroundUrl();else if (!!this.poi.getIconUrl()) {
return this.poi.getIconUrl();
} else {
return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
}
},
isImage() {
if (this.poi.getBackgroundUrl()) return "image-background";else if (this.poi.getIconUrl()) return "image-logo";else return "image-none";
},
truncate(str, len) {
if (str && str.length > len) {
return str.substring(0, len) + '...';
} else {
return str;
}
}
},
data: function () {
return {
show_path: 'Show Path',
show_accessibility_path: "Show Accessibility Path",
pathTime: '',
unit: 'm',
path2Text: null
};
}
};
const isOldIE = typeof navigator !== 'undefined' &&
/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
function createInjector(context) {
return (id, style) => addStyle(id, style);
}
let HEAD;
const styles = {};
function addStyle(id, css) {
const group = isOldIE ? css.media || 'default' : id;
const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
if (!style.ids.has(id)) {
style.ids.add(id);
let code = css.source;
if (css.map) {
// https://developer.chrome.com/devtools/docs/javascript-debugging
// this makes source maps inside style tags work properly in Chrome
code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
// http://stackoverflow.com/a/26603875
code +=
'\n/*# sourceMappingURL=data:application/json;base64,' +
btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
' */';
}
if (!style.element) {
style.element = document.createElement('style');
style.element.type = 'text/css';
if (css.media)
style.element.setAttribute('media', css.media);
if (HEAD === undefined) {
HEAD = document.head || document.getElementsByTagName('head')[0];
}
HEAD.appendChild(style.element);
}
if ('styleSheet' in style.element) {
style.styles.push(code);
style.element.styleSheet.cssText = style.styles
.filter(Boolean)
.join('\n');
}
else {
const index = style.ids.size - 1;
const textNode = document.createTextNode(code);
const nodes = style.element.childNodes;
if (nodes[index])
style.element.removeChild(nodes[index]);
if (nodes.length)
style.element.insertBefore(textNode, nodes[index]);
else
style.element.appendChild(textNode);
}
}
}
/* script */
const __vue_script__$A = script$A;
/* template */
var __vue_render__$A = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _vm.poi ? _c('div', {
staticClass: "wf-poi"
}, [_vm.showLogo ? _c('img', {
staticClass: "wf-poi-image",
class: [_vm.isImage()],
attrs: {
"src": _vm.getImage()
}
}) : _vm._e(), _vm._v(" "), _vm.showName ? _c('div', {
staticClass: "wf-poi-name",
domProps: {
"innerHTML": _vm._s(_vm.poi.getName(_vm.language) || 'POI')
}
}) : _vm._e(), _vm._v(" "), _vm.showPathButton ? _c('div', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.showPath,
expression: "showPath",
arg: "tap"
}],
staticClass: "wf-show-path"
}, [_c('button', [_c('WFTranslate', {
attrs: {
"k": "show_path"
}
}, [_vm._v(_vm._s(_vm.show_path))]), _vm._v(" "), _vm.showPathIcon ? _c('WFIcon', {
attrs: {
"name": _vm.pathIcon
}
}) : _vm._e()], 1)]) : _vm._e(), _vm._v(" "), _vm.showAccessibilityPathButton ? _c('div', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.showAccessibilityPath,
expression: "showAccessibilityPath",
arg: "tap"
}],
staticClass: "wf-show-path wf-show-accessibility-path"
}, [_c('button', [_c('WFTranslate', {
attrs: {
"k": "show_accessibility_path"
}
}, [_vm._v("Show Accessibility Path")]), _vm._v(" "), _vm.showPathIcon ? _c('WFIcon', {
attrs: {
"name": _vm.accessibilityPathIcon
}
}) : _vm._e()], 1)]) : _vm._e(), _vm._v(" "), _vm.showDescription && _vm.poi.getDescription(_vm.language) != false ? _c('div', {
staticClass: "wf-poi-description",
domProps: {
"innerHTML": _vm._s(_vm.poi.getDescription(_vm.language) || '')
}
}) : _vm._e(), _vm._v(" "), _vm.showRoomID ? _c('div', {
staticClass: "wf-poi-room_id",
domProps: {
"innerHTML": _vm._s(_vm.poi.room_id || '')
}
}) : _vm._e(), _vm._v(" "), _vm.showFloor && _vm.poi.getFloor() ? _c('div', {
staticClass: "wf-poi-floor",
domProps: {
"innerHTML": _vm._s(_vm.poi.getFloor().getName(_vm.language) || '')
}
}) : _vm._e(), _vm._v(" "), _vm.showAds && _vm.hasAdvertisements ? _c('WFPOIAdvertisements', {
attrs: {
"ads": _vm.poi.getAdvertisements()
}
}) : _vm._e(), _vm._v(" "), _vm.showDistance && _vm.path2Text ? _c('div', {
staticClass: "wf-poi-distance"
}, [_c('WFPath2Text', {
attrs: {
"path": _vm.path2Text,
"showDistance": _vm.showDistance,
"showPath": _vm.showPath2Text,
"showTime": _vm.showPathTime,
"showStepCount": _vm.showPathStepCount
}
})], 1) : _vm._e()], 1) : _vm._e();
};
var __vue_staticRenderFns__$A = [];
/* style */
const __vue_inject_styles__$A = function (inject) {
if (!inject) return;
inject("data-v-3cefa387_0", {
source: ".layout-view[data-v-3cefa387]{display:flex;flex-direction:column;justify-content:space-between;height:100%}.poi-info[data-v-3cefa387]{padding:1rem}.poi-info h2[data-v-3cefa387]{text-align:center;margin-top:1.5rem;margin-bottom:1.5rem}.poi-body[data-v-3cefa387]{box-shadow:0 -2px 1px 0 rgba(0,0,0,.05);padding:1rem;flex-grow:1}.poi-image[data-v-3cefa387]{height:14rem;width:100%;background-position:50% 50%;background-size:contain;background-repeat:no-repeat}.poi-image.image-background[data-v-3cefa387]{background-size:cover}.show-path[data-v-3cefa387]{bottom:1rem;right:1rem;text-transform:uppercase;z-index:10;line-height:2.8rem;margin-bottom:1.5rem}.show-path button[data-v-3cefa387]{height:3rem;font-size:1.2rem;line-height:2.8rem;padding-left:2.5rem;padding-right:2.5rem;margin:auto;border:0;display:block}.poi-description[data-v-3cefa387]{line-height:1.2}.poi-contact .address[data-v-3cefa387]{font-weight:600;margin-bottom:.5rem}.poi-contact .address span[data-v-3cefa387]{padding-top:4px;vertical-align:top;display:inline-block}.poi-contact .address a[data-v-3cefa387]{text-decoration:none;display:block;line-height:1.5}.poi-contact .address .icon[data-v-3cefa387]:before{mix-blend-mode:initial;color:#fff}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$A = "data-v-3cefa387";
/* module identifier */
const __vue_module_identifier__$A = undefined;
/* functional template */
const __vue_is_functional_template__$A = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$12 = /*#__PURE__*/normalizeComponent({
render: __vue_render__$A,
staticRenderFns: __vue_staticRenderFns__$A
}, __vue_inject_styles__$A, __vue_script__$A, __vue_scope_id__$A, __vue_is_functional_template__$A, __vue_module_identifier__$A, false, createInjector, undefined, undefined);
var POI = __vue_component__$12;
//
var wayfinder;
var script$z = {
name: 'Map',
components: {
POI
},
props: {
project: {
type: String
},
api: {
type: String,
default: "//api.3dwayfinder.com/"
},
assets: {
type: String,
default: "//static.3dwayfinder.com/shared/"
},
showPathText: {
type: Boolean,
default: true
},
POIPopupEnabled: {
type: Boolean,
default: false
},
showPOIPopupPathButton: {
type: Boolean,
default: true
},
showPOIPopupInfoButton: {
type: Boolean,
default: true
},
showPOILogo: {
type: Boolean,
default: false
},
showPOIName: {
type: Boolean,
default: true
},
showPOIPathButton: {
type: Boolean,
default: false
},
showPOIDescription: {
type: Boolean,
default: false
},
showPOIRoomID: {
type: Boolean,
default: false
},
showPOIFloor: {
type: Boolean,
default: false
}
},
computed: {
...mapState('wf', ['language'])
},
mounted() {
this.load();
},
methods: {
load() {
var _project = this.project;
var _api = this.$WF_ENV;
var options = decodeURI(location.search.substring(1));
console.log('options', options);
//override from url
if (options.indexOf("mobile=") > -1) {
this.$WF_MAP_TYPE = "2d";
}
if (options.indexOf("project=") > -1) {
var params = new URLSearchParams(location.search);
_project = params.get("project");
}
if (options.indexOf("api=") > -1) {
var params = new URLSearchParams(location.search);
_api = params.get("api");
}
console.log('wf.load', this.$WF_MAP_TYPE, _project);
if (typeof this.$WF_MAP_TYPE !== "undefined" && this.$WF_MAP_TYPE == "2d") {
wayfinder = new Wayfinder2D();
} else {
wayfinder = new Wayfinder3D();
}
let api = WayfinderAPI.LOCATION;
let live_api = WayfinderAPI.LIVE_LOCATION;
let assets = this.assets ? this.assets : "//static.3dwayfinder.com/shared/";
console.log('_api', _api, this.$WF_ENV);
switch (_api) {
case "live":
api = WayfinderAPI.LOCATION;
break;
case "snapshot":
api = "../../../api/";
assets = "../../../shared/";
break;
case "cdn":
api = WayfinderAPI.CDN_LOCATION;
assets = "https://wayfinder-cdn.com/shared/";
break;
case "enterprise":
api = "../../../api/";
assets = "../../../shared/";
var loc = window.location;
live_api = loc.host + "/";
break;
case "custom":
api = this.$WF_API;
live_api = api; //TODO should be /monitor/
break;
}
// WayfinderAPI.LOCATION = 'http://localhost:8080/api/';
Vue$1.prototype.$wayfinder = wayfinder;
Vue$1.directive('wf-translate', {
bind: function (el, binding, vnode) {
if (wayfinder) {
var key = typeof binding.value == "string" ? binding.value : binding.expression;
el.setAttribute("data-translation-element", key);
wayfinder.translator.translateElement(key, el);
}
}
});
console.log('API', api, "env", this.$WF_ENV, "live", live_api);
WayfinderAPI.LOCATION = api;
WayfinderAPI.LIVE_LOCATION = live_api;
wayfinder.options.assetsLocation = assets;
if (this.project) {
wayfinder.options.project = _project;
}
wayfinder.open(_project);
var scope = this;
var pathTextTime = wayfinder.settings.getInt('path.message.duration', 5) * 1000;
wayfinder.events.on("data-loaded", function () {
if (!scope.loaded) {
// update getters
scope.$store.dispatch('wf/SET_CURRENT_FLOOR', Object.freeze(wayfinder.getCurrentFloor()) || null);
scope.$store.dispatch('wf/SET_INACTIVITY_TIME', wayfinder.settings.getInt('kiosk.max-inactivity', 30));
scope.update(wayfinder);
scope.$store.dispatch('wf/SET_INACTIVITY_TIME', wayfinder.settings.getInt('kiosk.max-inactivity', 30));
scope.$emit('loaded');
scope.$store.dispatch('wf/LOADED', true);
}
});
wayfinder.events.on("map-ready", function () {
wayfinder.resize();
});
wayfinder.events.on('language-change', () => {
this.update(wayfinder);
});
wayfinder.events.on("floor-change-before", (currentFloor, nextFloor, destinationFloor) => {
this.pathText = wayfinder.translator.get("go_to_floor", [currentFloor.getName(wayfinder.getLanguage()), destinationFloor.getName(wayfinder.getLanguage()), nextFloor.getName(wayfinder.getLanguage())]);
this.pathTextVisible = true;
});
wayfinder.events.on("map-update", () => {
if (this.POIPopupEnabled && this.poiPopupVisible && this.popupPOI) {
this.showPOIPopup(this.popupPOI);
}
});
wayfinder.events.on("floor-change", floor => {
// console.log('cbOnFloorChange', floor, wayfinder.settings.getInt('path.message.duration', 1))
if (floor) {
this.$store.dispatch('wf/SET_CURRENT_FLOOR', Object.freeze(floor));
this.$emit('onTouch');
}
if (this.pathTextVisible) {
setTimeout(() => {
this.pathTextVisible = false;
}, pathTextTime);
}
if (this.poiPopupVisible && this.popupPOI && this.popupPOI.floor && this.popupPOI.floor.id == floor.id) {
this.showPOIPopup(this.popupPOI);
} else {
this.poiPopupVisible = false;
}
});
wayfinder.events.on("map-click", poi => {
console.log('map-click', poi);
if (poi) {
poi = this.$store.getters["wf/freezePOI"](poi);
this.$emit('poiClicked', poi, true);
wayfinder.statistics.onClick(poi.id, "map");
}
});
wayfinder.events.on("map-touch", () => {
this.poiPopupVisible = false;
this.$emit('onTouch');
});
wayfinder.events.on("path-start", () => {
this.poiPopupVisible = false;
});
wayfinder.events.on("path-finished", () => {
if (this.POIPopupEnabled && this.popupPOI) {
this.showPOIPopup(this.popupPOI);
}
});
window.addEventListener('resize', () => {
if (wayfinder) {
wayfinder.resize();
}
});
},
update() {
for (var i in this.$store._wrappedGetters) {
if (i.indexOf("wf") === 0) {
this.$store._wrappedGetters[i](this.$store.state);
}
}
Vue$1.prototype.$wayfinder.update();
Vue$1.prototype.$wayfinder.resize();
Vue$1.prototype.$wayfinder.translator.translate();
},
reset() {
wayfinder.restoreDefaultState();
},
start() {
wayfinder.run();
wayfinder.statistics.onSessionStart();
},
pause() {
wayfinder.pause();
wayfinder.statistics.onSessionEnd();
},
run() {
wayfinder.run();
},
visibilityChanged(visible) {
if (Vue$1.prototype.$wayfinder) {
Vue$1.prototype.$wayfinder.resize();
}
},
onTouch() {
this.$wayfinder.run();
},
showPath(poi) {
this.poiPopupVisible = false;
this.$emit('showInfo', poi);
},
showInfo(poi) {
this.poiPopupVisible = false;
this.$emit('showInfo', poi);
},
showPOIPopup(poi, _width, _height) {
this.popupPOI = Object.freeze(poi);
if (this.POIPopupEnabled && this.popupPOI && this.$refs.poiPopup && poi.getNode()) {
let width = _width || 155;
let height = _height || 100;
let position = this.$wayfinder.getScreenPosition(poi);
if (!position) {
this.poiPopupVisible = false;
console.log('popup no position');
return;
}
let offset = (this.$wayfinder.settings.getFloat("poi.2d.icon-size", 24, poi) - 24) / 2;
this.$refs.poiPopup.style.left = position[0] + "px";
let mapWidth = this.$refs.container ? this.$refs.container.clientWidth : 320;
this.$nextTick(() => {
this.$nextTick(() => {
this.$refs.poiPopup.style.top = position[1] - offset + "px";
this.$refs.poiPopup.style.marginTop = -this.$refs.poiPopup.clientHeight + "px";
this.$refs.poiPopup.style.marginLeft = -(this.$refs.poiPopup.clientWidth / 2) + "px";
this.$refs.poiPopup.classList.remove("wf-pin-up");
this.$refs.poiPopup.classList.remove("wf-pin-left");
this.$refs.poiPopup.classList.remove("wf-pin-right");
if (position[1] < height) {
this.$refs.poiPopup.style.marginTop = -offset * 2 + "px";
this.$refs.poiPopup.classList.add("wf-pin-up");
}
if (position[0] < width / 2) {
this.$refs.poiPopup.style.marginLeft = -position[0] + "px";
this.$refs.poiPopup.classList.add("wf-pin-left");
}
if (position[0] > mapWidth - width / 2) {
this.$refs.poiPopup.style.marginLeft = -width + "px";
this.$refs.poiPopup.classList.add("wf-pin-right");
}
});
});
this.poiPopupVisible = true;
}
},
hidePOIPopup() {
this.poiPopupVisible = false;
},
isPOIPopupVisible() {
return this.$wayfinder && this.popupPOI && this.poiPopupVisible && this.popupPOI.getNode().floor == this.$wayfinder.getCurrentFloor();
}
},
data() {
return {
loaded: false,
pathTextVisible: false,
pathText: '',
poiPopupVisible: false,
popupPOI: null
};
}
};
/* script */
const __vue_script__$z = script$z;
/* template */
var __vue_render__$z = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
directives: [{
name: "observe-visibility",
rawName: "v-observe-visibility",
value: _vm.visibilityChanged,
expression: "visibilityChanged"
}, {
name: "touch",
rawName: "v-touch:start",
value: _vm.onTouch,
expression: "onTouch",
arg: "start"
}],
ref: "container",
staticClass: "wf-component wf-map-container"
}, [_c('canvas', {
attrs: {
"id": "map"
}
}), _vm._v(" "), _c('div', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.showPathText && _vm.pathTextVisible,
expression: "(showPathText && pathTextVisible)"
}],
staticClass: "wf-map-path-text"
}, [_vm._v(_vm._s(_vm.pathText))]), _vm._v(" "), _c('div', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.POIPopupEnabled && _vm.isPOIPopupVisible(),
expression: "POIPopupEnabled && isPOIPopupVisible()"
}],
ref: "poiPopup",
staticClass: "wf-poi-popup",
attrs: {
"id": "wf-poi-popup"
}
}, [_vm.popupPOI ? _c('div', {
staticClass: "wf-poi-popup-content"
}, [_vm._t("poi", function () {
return [_c('POI', {
attrs: {
"poi": _vm.popupPOI,
"showLogo": _vm.showPOILogo,
"showName": _vm.showPOIName,
"showPathButton": _vm.showPOIPathButton,
"showDescription": _vm.showPOIDescription,
"showRoomID": _vm.showPOIRoomID,
"showFloor": _vm.showPOIFloor
}
})];
}, {
"poi": _vm.popupPOI
})], 2) : _vm._e(), _vm._v(" "), _vm.popupPOI ? _c('div', {
staticClass: "wf-pin-down"
}) : _vm._e()])]);
};
var __vue_staticRenderFns__$z = [];
/* style */
const __vue_inject_styles__$z = function (inject) {
if (!inject) return;
inject("data-v-4c65ad10_0", {
source: ".wf-map-container[data-v-4c65ad10]{position:relative;width:100%;height:100%}.wf-map-container canvas[data-v-4c65ad10]{width:100%;height:100%;position:relative}.wf-map-container .wf-map-path-text[data-v-4c65ad10]{width:30ch;text-align:center;background-color:#fff;position:absolute;bottom:25%;margin:auto;left:50%;margin-left:-15ch;padding:.5em}#wf-poi-popup[data-v-4c65ad10]{position:absolute;top:0;left:0;z-index:10;width:15.5rem;height:auto;background-color:#fff;text-align:center;transform-origin:bottom;animation-duration:.5s;animation-iteration-count:2;cursor:pointer}.wf-poi-popup-content[data-v-4c65ad10]{display:flex;flex-direction:column;justify-content:stretch;height:100%}.wf-poi-popup-content>label[data-v-4c65ad10]{flex-grow:1;font-size:1.6rem;margin-top:.6rem;text-align:center;line-height:1.2;font-weight:600;margin-bottom:1.6rem}.wf-pin-down[data-v-4c65ad10]{background-color:#fff;width:1rem;height:1rem;position:absolute;bottom:-.5rem;border-radius:1rem 0 0 0;transform:rotate(45deg);left:50%;margin-left:-.75rem}.wf-pin-left .wf-pin-down[data-v-4c65ad10]{left:1rem}.wf-pin-right .wf-pin-down[data-v-4c65ad10]{right:1rem;left:auto}.wf-pin-up .wf-poi-popup-content[data-v-4c65ad10]{margin-bottom:0}.wf-pin-up .wf-pin-down[data-v-4c65ad10]{top:-.5rem;bottom:auto;transform:rotate(-45deg)}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$z = "data-v-4c65ad10";
/* module identifier */
const __vue_module_identifier__$z = undefined;
/* functional template */
const __vue_is_functional_template__$z = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$10 = /*#__PURE__*/normalizeComponent({
render: __vue_render__$z,
staticRenderFns: __vue_staticRenderFns__$z
}, __vue_inject_styles__$z, __vue_script__$z, __vue_scope_id__$z, __vue_is_functional_template__$z, __vue_module_identifier__$z, false, createInjector, undefined, undefined);
var __vue_component__$11 = __vue_component__$10;
//
var script$y = {
name: 'AZMenu',
components: {
POI
},
props: {
showLogo: {
type: Boolean,
default: false
},
showName: {
type: Boolean,
default: true
},
showPathButton: {
type: Boolean,
default: false
},
showDescription: {
type: Boolean,
default: false
},
showRoomID: {
type: Boolean,
default: false
},
showFloor: {
type: Boolean,
default: false
},
currentPOI: {
type: Object,
default: null
}
},
data() {
return {
count: 0
};
},
computed: {
...mapState('wf', ['pois', 'language']),
sortedPOIs() {
let arr = this.pois.slice().filter(poi => {
return poi && poi.getShowInMenu();
}); // Copy and filter array
arr = arr.sort((a, b) => {
if (a.getName(this.language) && b.getName(this.language)) {
return a.getName(this.language).localeCompare(b.getName(this.language));
} else {
return 0;
}
});
this.count = arr.length;
return arr;
}
},
methods: {
onClick(poi) {
return () => {
this.$emit('clicked', poi);
this.$wayfinder.statistics.onClick(poi.id, "menu");
};
}
}
};
/* script */
const __vue_script__$y = script$y;
/* template */
var __vue_render__$y = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-az-menu"
}, [_c('ul', {
staticClass: "wf-list",
class: ['wf-list-count-' + _vm.count]
}, _vm._l(_vm.sortedPOIs, function (poiitem) {
return _c('li', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.onClick(poiitem),
expression: "onClick(poiitem)",
arg: "tap"
}],
key: poiitem.id,
staticClass: "wf-list-item",
class: {
"wf-active": _vm.currentPOI && poiitem.id == _vm.currentPOI.id
}
}, [_vm._t("default", function () {
return [_c('POI', {
attrs: {
"poi": poiitem,
"showLogo": _vm.showLogo,
"showName": _vm.showName,
"showPathButton": _vm.showPathButton,
"showDescription": _vm.showDescription,
"showRoomID": _vm.showRoomID,
"showFloor": _vm.showFloor
}
})];
}, {
"poi": poiitem
})], 2);
}), 0)]);
};
var __vue_staticRenderFns__$y = [];
/* style */
const __vue_inject_styles__$y = function (inject) {
if (!inject) return;
inject("data-v-5be407de_0", {
source: ".wf-list-item[data-v-5be407de]{list-style:none}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$y = "data-v-5be407de";
/* module identifier */
const __vue_module_identifier__$y = undefined;
/* functional template */
const __vue_is_functional_template__$y = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$_ = /*#__PURE__*/normalizeComponent({
render: __vue_render__$y,
staticRenderFns: __vue_staticRenderFns__$y
}, __vue_inject_styles__$y, __vue_script__$y, __vue_scope_id__$y, __vue_is_functional_template__$y, __vue_module_identifier__$y, false, createInjector, undefined, undefined);
var __vue_component__$$ = __vue_component__$_;
//
var script$x = {
name: 'FlagsMenu',
computed: {
...mapState('wf', ['languages', 'language', 'reset']),
count() {
return this.languages.length;
},
sortedLanguages() {
if (this.languages && this.order == "order") {
return this.languages.slice().sort((a, b) => {
return a.order - b.order;
});
}
return this.languages;
}
},
props: {
showTitle: {
type: Boolean,
default: true
},
showFlag: {
type: Boolean,
default: true
},
labelType: {
type: String,
default: "none"
},
order: {
type: String,
default: "id"
},
showWhenMoreThanOne: {
type: Boolean,
default: true
}
},
data() {
return {
active: false
};
},
methods: {
changeLanguage(language) {
this.active = !this.active;
this.$wayfinder.setLanguage(language.name);
this.$emit("changeLanguage", Object.freeze(language));
},
getFlagImage(id) {
return WayfinderAPI.getURL("images", "thumbnail", [id]);
}
},
watch: {
reset: function () {
this.active = false;
}
}
};
/* script */
const __vue_script__$x = script$x;
/* template */
var __vue_render__$x = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _vm.showWhenMoreThanOne && _vm.count > 1 || !_vm.showWhenMoreThanOne ? _c('div', {
staticClass: "wf-component wf-languages-container",
class: [_vm.active ? 'wf-active' : '']
}, [_vm.showTitle ? _c('div', {
staticClass: "wf-languages-container-select"
}, [_vm._v("Select language")]) : _vm._e(), _vm._v(" "), _c('div', {
staticClass: "wf-list",
class: ['wf-list-count-' + _vm.count]
}, _vm._l(_vm.sortedLanguages, function (lang) {
return _c('div', {
key: lang.getName(),
class: ["item", "language", "lang-" + lang.getName(), {
active: lang.getName() == _vm.language,
display: _vm.active
}],
on: {
"click": function ($event) {
return _vm.changeLanguage(lang);
}
}
}, [_vm.showFlag ? _c('div', {
staticClass: "wf-flag",
style: {
backgroundImage: 'url(' + _vm.getFlagImage(lang.flagImage) + ')'
}
}) : _vm._e(), _vm._v(" "), _vm.labelType == 'code' ? _c('label', [_vm._v(_vm._s(lang.getName()))]) : _vm._e(), _vm._v(" "), _vm.labelType == 'native' ? _c('label', [_vm._v(_vm._s(lang.getNativeName()))]) : _vm._e()]);
}), 0)]) : _vm._e();
};
var __vue_staticRenderFns__$x = [];
/* style */
const __vue_inject_styles__$x = function (inject) {
if (!inject) return;
inject("data-v-5af9b578_0", {
source: ".wf-languages-container.wf-active[data-v-5af9b578]{height:fit-content;z-index:10}.wf-languages-container.wf-active .wf-languages-container-select[data-v-5af9b578]{visibility:initial;opacity:1}.wf-languages-container .wf-languages-container-select[data-v-5af9b578]{opacity:0;padding-bottom:.5rem;margin:auto;text-align:center;transition:opacity .2s ease-in;overflow:hidden;height:1.5rem;font-size:1rem}.wf-languages-container .language .wf-flag[data-v-5af9b578]{width:190%;height:100%;background-size:cover;background-position:50%;background-repeat:no-repeat}.wf-languages-container .language .wf-active[data-v-5af9b578]{height:3.5rem;margin-bottom:1rem}.wf-languages-container .language .display[data-v-5af9b578]{height:3.5rem;margin-bottom:1.5rem}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$x = "data-v-5af9b578";
/* module identifier */
const __vue_module_identifier__$x = undefined;
/* functional template */
const __vue_is_functional_template__$x = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$Y = /*#__PURE__*/normalizeComponent({
render: __vue_render__$x,
staticRenderFns: __vue_staticRenderFns__$x
}, __vue_inject_styles__$x, __vue_script__$x, __vue_scope_id__$x, __vue_is_functional_template__$x, __vue_module_identifier__$x, false, createInjector, undefined, undefined);
var __vue_component__$Z = __vue_component__$Y;
//
var script$w = {
name: 'LanguagesMenu',
computed: {
...mapState('wf', ['languages', 'language', 'reset']),
count() {
return this.languages.length;
},
sortedLanguages() {
if (this.languages && this.order == "order") {
return this.languages.slice().sort((a, b) => {
return a.order - b.order;
});
}
return this.languages;
}
},
props: {
showTitle: {
type: Boolean,
default: false
},
showFlag: {
type: Boolean,
default: true
},
labelType: {
type: String,
default: "none"
},
hideActive: {
type: Boolean,
default: false
},
title: {
type: String,
default: "Select language"
},
order: {
type: String,
default: "id"
}
},
data() {
return {
active: false
};
},
methods: {
changeLanguage(language) {
return () => {
if (this.$listeners && this.$listeners.changeLanguage) {
this.$emit("change", Object.freeze(language));
} else {
this.$wayfinder.setLanguage(language.name);
}
};
},
getFlagImage(id) {
return WayfinderAPI.getURL("images", "thumbnail", [id]);
}
},
watch: {
reset: function () {
this.active = false;
}
}
};
/* script */
const __vue_script__$w = script$w;
/* template */
var __vue_render__$w = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-languages-menu",
class: {
'wf-active': _vm.active
}
}, [_c('ul', {
staticClass: "wf-list",
class: ['wf-list-count-' + _vm.count, _vm.active ? 'wf-active' : '']
}, _vm._l(_vm.sortedLanguages, function (lang) {
return _c('li', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.changeLanguage(lang),
expression: "changeLanguage(lang)",
arg: "tap"
}, {
name: "show",
rawName: "v-show",
value: !(_vm.hideActive && lang.getName() == _vm.language),
expression: "!(hideActive && lang.getName() == language)"
}],
key: lang.getName(),
staticClass: "wf-list-item wf-language",
class: ["wf-lang-" + lang.getName(), {
"wf-active": lang.getName() == _vm.language,
"wf-display": _vm.active
}]
}, [_vm.showFlag ? _c('div', {
staticClass: "wf-lang-flag",
style: {
backgroundImage: 'url(' + _vm.getFlagImage(lang.flagImage) + ')'
}
}) : _vm._e(), _vm._v(" "), _vm.labelType == 'code' ? _c('label', [_vm._v(_vm._s(lang.getName()))]) : _vm._e(), _vm._v(" "), _vm.labelType == 'native' ? _c('label', [_vm._v(_vm._s(lang.getNativeName()))]) : _vm._e()]);
}), 0)]);
};
var __vue_staticRenderFns__$w = [];
/* style */
const __vue_inject_styles__$w = function (inject) {
if (!inject) return;
inject("data-v-317032ae_0", {
source: ".wf-languages-menu.active[data-v-317032ae]{height:fit-content;z-index:10}.wf-languages-menu.active .wf-languages-title[data-v-317032ae]{visibility:initial;opacity:1}.wf-languages-menu .wf-languages-title[data-v-317032ae]{opacity:0;padding-bottom:.5rem;margin:auto;text-align:center;transition:opacity .2s ease-in;overflow:hidden}.wf-languages-menu .wf-language .wf-lang-flag[data-v-317032ae]{width:70%;height:100%;background-size:cover;background-position:50%;background-repeat:no-repeat}.wf-languages-menu .wf-language .wf-active[data-v-317032ae]{height:3.5rem;margin-bottom:1rem}.wf-languages-menu .wf-language .wf-display[data-v-317032ae]{height:3.5rem;margin-bottom:1.5rem}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$w = "data-v-317032ae";
/* module identifier */
const __vue_module_identifier__$w = undefined;
/* functional template */
const __vue_is_functional_template__$w = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$W = /*#__PURE__*/normalizeComponent({
render: __vue_render__$w,
staticRenderFns: __vue_staticRenderFns__$w
}, __vue_inject_styles__$w, __vue_script__$w, __vue_scope_id__$w, __vue_is_functional_template__$w, __vue_module_identifier__$w, false, createInjector, undefined, undefined);
var __vue_component__$X = __vue_component__$W;
//
var script$v = {
name: "Group",
computed: {
...mapState('wf', ['language'])
},
props: {
group: {
type: Object,
default: null
},
showIcon: {
type: Boolean,
default: false
},
showPOICount: {
type: Boolean,
default: false
},
showDescription: {
type: Boolean,
default: false
}
},
watch: {
language() {
if (this.$wayfinder) {
this.show_path = this.$wayfinder.translator.get('show_path');
}
}
},
methods: {
hasImage() {
if (this.group.getIconUrl()) return "wf-has-icon";else return "wf-icon-none";
}
}
};
/* script */
const __vue_script__$v = script$v;
/* template */
var __vue_render__$v = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _vm.group ? _c('div', {
staticClass: "wf-group",
class: [_vm.hasImage()]
}, [_c('label', {
staticClass: "wf-name",
domProps: {
"innerHTML": _vm._s(_vm.group.getName(_vm.language))
}
}), _vm._v(" "), _vm.showPOICount ? _c('label', {
staticClass: "wf-poi-count"
}, [_vm._v(_vm._s(_vm.group.pois.length))]) : _vm._e(), _vm._v(" "), _vm.showIcon ? _c('img', {
staticClass: "wf-group-icon",
attrs: {
"src": _vm.group.getIconUrl()
}
}) : _vm._e(), _vm._v(" "), _vm.showDescription ? _c('span', {
staticClass: "wf-description",
domProps: {
"innerHTML": _vm._s(_vm.group.getDescription(_vm.language))
}
}) : _vm._e()]) : _vm._e();
};
var __vue_staticRenderFns__$v = [];
/* style */
const __vue_inject_styles__$v = undefined;
/* scoped */
const __vue_scope_id__$v = "data-v-0818f727";
/* module identifier */
const __vue_module_identifier__$v = undefined;
/* functional template */
const __vue_is_functional_template__$v = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$V = /*#__PURE__*/normalizeComponent({
render: __vue_render__$v,
staticRenderFns: __vue_staticRenderFns__$v
}, __vue_inject_styles__$v, __vue_script__$v, __vue_scope_id__$v, __vue_is_functional_template__$v, __vue_module_identifier__$v, false, undefined, undefined, undefined);
var Group = __vue_component__$V;
//
var script$u = {
name: 'SubGroupMenu',
components: {
Group,
POI
},
props: {
parent: {
type: Number,
default: -1
},
showPOICount: {
type: Boolean,
default: false
},
az: {
type: Boolean,
default: false
},
order: {
type: Boolean,
default: false
},
showIcon: {
type: Boolean,
default: false
},
showSubGroups: {
type: Boolean,
default: true
},
showPOIs: {
type: Boolean,
default: false
},
showPOILogo: {
type: Boolean,
default: false
},
showPOIName: {
type: Boolean,
default: true
},
showPOIPathButton: {
type: Boolean,
default: false
},
showPOIDescription: {
type: Boolean,
default: false
},
showPOIRoomID: {
type: Boolean,
default: false
},
showPOIFloor: {
type: Boolean,
default: false
},
openGroup: {
type: Boolean,
default: true
},
sortPOIs: {
type: Boolean,
default: true
},
showParentGroup: {
type: Boolean,
default: false
},
showDescription: {
type: Boolean,
default: false
}
},
data() {
return {
current: null,
parentGroup: null,
sortedGroups: [],
count: 0
};
},
computed: {
...mapState('wf', ['poiGroups', 'currentGroup', 'language']),
currentGroupName() {
return this.parentGroup ? this.parentGroup.getName(this.language) : '';
}
},
mounted() {
this.sortedGroups = this.sortGroups();
},
watch: {
parent: function () {
this.sortedGroups = this.sortGroups();
},
currentGroup: function () {
this.current = this.currentGroup;
},
poiGroups: function () {
this.sortedGroups = this.sortGroups();
}
},
methods: {
onClick(group) {
return () => {
if (this.current && group && this.current.id == group.id) {
this.current = null;
} else {
this.current = Object.freeze(group);
}
this.$emit('clicked', group);
};
},
onPOICLick(poi) {
return () => {
this.$emit('poiClicked', poi);
};
},
back() {
return () => {
this.$emit('back');
};
},
reset() {
this.$store.dispatch('wf/SET_CURRENT_GROUP', null);
},
sortGroups() {
let arr = []; // Copy arr for sorting
let topic;
let groups = this.poiGroups;
for (let i in groups) {
topic = groups[i];
if (topic.id == this.parent) {
this.parentGroup = topic;
}
if (topic && topic.getShowInMenu() && topic.getName(this.language)) {
if (this.parent > -1 && parseInt(topic.parent_id) == this.parent) {
arr.push(topic);
} else if (this.parent === -1 && topic.parent_id === null) {
arr.push(topic);
}
}
}
if (this.az) {
arr = arr.sort((a, b) => {
if (a && a.getName(this.language) && b && b.getName(this.language)) {
return a.getName(this.language).localeCompare(b.getName(this.language), this.language, {
sensitivity: 'accent'
});
} else {
return 0;
}
});
} else if (this.order) {
arr = arr.sort((a, b) => {
if (a && b) {
return a.order - b.order;
}
return 0;
});
}
this.count = arr.length;
return arr;
},
subGroups(subGroups) {
if (subGroups) {
let groups = [];
let _g;
for (let g in subGroups) {
_g = parseInt(subGroups[g]);
if (this.poiGroups[_g] && this.poiGroups[_g].getShowInMenu()) {
groups.push(this.poiGroups[_g]);
}
}
return groups;
} else {
return [];
}
},
sortedPOIs(pois) {
let arr = pois.slice().filter(poi => {
return poi && poi.getShowInMenu();
}); // Copy and filter array
if (!this.sortPOIs) return arr;
arr = arr.sort((a, b) => {
if (a.getName(this.language) && b.getName(this.language)) {
return a.getName(this.language).localeCompare(b.getName(this.language));
} else {
return 0;
}
});
return arr;
}
}
};
/* script */
const __vue_script__$u = script$u;
/* template */
var __vue_render__$u = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-groups-menu"
}, [_vm.parentGroup ? _c('ul', {
staticClass: "wf-list",
class: ['wf-list-count-' + _vm.count]
}, [_vm.showParentGroup ? _c('li', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.back(),
expression: "back()",
arg: "tap"
}],
staticClass: "wf-list-item wf-list-header"
}, [_vm._v(_vm._s(_vm.currentGroupName))]) : _vm._e(), _vm._v(" "), _vm._l(_vm.sortedGroups, function (topic) {
return _c('li', {
key: topic.id,
staticClass: "wf-list-item",
class: {
"wf-active": _vm.current && topic.id == _vm.current.id
}
}, [_c('div', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.onClick(topic),
expression: "onClick(topic)",
arg: "tap"
}],
staticClass: "wf-item-content"
}, [_vm._t("default", function () {
return [_c('Group', {
attrs: {
"group": topic,
"showIcon": _vm.showIcon,
"showPOICount": _vm.showPOICount,
"showDescription": _vm.showDescription
}
})];
}, {
"group": topic
})], 2), _vm._v(" "), topic.pois.length > 0 && _vm.showPOIs ? _c('ul', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.current && topic.id == _vm.current.id,
expression: "current && topic.id == current.id"
}],
staticClass: "wf-list wf-sublist"
}, _vm._l(_vm.sortedPOIs(topic.pois), function (poi) {
return _c('li', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.onPOICLick(poi),
expression: "onPOICLick(poi)",
arg: "tap"
}],
key: poi.id,
staticClass: "wf-list-item"
}, [_vm._t("poi", function () {
return [_c('POI', {
attrs: {
"poi": poi,
"showLogo": _vm.showPOILogo,
"showName": _vm.showPOIName,
"showPathButton": _vm.showPOIPathButton,
"showDescription": _vm.showPOIDescription,
"showRoomID": _vm.showPOIRoomID,
"showFloor": _vm.showPOIFloor
}
})];
}, {
"poi": poi
})], 2);
}), 0) : _vm._e()]);
}), _vm._v(" "), _vm.showPOIs ? _c('div', _vm._l(_vm.sortedPOIs(_vm.parentGroup.pois), function (poi) {
return _c('li', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.onPOICLick(poi),
expression: "onPOICLick(poi)",
arg: "tap"
}],
key: poi.id,
staticClass: "wf-list-item"
}, [_vm._t("poi", function () {
return [_c('POI', {
attrs: {
"poi": poi,
"showLogo": _vm.showPOILogo,
"showName": _vm.showPOIName,
"showPathButton": _vm.showPOIPathButton,
"showDescription": _vm.showPOIDescription,
"showRoomID": _vm.showPOIRoomID,
"showFloor": _vm.showPOIFloor
}
})];
}, {
"poi": poi
})], 2);
}), 0) : _vm._e()], 2) : _vm._e()]);
};
var __vue_staticRenderFns__$u = [];
/* style */
const __vue_inject_styles__$u = function (inject) {
if (!inject) return;
inject("data-v-7a60dcc9_0", {
source: ".wf-groups-menu .wf-list-item[data-v-7a60dcc9]{list-style:none}.wf-groups-menu .wf-list[data-v-7a60dcc9]{margin:0;padding:0}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$u = "data-v-7a60dcc9";
/* module identifier */
const __vue_module_identifier__$u = undefined;
/* functional template */
const __vue_is_functional_template__$u = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$U = /*#__PURE__*/normalizeComponent({
render: __vue_render__$u,
staticRenderFns: __vue_staticRenderFns__$u
}, __vue_inject_styles__$u, __vue_script__$u, __vue_scope_id__$u, __vue_is_functional_template__$u, __vue_module_identifier__$u, false, createInjector, undefined, undefined);
var SubGroupMenu = __vue_component__$U;
//
var script$t = {
name: 'GroupsMenu',
components: {
Group,
POI,
SubGroupMenu
},
props: {
currentGroup: {
type: Object,
default: null
},
parent: {
type: Number,
default: -1
},
currentPOI: {
type: Object,
default: null
},
showPOICount: {
type: Boolean,
default: false
},
az: {
type: Boolean,
default: false
},
order: {
type: Boolean,
default: false
},
showIcon: {
type: Boolean,
default: false
},
showSubGroups: {
type: Boolean,
default: true
},
showPOIs: {
type: Boolean,
default: false
},
showPOILogo: {
type: Boolean,
default: false
},
showPOIName: {
type: Boolean,
default: true
},
showPOIPathButton: {
type: Boolean,
default: false
},
showPOIDescription: {
type: Boolean,
default: false
},
showPOIRoomID: {
type: Boolean,
default: false
},
showPOIFloor: {
type: Boolean,
default: false
},
openGroup: {
type: Boolean,
default: true
},
sortPOIs: {
type: Boolean,
default: true
},
showParentGroup: {
type: Boolean,
default: false
},
showDescription: {
type: Boolean,
default: false
}
},
watch: {
currentGroup() {
this.current = this.currentGroup;
}
},
data() {
return {
count: 0,
current: null,
parentGroup: null
};
},
computed: {
...mapState('wf', ['poiGroups', 'language']),
sortedGroups() {
let arr = []; // Copy arr for sorting
let topic;
let groups = this.poiGroups;
for (let i in groups) {
topic = groups[i];
if (topic.id == this.parent) {
this.parentGroup = topic;
}
if (topic && topic.getShowInMenu() && topic.getName(this.language)) {
if (this.parent > -1 && parseInt(topic.parent_id) == this.parent) {
arr.push(topic);
} else if (this.parent === -1 && (topic.parent_id === null || topic.parent_id == 0)) {
arr.push(topic);
}
}
}
if (this.az) {
arr = arr.sort((a, b) => {
if (a && a.getName(this.language) && b && b.getName(this.language)) {
return a.getName(this.language).localeCompare(b.getName(this.language), this.language, {
sensitivity: 'accent'
});
} else {
return 0;
}
});
} else if (this.order) {
arr = arr.sort((a, b) => {
if (a && b) {
return a.order - b.order;
}
return 0;
});
}
this.count = arr.length;
return arr;
},
currentGroupName() {
return this.parentGroup ? this.parentGroup.getName(this.language) : '';
}
},
methods: {
onClick(group) {
return () => {
if (this.current && group && this.current.id == group.id) {
this.current = null;
return;
} else {
this.current = Object.freeze(group);
}
//emit only if this is a leaf
if (!(this.current && this.showSubGroups && group && group.childGroups && group.childGroups.length > 0)) {
this.$emit('clicked', group);
}
};
},
onPOICLick(poi) {
return () => {
this.$emit('poiClicked', poi);
};
},
onSubGroupClick(group) {
this.$emit('subGroupClicked', group);
},
onSubPOICLick(poi) {
this.$emit('poiClicked', poi);
},
reset() {
this.current = null;
},
back() {
return () => {
this.$emit('back');
};
},
subGroups(subGroups) {
if (subGroups) {
let groups = [];
let _g;
for (let g in subGroups) {
_g = parseInt(subGroups[g]);
if (this.poiGroups[_g] && this.poiGroups[_g].getShowInMenu()) {
groups.push(this.poiGroups[_g]);
}
}
return groups;
} else {
return [];
}
},
sortedPOIs(pois) {
let arr = pois.slice().filter(poi => {
return poi && poi.getShowInMenu();
}); // Copy and filter array
if (!this.sortPOIs) return arr;
arr = arr.sort((a, b) => {
if (a.getName(this.language) && b.getName(this.language)) {
return a.getName(this.language).localeCompare(b.getName(this.language));
} else {
return 0;
}
});
return arr;
}
}
};
/* script */
const __vue_script__$t = script$t;
/* template */
var __vue_render__$t = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-groups-menu"
}, [_c('ul', {
staticClass: "wf-list",
class: ['wf-list-count-' + _vm.count]
}, [_vm._t("prepend"), _vm._v(" "), _vm.showParentGroup ? _c('li', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.back(),
expression: "back()",
arg: "tap"
}],
staticClass: "wf-list-item wf-list-header"
}, [_vm._v(_vm._s(_vm.currentGroupName))]) : _vm._e(), _vm._v(" "), _vm._l(_vm.sortedGroups, function (topic) {
return _c('li', {
key: topic.id,
staticClass: "wf-list-item",
class: {
"wf-active": _vm.current && topic.id == _vm.current.id
}
}, [_c('div', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.onClick(topic),
expression: "onClick(topic)",
arg: "tap"
}],
staticClass: "wf-item-content"
}, [_vm._t("default", function () {
return [_c('Group', {
attrs: {
"group": topic,
"showIcon": _vm.showIcon,
"showPOICount": _vm.showPOICount,
"showDescription": _vm.showDescription
}
})];
}, {
"group": topic
})], 2), _vm._v(" "), _vm.showSubGroups ? _c('ul', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.current && topic.id == _vm.current.id && _vm.subGroups(topic.childGroups).length > 0,
expression: "current && topic.id == current.id && subGroups(topic.childGroups).length > 0"
}]
}, [_c('SubGroupMenu', {
attrs: {
"parent": parseInt(topic.id),
"showPOICount": _vm.showPOICount,
"az": _vm.az,
"order": _vm.order,
"showIcon": _vm.showIcon,
"showPOIs": _vm.showPOIs,
"sortPOIs": _vm.sortPOIs
},
on: {
"clicked": _vm.onSubGroupClick,
"poiClicked": _vm.onSubPOICLick
}
})], 1) : _vm._e(), _vm._v(" "), topic.pois.length > 0 && _vm.showPOIs ? _c('ul', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.current && topic.id == _vm.current.id,
expression: "current && topic.id == current.id"
}],
staticClass: "wf-list wf-sublist"
}, _vm._l(_vm.sortedPOIs(topic.pois), function (poi) {
return _c('li', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.onPOICLick(poi),
expression: "onPOICLick(poi)",
arg: "tap"
}],
key: poi.id,
staticClass: "wf-list-item",
class: {
"wf-active": _vm.currentPOI && poi.id == _vm.currentPOI.id
}
}, [_vm._t("poi", function () {
return [_c('POI', {
attrs: {
"poi": poi,
"showLogo": _vm.showPOILogo,
"showName": _vm.showPOIName,
"showPathButton": _vm.showPOIPathButton,
"showDescription": _vm.showPOIDescription,
"showRoomID": _vm.showPOIRoomID,
"showFloor": _vm.showPOIFloor
}
})];
}, {
"poi": poi
})], 2);
}), 0) : _vm._e()]);
}), _vm._v(" "), _vm._t("append")], 2)]);
};
var __vue_staticRenderFns__$t = [];
/* style */
const __vue_inject_styles__$t = function (inject) {
if (!inject) return;
inject("data-v-3046866c_0", {
source: ".wf-groups-menu .wf-list-item[data-v-3046866c]{list-style:none}.wf-groups-menu .wf-list[data-v-3046866c]{margin:0;padding:0}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$t = "data-v-3046866c";
/* module identifier */
const __vue_module_identifier__$t = undefined;
/* functional template */
const __vue_is_functional_template__$t = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$S = /*#__PURE__*/normalizeComponent({
render: __vue_render__$t,
staticRenderFns: __vue_staticRenderFns__$t
}, __vue_inject_styles__$t, __vue_script__$t, __vue_scope_id__$t, __vue_is_functional_template__$t, __vue_module_identifier__$t, false, createInjector, undefined, undefined);
var __vue_component__$T = __vue_component__$S;
//
var script$s = {
name: 'GroupPOIsMenu',
props: {
group: {
type: Object,
default: null
},
currentPOI: {
type: Object,
default: null
},
az: {
type: Boolean,
default: false
},
order: {
type: Boolean,
default: false
},
showPOILogo: {
type: Boolean,
default: false
},
showPOIName: {
type: Boolean,
default: true
},
showPOIPathButton: {
type: Boolean,
default: false
},
showPOIDescription: {
type: Boolean,
default: false
},
showPOIRoomID: {
type: Boolean,
default: false
},
showPOIFloor: {
type: Boolean,
default: false
},
sortPOIs: {
type: Boolean,
default: true
},
showDescription: {
type: Boolean,
default: false
},
showGroupHeader: {
type: Boolean,
default: false
}
},
components: {
POI
},
data() {
return {
count: 0
};
},
computed: {
...mapState('wf', ['language']),
getPOIs() {
if (this.group && this.group.pois) {
let arr = this.group.pois.slice(0);
arr = arr.filter(p => p.getShowInMenu());
this.count = arr.length;
return arr.sort((a, b) => {
return a.getName(this.language).localeCompare(b.getName(this.language));
});
} else {
this.count = 0;
return [];
}
},
currentGroupName() {
return this.group ? this.group.getName(this.language) : '';
}
},
methods: {
onClick(poi) {
return () => {
this.$emit('clicked', poi);
};
},
back() {
return () => {
this.$emit('back');
};
}
}
};
/* script */
const __vue_script__$s = script$s;
/* template */
var __vue_render__$s = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-group-pois-menu"
}, [_c('ul', {
staticClass: "wf-list",
class: ['wf-list-count-' + _vm.count]
}, [_vm.showGroupHeader ? _c('li', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.back(),
expression: "back()",
arg: "tap"
}],
staticClass: "wf-list-item wf-list-header"
}, [_vm._v(_vm._s(_vm.currentGroupName))]) : _vm._e(), _vm._v(" "), _vm._l(_vm.getPOIs, function (poi) {
return _c('li', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.onClick(poi),
expression: "onClick(poi)",
arg: "tap"
}],
key: poi.id,
staticClass: "wf-list-item",
class: {
"wf-active": _vm.currentPOI && poi.id == _vm.currentPOI.id
}
}, [_vm._t("default", function () {
return [_c('POI', {
attrs: {
"poi": poi,
"showLogo": _vm.showPOILogo,
"showName": _vm.showPOIName,
"showPathButton": _vm.showPOIPathButton,
"showDescription": _vm.showPOIDescription,
"showRoomID": _vm.showPOIRoomID,
"showFloor": _vm.showPOIFloor
}
})];
}, {
"poi": poi
})], 2);
})], 2)]);
};
var __vue_staticRenderFns__$s = [];
/* style */
const __vue_inject_styles__$s = function (inject) {
if (!inject) return;
inject("data-v-503d8018_0", {
source: ".wf-group-pois-menu[data-v-503d8018]{overflow:hidden;user-select:none}.wf-group-pois-menu .wf-list[data-v-503d8018]{margin:0;padding:0}.wf-group-pois-menu .list-item[data-v-503d8018]{list-style:none;padding:1em}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$s = "data-v-503d8018";
/* module identifier */
const __vue_module_identifier__$s = undefined;
/* functional template */
const __vue_is_functional_template__$s = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$Q = /*#__PURE__*/normalizeComponent({
render: __vue_render__$s,
staticRenderFns: __vue_staticRenderFns__$s
}, __vue_inject_styles__$s, __vue_script__$s, __vue_scope_id__$s, __vue_is_functional_template__$s, __vue_module_identifier__$s, false, createInjector, undefined, undefined);
var __vue_component__$R = __vue_component__$Q;
//
var script$r = {
name: 'BuildingLogo',
computed: {
...mapState('wf', ['building'])
},
methods: {
getLogo() {
if (this.building && this.building.logoID) {
return 'url(' + WayfinderAPI.getURL("images", "get", this.building.logoID) + ')';
}
}
}
};
/* script */
const __vue_script__$r = script$r;
/* template */
var __vue_render__$r = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-building-logo",
style: {
'background-image': _vm.getLogo()
}
});
};
var __vue_staticRenderFns__$r = [];
/* style */
const __vue_inject_styles__$r = function (inject) {
if (!inject) return;
inject("data-v-38faefb4_0", {
source: ".wf-building-logo[data-v-38faefb4]{background-size:contain;background-repeat:no-repeat;background-position:50%}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$r = "data-v-38faefb4";
/* module identifier */
const __vue_module_identifier__$r = undefined;
/* functional template */
const __vue_is_functional_template__$r = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$O = /*#__PURE__*/normalizeComponent({
render: __vue_render__$r,
staticRenderFns: __vue_staticRenderFns__$r
}, __vue_inject_styles__$r, __vue_script__$r, __vue_scope_id__$r, __vue_is_functional_template__$r, __vue_module_identifier__$r, false, createInjector, undefined, undefined);
var __vue_component__$P = __vue_component__$O;
//
var script$q = {
name: 'YAH',
props: {
showLabel: {
type: Boolean,
default: true
}
},
computed: {
//yahLogo
...mapState('wf', ['yahLogo', 'language'])
},
methods: {
onClicked() {
this.$wayfinder.showKiosk();
}
}
};
/* script */
const __vue_script__$q = script$q;
/* template */
var __vue_render__$q = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('button', {
staticClass: "wf-component wf-yah",
on: {
"click": function ($event) {
return _vm.onClicked();
}
}
}, [_c('i', {
staticClass: "wf-icon",
style: {
'background-image': _vm.yahLogo
}
}), _vm._v(" "), _vm.showLabel ? _c('label', {
attrs: {
"data-translation-element": "yah"
}
}, [_vm._v("YAH")]) : _vm._e()]);
};
var __vue_staticRenderFns__$q = [];
/* style */
const __vue_inject_styles__$q = function (inject) {
if (!inject) return;
inject("data-v-16e4e341_0", {
source: ".wf-yah[data-v-16e4e341]{text-align:center;border:none;outline:0}.wf-icon[data-v-16e4e341]{width:100%;height:100%;display:block;background-repeat:no-repeat;background-position:50%;background-size:contain;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iOTQiIGhlaWdodD0iMTI4IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6Y2M9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zIyIgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogPG1ldGFkYXRhPgogIDxyZGY6UkRGPgogICA8Y2M6V29yayByZGY6YWJvdXQ9IiI+CiAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgIDxkYzp0eXBlIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiLz4KICAgIDxkYzp0aXRsZS8+CiAgIDwvY2M6V29yaz4KICA8L3JkZjpSREY+CiA8L21ldGFkYXRhPgogPHBhdGggZD0ibTQ2Ljk3NyAxMjYuNjRjLTAuMjgzMDMtMC42ODc1LTYuMTYzMS02LjQzNzctMTAuMzc0LTExLjY2My0yNC45NDctMzMuMTIyLTUyLjc2MS02My44OTgtMjAuMjgzLTEwMS4zIDE0LjM4MS0xMy44OTQgMzIuMTEzLTE0LjY4NiA1MC4zNDMtOC4yMTAxIDUxLjMzIDI5LjcwMiAxNC4xNjYgNzguMTU1LTEwLjIzNSAxMTAuMDFsLTkuNDUwMSAxMS4xNjN6bTE1LjQ0LTUwLjc3MWMzNC4yMzctMjQuNDg1IDcuNzY4LTcxLjYzMy0yOS44NDgtNTUuOTU5LTEwLjk4NCA1Ljg1NjktMTYuNDM0IDE2LjA0OC0xNi42MjUgMjguMDY4LTAuNTI0NSAxMS42OTMgNS42ODU0IDIxLjQ3MSAxNS41MjYgMjcuNDYxIDcuMDU1NSAzLjg0MDEgMTAuMTU3IDQuNTMzNyAxOC4xNDYgNC4wNTc3IDUuMTc3Ni0wLjMwODUyIDguMTYxMS0xLjE1MzggMTIuODAxLTMuNjI3MXoiIGZpbGw9IiNjNjQyNDIiIGZpbGwtb3BhY2l0eT0iLjk4ODI0Ii8+CiA8cGF0aCB0cmFuc2Zvcm09Im1hdHJpeCguODc4MjkgMCAwIDEuMDUxOSAuNTU0NzQgLTYuOTk1MykiIGQ9Im00MS42ODIgODkuODkxYTUxLjIyMyA0MS43NTQgMCAxIDEgMS4yNzY2IDAuMjA4MDkiIGZpbGw9IiNjNjQyNDIiIGZpbGwtb3BhY2l0eT0iLjk4ODI0Ii8+CiA8cGF0aCB0cmFuc2Zvcm09InRyYW5zbGF0ZSguNjQ1MzUpIiBkPSJtNDMuNjMxIDY5LjEyOWEyNi4wMTEgMjAuOTkxIDAgMSAxIDAuNjQ4MjYgMC4xMDQ2MSIgZmlsbC1vcGFjaXR5PSIwIiBvcGFjaXR5PSIuMzQwMTYiLz4KIDxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKC42NDUzNSkiIGQ9Im0zMS44OTIgMTE0LjI4YTE2LjY1NiAxMS43NSAwIDEgMSAwLjQxNTExIDAuMDU4NiIgZmlsbC1vcGFjaXR5PSIwIi8+CiA8cGF0aCB0cmFuc2Zvcm09Im1hdHJpeCguOTcwMiAwIDAgMS4wMjcyIC00LjA1ODggLTUuNzUwNCkiIGQ9Im00NS41MjEgODQuODI0YTM0LjQ1MyAzMy41NCAwIDEgMSAwLjg1ODY2IDAuMTY3MTYiIGZpbGw9IiNiNzJjMmMiLz4KIDxwYXRoIHRyYW5zZm9ybT0ibWF0cml4KC42NDYzIDAgMCAuNjE2ODEgNS4xMjYxIDQuOTAxNCkiIGQ9Im01Ny4wNzkgMTA0LjYxYTM0LjIwMyAzNi42MjMgMCAxIDEgMC44NTI0NCAwLjE4MjUyIiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo=)}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$q = "data-v-16e4e341";
/* module identifier */
const __vue_module_identifier__$q = undefined;
/* functional template */
const __vue_is_functional_template__$q = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$N = /*#__PURE__*/normalizeComponent({
render: __vue_render__$q,
staticRenderFns: __vue_staticRenderFns__$q
}, __vue_inject_styles__$q, __vue_script__$q, __vue_scope_id__$q, __vue_is_functional_template__$q, __vue_module_identifier__$q, false, createInjector, undefined, undefined);
var YAH = __vue_component__$N;
//
var script$p = {
name: 'ShortcutsMenu',
components: {
YAH
},
props: {
showLabel: {
type: Boolean,
default: true
},
showPath: {
type: Boolean,
default: true
},
showIcon: {
type: Boolean,
default: true
},
highlight: {
type: Boolean,
default: true
},
dehighlightOverlay: {
type: Boolean,
default: false
}
},
computed: {
...mapState('wf', ['shortcuts', 'language', 'landscape', 'mobile']),
count() {
return this.shortcuts.length;
},
hasClickedListener() {
return !!(this.$listeners && this.$listeners.clicked);
}
},
methods: {
showShortcut(shortcut) {
var nearest = this.$wayfinder.getNearestPOI(this.$wayfinder.getKiosk(), shortcut.pois);
if (this.hasClickedListener) {
this.$emit("clicked", nearest, shortcut);
} else {
if (this.showPath && typeof nearest === 'object' && nearest != null) {
this.$wayfinder.showPath(nearest.node, nearest);
}
if (this.highlight) {
this.$wayfinder.clearDisplaying();
this.$wayfinder.setDisplaying(shortcut.pois);
}
if (this.dehighlightOverlay && this.$wayfinder.setDehighlightOverlay) {
this.$wayfinder.setDehighlightOverlay(true);
}
this.$wayfinder.update();
}
},
clear() {
if (this.dehighlightOverlay && this.$wayfinder.setDehighlightOverlay) {
this.$wayfinder.setDehighlightOverlay(false);
}
if (this.highlight) {
this.$wayfinder.clearHighlights();
}
this.$wayfinder.update();
},
getImage(id) {
return WayfinderAPI.getURL("images", "thumbnail", [id]);
}
}
};
/* script */
const __vue_script__$p = script$p;
/* template */
var __vue_render__$p = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-shortcuts-menu"
}, [_c('div', {
staticClass: "wf-list",
class: ['wf-list-count-' + _vm.count]
}, _vm._l(_vm.shortcuts, function (shortcut) {
return _c('button', {
key: shortcut.getID(),
staticClass: "wf-list-item wf-shortcut",
class: ["wf-shortcut-" + shortcut.getID()],
on: {
"click": function ($event) {
return _vm.showShortcut(shortcut);
}
}
}, [_vm.showIcon ? _c('img', {
staticClass: "wf-icon",
attrs: {
"src": _vm.getImage(shortcut.imageID)
}
}) : _vm._e(), _vm._v(" "), _vm.showLabel ? _c('label', [_vm._v(_vm._s(shortcut.getName(_vm.language)))]) : _vm._e()]);
}), 0)]);
};
var __vue_staticRenderFns__$p = [];
/* style */
const __vue_inject_styles__$p = function (inject) {
if (!inject) return;
inject("data-v-322579a5_0", {
source: ".shortcuts-container[data-v-322579a5]{display:flex;flex-wrap:wrap-reverse;align-content:stretch;justify-content:space-between;margin-bottom:.1rem;flex-direction:row}.shortcuts-container.map-shortcuts[data-v-322579a5]{position:absolute;left:.5rem;bottom:15%;top:15%;flex-direction:column;justify-content:center}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$p = "data-v-322579a5";
/* module identifier */
const __vue_module_identifier__$p = undefined;
/* functional template */
const __vue_is_functional_template__$p = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$L = /*#__PURE__*/normalizeComponent({
render: __vue_render__$p,
staticRenderFns: __vue_staticRenderFns__$p
}, __vue_inject_styles__$p, __vue_script__$p, __vue_scope_id__$p, __vue_is_functional_template__$p, __vue_module_identifier__$p, false, createInjector, undefined, undefined);
var __vue_component__$M = __vue_component__$L;
//
//
//
//
//
//
let timer = null;
var script$o = {
data: () => ({
direction: 0,
zooming: false
}),
methods: {
touchStart(dir) {
return () => {
this.start(dir);
};
},
touchStop() {
return () => {
this.stop();
};
},
start(dir) {
this.direction = dir;
this.zooming = true;
this.zoom();
},
stop() {
this.direction = 0;
this.zooming = false;
clearTimeout(timer);
},
zoom() {
if (this.direction > 0) {
this.$wayfinder.zoomIn();
} else {
this.$wayfinder.zoomOut();
}
if (this.zooming) {
timer = setTimeout(() => {
this.zoom();
}, 50);
}
}
}
};
/* script */
const __vue_script__$o = script$o;
/* template */
var __vue_render__$o = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-zoommenu"
}, [_c('div', {
directives: [{
name: "touch",
rawName: "v-touch:start",
value: _vm.touchStart(1),
expression: "touchStart(1)",
arg: "start"
}, {
name: "touch",
rawName: "v-touch:end",
value: _vm.touchStop(),
expression: "touchStop()",
arg: "end"
}],
staticClass: "wf-item wf-zoom-in",
on: {
"mousedown": function ($event) {
return _vm.start(1);
},
"mouseleave": function ($event) {
return _vm.stop();
},
"mouseup": function ($event) {
return _vm.stop();
}
}
}, [_vm._v("+")]), _vm._v(" "), _c('div', {
directives: [{
name: "touch",
rawName: "v-touch:start",
value: _vm.touchStart(-1),
expression: "touchStart(-1)",
arg: "start"
}, {
name: "touch",
rawName: "v-touch:end",
value: _vm.touchStop(),
expression: "touchStop()",
arg: "end"
}],
staticClass: "wf-item wf-zoom-out",
on: {
"mousedown": function ($event) {
return _vm.start(-1);
},
"mouseleave": function ($event) {
return _vm.stop();
},
"mouseup": function ($event) {
return _vm.stop();
}
}
}, [_vm._v("-")])]);
};
var __vue_staticRenderFns__$o = [];
/* style */
const __vue_inject_styles__$o = function (inject) {
if (!inject) return;
inject("data-v-260dca50_0", {
source: ".wf-zoommenu[data-v-260dca50]{user-select:none}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$o = "data-v-260dca50";
/* module identifier */
const __vue_module_identifier__$o = undefined;
/* functional template */
const __vue_is_functional_template__$o = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$J = /*#__PURE__*/normalizeComponent({
render: __vue_render__$o,
staticRenderFns: __vue_staticRenderFns__$o
}, __vue_inject_styles__$o, __vue_script__$o, __vue_scope_id__$o, __vue_is_functional_template__$o, __vue_module_identifier__$o, false, createInjector, undefined, undefined);
var __vue_component__$K = __vue_component__$J;
//
var script$n = {
name: 'MapFloors',
props: {
showPOICount: {
type: Boolean,
default: false
},
currentFloor: {
type: Object,
default: null
},
hideWhenSingleFloor: {
type: Boolean,
default: true
}
},
data() {
return {
count: 0
};
},
computed: {
...mapState('wf', ['floors', 'language']),
filteredFloors() {
let arr = []; // Copy arr for sorting
let floor;
let floors = this.floors;
for (let i in floors) {
floor = floors[i];
if (floor && floor.getShowInMenu() && floor.getName(this.language)) {
arr.push(floor);
}
}
this.count = arr.length;
return arr;
},
hasClickedListener() {
return !!(this.$listeners && this.$listeners.clicked);
}
},
methods: {
changeFloor(floor) {
if (this.hasClickedListener) {
this.$emit("clicked", floor);
} else {
this.$wayfinder.showFloor(floor);
}
}
}
};
/* script */
const __vue_script__$n = script$n;
/* template */
var __vue_render__$n = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-floors-menu"
}, [_c('ul', {
directives: [{
name: "show",
rawName: "v-show",
value: !(_vm.hideWhenSingleFloor && _vm.floors.length <= 1),
expression: "!(hideWhenSingleFloor && floors.length <= 1)"
}],
staticClass: "wf-list",
class: ['wf-list-count-' + _vm.count]
}, _vm._l(_vm.filteredFloors, function (floor) {
return _c('li', {
key: floor.id,
staticClass: "wf-list-item",
class: ["wf-lang-" + _vm.language, "wf-floor-" + floor.index, {
"wf-active": _vm.currentFloor && floor.id == _vm.currentFloor.id
}],
on: {
"click": function ($event) {
return _vm.changeFloor(floor);
}
}
}, [_c('label', {
staticClass: "wf-title"
}, [_vm._v(_vm._s(floor.getName(_vm.language)))]), _vm._v(" "), _vm.showPOICount ? _c('label', {
staticClass: "wf-count"
}, [_vm._v(_vm._s(floor.pois.length))]) : _vm._e()]);
}), 0)]);
};
var __vue_staticRenderFns__$n = [];
/* style */
const __vue_inject_styles__$n = function (inject) {
if (!inject) return;
inject("data-v-c6d992a4_0", {
source: ".wf-floors-menu .wf-list-item[data-v-c6d992a4]{text-overflow:ellipsis;list-style:none}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$n = "data-v-c6d992a4";
/* module identifier */
const __vue_module_identifier__$n = undefined;
/* functional template */
const __vue_is_functional_template__$n = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$H = /*#__PURE__*/normalizeComponent({
render: __vue_render__$n,
staticRenderFns: __vue_staticRenderFns__$n
}, __vue_inject_styles__$n, __vue_script__$n, __vue_scope_id__$n, __vue_is_functional_template__$n, __vue_module_identifier__$n, false, createInjector, undefined, undefined);
var __vue_component__$I = __vue_component__$H;
//
var script$m = {
name: 'FilteredMenu',
components: {
POI
},
data() {
return {
sortedPOIs: [],
count: 0
};
},
props: {
showLogo: {
type: Boolean,
default: false
},
showName: {
type: Boolean,
default: true
},
showPathButton: {
type: Boolean,
default: false
},
showDescription: {
type: Boolean,
default: false
},
showRoomID: {
type: Boolean,
default: false
},
showFloor: {
type: Boolean,
default: false
},
currentPOI: {
type: Object,
default: null
}
},
computed: {
...mapState('wf', ['filteredPOIs', 'language'])
},
watch: {
filteredPOIs: function (val) {
let arr = val.slice().filter(poi => {
return poi && poi.getShowInMenu();
}); // Copy and filter array
arr = arr.sort((a, b) => {
if (a.getName(this.language) && b.getName(this.language)) {
return a.getName(this.language).localeCompare(b.getName(this.language));
} else {
return 0;
}
});
this.count = arr.length;
this.sortedPOIs = arr;
}
},
methods: {
onClick(poi) {
return () => {
this.$emit('clicked', poi);
this.$wayfinder.statistics.onClick(poi.id, "menu");
};
}
}
};
/* script */
const __vue_script__$m = script$m;
/* template */
var __vue_render__$m = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-filteredmenu"
}, [_c('ul', {
staticClass: "wf-list",
class: ['wf-list-count-' + _vm.count]
}, _vm._l(_vm.sortedPOIs, function (poiitem) {
return _c('li', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.onClick(poiitem),
expression: "onClick(poiitem)",
arg: "tap"
}],
key: poiitem.id,
staticClass: "wf-list-item",
class: {
"wf-active": _vm.currentPOI && poiitem.id == _vm.currentPOI.id
},
on: {
"click": function ($event) {
return _vm.onClick(poiitem);
}
}
}, [_vm._t("default", function () {
return [_c('POI', {
attrs: {
"poi": poiitem,
"showLogo": _vm.showLogo,
"showName": _vm.showName,
"showPathButton": _vm.showPathButton,
"showDescription": _vm.showDescription,
"showRoomID": _vm.showRoomID,
"showFloor": _vm.showFloor
}
})];
}, {
"poi": poiitem
})], 2);
}), 0)]);
};
var __vue_staticRenderFns__$m = [];
/* style */
const __vue_inject_styles__$m = undefined;
/* scoped */
const __vue_scope_id__$m = "data-v-257460c1";
/* module identifier */
const __vue_module_identifier__$m = undefined;
/* functional template */
const __vue_is_functional_template__$m = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$F = /*#__PURE__*/normalizeComponent({
render: __vue_render__$m,
staticRenderFns: __vue_staticRenderFns__$m
}, __vue_inject_styles__$m, __vue_script__$m, __vue_scope_id__$m, __vue_is_functional_template__$m, __vue_module_identifier__$m, false, undefined, undefined, undefined);
var __vue_component__$G = __vue_component__$F;
//
var script$l = {
name: 'POIAdvertisements',
props: {
ads: {
type: Array,
default: []
}
},
data() {
return {};
},
computed: {},
methods: {
clicked(ad) {
this.$emit('clicked', ad);
}
}
};
/* script */
const __vue_script__$l = script$l;
/* template */
var __vue_render__$l = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-poi-advertisements"
}, _vm._l(_vm.ads, function (ad) {
return _c('WFPOIAdvertisement', {
key: ad.id,
attrs: {
"ad": ad
},
on: {
"clicked": _vm.clicked
}
});
}), 1);
};
var __vue_staticRenderFns__$l = [];
/* style */
const __vue_inject_styles__$l = undefined;
/* scoped */
const __vue_scope_id__$l = "data-v-45b241cc";
/* module identifier */
const __vue_module_identifier__$l = undefined;
/* functional template */
const __vue_is_functional_template__$l = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$D = /*#__PURE__*/normalizeComponent({
render: __vue_render__$l,
staticRenderFns: __vue_staticRenderFns__$l
}, __vue_inject_styles__$l, __vue_script__$l, __vue_scope_id__$l, __vue_is_functional_template__$l, __vue_module_identifier__$l, false, undefined, undefined, undefined);
var __vue_component__$E = __vue_component__$D;
function createCommonjsModule(fn, basedir, module) {
return module = {
path: basedir,
exports: {},
require: function (path, base) {
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
}
}, fn(module, module.exports), module.exports;
}
function commonjsRequire () {
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
}
var osk_common = createCommonjsModule(function (module) {
module.exports=function(t){var e={};function i(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s});},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0});},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(s,n,function(e){return t[e]}.bind(null,n));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){i.r(e);class s{constructor(t){this.keyboard=t,this.actions={backspace:function(t,e){e.selectionStart>0&&e.selectionStart==e.selectionEnd?(e.selectionStart--,e.changeValue("")):e.changeValue("");},change_keyset:function(t,e){void 0!==t.action[1]&&(e.keyset=t.action[1],e.clear(),e.construct());},change_layout:function(t,e){void 0!==t.action[1]&&(e.layoutName=t.action[1],e.clear(),e.construct());},submit:function(t,e){void 0!==t.action[1]&&(e.pushtoOutput(),e.clear());}};}activate(t){"function"==typeof this.actions[t.action[0]]&&this.actions[t.action[0]](t,this.keyboard);}addAction(t,e){this.actions[t]=e;}}class n{constructor(t,e,i){this.layouts={},this.layoutName=void 0===i?"en":i,this.keyset="default",this.container=!1,this.containerListenerAdded=!1,this.setContainer(e),this.selectionStart=0,this.selectionEnd=0,this.output=!1,this.outputIsInputField=!0,this.outputSelectionEnabled=!1,this.value="",this.events={change:[],layout:[],ready:[]},this.actions=new s(this),this.cbOnChange=!1,this.setOutput(t),this.setDefaultLayout(),this.construct();}on(t,e){"object"!=typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e);}trigger(){let t=Array.prototype.slice.call(arguments);if(t.length>0){let e=t[0];if(t.shift(),this.events[e]){let i;for(let s=0,n=this.events[e].length;s<n;s++)"function"==typeof(i=this.events[e][s])&&i.apply(this,t);}}}addLayout(t,e){this.layouts[t]=e;}changeLayout(t,e){this.layoutName=t,this.keyset=e||"default",this.clear(),this.construct(),this.trigger("layout",this.layoutName,this.keyset);}setContainer(t){switch(typeof t){case"undefined":this.container=document.createElement("div"),this.container.classList.add("keyboard"),document.body.appendChild(this.container);break;case"string":this.container=document.getElementById(t);break;default:this.container=t;}}setOutput(t){if(!t)return void console.warn("Input field not given",t);let e;if("string"==typeof t){if(e=document.getElementById(t),this.output=e,!this.output)return void console.warn("Input field not found",t)}else e=t,this.output=t;"input"!==this.getFieldType(this.output)&&(this.outputIsInputField=!1);let i=this.getFieldValue(e);this.value=i,this.selectionEnd=i.length,this.output&&(this.output.addEventListener("focus",()=>{this.updateFromOutput();}),this.output.addEventListener("keyup",()=>{this.updateFromOutput(),this.trigger("change",this.value);}),this.output.addEventListener("mouseup",()=>{this.updateFromOutput();}),this.output.addEventListener("input",()=>{this.updateFromOutput();}));}setOutputSelection(t){this.outputSelectionEnabled=t;}getFieldValue(t){if(!t)return "";switch(this.getFieldType(t)){case"input":return t.value;case"textarea":return t.innerText;default:return ""}}updateFromOutput(){this.value=this.getFieldValue(this.output),this.getCaretPosition();}clear(){if(this.container)for(;this.container.firstChild;)this.container.removeChild(this.container.firstChild);}clearValue(){this.value="",this.selectionStart=0,this.selectionEnd=0,this.pushtoOutput();}getCurrentKeyset(){try{return this.layouts[this.layoutName].keys[this.keyset]}catch(t){return console.warn("Error! Probably no keyboard layout added!"),this.layouts.en.keys.default}}construct(){this.clear();let t="",e=this.getCurrentKeyset();for(let i in e){t+="<div class='keyboard-row keyboard-row-"+i+"'>";for(let s in e[i]){let n=e[i][s];switch(typeof n){case"string":t+="<div class='keyboard-key "+n+"' row='"+i+"' index='"+s+"'>"+n+"</div>";break;case"object":let e="";n.cls&&(e=n.cls),t+="<div class='keyboard-key keyboard-"+e+" "+n.key+"' object='' row='"+i+"' index='"+s+"'>"+n.key+"</div>";}}t+="</div>";}this.container.insertAdjacentHTML("beforeend",t),this.containerListenerAdded||(this.container.addEventListener("mousedown",t=>{this.getCaretPosition(),this.keyPressed(t.target),t.stopPropagation(),t.preventDefault();}),this.container.addEventListener("mouseup",t=>{this.keyReleased(t.target),t.stopPropagation();}),this.containerListenerAdded=!0,this.container.onselectstart=function(){return !1},this.container.onmousedown=function(){return !1}),this.rescale();}rescale(){if(!this.container)return;let t,e,i=0;for(let s=0;s<this.container.children.length;s++){let n=(t=this.container.children[s]).offsetHeight-t.clientHeight,o=t.offsetWidth-t.clientWidth;for(let i=0;i<t.children.length;i++){o+=((e=t.children[i]).offsetWidth<this.container.offsetWidth?e.offsetWidth:this.container.offsetWidth)+1,n=Math.max(n,this.container.offsetHeight);}t.width=o,t.height=n,i+=n;}this.container.height=i,this.trigger("ready");}keyPressed(t){t.classList.add("keyboard-key-pressed");let e=this.getCurrentKeyset()[t.getAttribute("row")];if(!e)return;let i=e[t.getAttribute("index")];switch(typeof i){case"string":this.changeValue(i);break;case"object":void 0===i.action?this.changeValue(i.key):this.actions.activate(i);}this.pushtoOutput();}changeValue(t){let e=this.value.substring(0,this.selectionStart),i=this.value.substring(this.selectionEnd,this.value.length);this.value=""+e+t+i,this.selectionStart+=t.length,this.selectionEnd=this.selectionStart;}pushtoOutput(){if(this.output){this.outputIsInputField?(this.output.value=this.value,this.output.selectionStart=this.selectionStart,this.output.selectionEnd=this.selectionEnd):this.output.innerHTML=this.value;let t=new Event("change"),e=new Event("keyup");this.output.dispatchEvent(t),this.output.dispatchEvent(e),this.trigger("change",this.value);}}getFieldType(t){return t&&t.tagName?t.tagName.toLowerCase():"nan"}getCaretPosition(){this.output&&this.outputIsInputField&&this.outputSelectionEnabled&&(this.selectionStart=this.output.selectionStart,this.selectionEnd=this.output.selectionEnd);}keyReleased(t){t.classList.remove("keyboard-key-pressed");}width(){return -1}height(){return -1}setDefaultLayout(){this.layouts.en={name:"English",keyboard:"US International",local_name:"English",lang:"en",keys:{default:[["1","2","3","4","5","6","7","8","9","0",{key:"« Bksp",action:["backspace"],cls:"key2x"}],["q","w","e","r","t","y","u","i","o","p","\\"],["a","s","d","f","g","h","j","k","l",{key:"Enter",action:["submit"],cls:"key3x"}],[{key:"Shift",action:["change_keyset","shift"],cls:"key2x"},"z","x","c","v","b","n","m"],[{key:" ",cls:"key_spacebar"}]],shift:[["~","!","@","#","$","%","^","&","*","(",")",{key:"« Bksp",action:"backspace",cls:"key2x"}],["Q","W","E","R","T","Y","U","I","O","P","{","}"],["A","S","D","F","G","H","J","K","L",{key:"Enter",action:["submit"],cls:"key3x"}],[{key:"Shift",action:["change_keyset","default"],cls:"key2x active"},"Z","X","C","V","B","N","M","<",">","?"],[{key:" ",cls:"key_spacebar"}]]}};}}i.d(e,"OSK",function(){return n}),i.d(e,"OSKActions",function(){return s});}]).OSK;
});
//
var script$k = {
name: 'Search',
components: {
OSK: osk_common,
POI
},
computed: {
...mapState('wf', ['language', 'reset'])
},
props: {
limit: {
type: Number,
default: -1
},
showCloseButton: {
type: Boolean,
default: false
},
showOutputField: {
type: Boolean,
default: true
},
showKeyboard: {
type: Boolean,
default: true
},
showNoResultsText: {
type: Boolean,
default: true
},
noResultsText: {
type: String,
default: "No results"
},
showLogo: {
type: Boolean,
default: false
},
showName: {
type: Boolean,
default: true
},
showPathButton: {
type: Boolean,
default: false
},
showDescription: {
type: Boolean,
default: false
},
showRoomID: {
type: Boolean,
default: false
},
showFloor: {
type: Boolean,
default: false
},
currentPOI: {
type: Object,
default: null
}
},
data() {
return {
results: [],
poi: {},
keyboard: false,
inputId: "",
keyboardContainerId: ""
};
},
mounted() {
let now = Date.now();
this.inputId = 'wf-search-input-' + now;
this.keyboardContainerId = 'wf-keyboard-container-' + now;
// Lets wait when the ID's are mapped
this.$nextTick(() => {
this.keyboard = new osk_common(this.inputId, this.keyboardContainerId);
this.keyboard.on('change', keyword => {
let results = this.$wayfinder.search.search(keyword);
results = results.filter(poi => {
return poi.getShowInMenu();
});
if (this.limit > 0) {
results = results.slice(0, this.limit);
} else {
results = results.slice();
}
let resultArr = Object.values(results).map(poi => {
return this.$store.getters["wf/freezePOI"](poi);
});
this.results = resultArr;
if (keyword.length > 1) {
if (Object.values(this.results).length > 0) {
this.$wayfinder.statistics.onSearch(keyword, "successful");
} else {
this.$wayfinder.statistics.onSearch(keyword, "unsuccessful");
}
}
});
this.keyboard.addLayout('en', {
"name": "English",
"keyboard": "US International",
"local_name": "English",
"lang": "en",
"keys": {
"default": [["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", {
"key": "Delete",
"action": ["backspace"],
"cls": "key2x"
}], ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p"], ["a", "s", "d", "f", "g", "h", "j", "k", "l"], ["z", "x", "c", "v", "b", "n", "m"], [{
"key": " ",
"cls": "key_spacebar"
}]]
}
});
this.keyboard.changeLayout(this.language);
});
},
watch: {
searchVisible(current) {
if (current && this.$refs.searchInput) {
this.$refs.searchInput.focus();
}
},
reset() {
this.resetValues();
},
language(lang) {
if (this.keyboard) {
this.keyboard.changeLayout(lang);
}
}
},
methods: {
onClick(poi) {
this.$emit('clicked', poi);
this.$wayfinder.statistics.onClick(poi.id, "menu");
},
close() {
this.$emit('close');
this.resetValues();
},
resetValues() {
this.results = [];
if (this.keyboard) {
this.keyboard.changeLayout(this.language);
this.keyboard.clearValue();
}
},
setOutput(output) {
this.keyboard.setOutput(output);
},
addLayout(lang, layout) {
this.keyboard.addLayout(lang, layout);
},
changeLayout(lang) {
this.keyboard.changeLayout(lang);
}
}
};
/* script */
const __vue_script__$k = script$k;
/* template */
var __vue_render__$k = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-search"
}, [_vm.showCloseButton ? _c('div', {
staticClass: "wf-close",
on: {
"click": function ($event) {
return _vm.close($event);
}
}
}, [_c('WFTranslate', {
attrs: {
"k": "close"
}
}, [_vm._v("Close")])], 1) : _vm._e(), _vm._v(" "), _c('div', {
staticClass: "wf-search-container"
}, [_c('div', {
staticClass: "wf-search-results",
class: {
"wf-no-results": _vm.results.length == 0
}
}, [_c('transition-group', {
staticClass: "wf-list",
attrs: {
"name": "list",
"tag": "ul"
}
}, _vm._l(_vm.results, function (poiitem) {
return _c('li', {
key: poiitem.id,
staticClass: "wf-list-item",
class: {
"wf-active": _vm.currentPOI && poiitem.id == _vm.currentPOI.id
},
on: {
"click": function ($event) {
return _vm.onClick(poiitem);
}
}
}, [_vm._t("default", function () {
return [_c('POI', {
attrs: {
"poi": poiitem,
"showLogo": _vm.showLogo,
"showName": _vm.showName,
"showPathButton": _vm.showPathButton,
"showDescription": _vm.showDescription,
"showRoomID": _vm.showRoomID,
"showFloor": _vm.showFloor
}
})];
}, {
"poi": poiitem
})], 2);
}), 0), _vm._v(" "), _c('span', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.showNoResultsText && _vm.results.length == 0,
expression: "showNoResultsText && results.length == 0"
}],
staticClass: "wf-search-no-results-text"
}, [_c('WFTranslate', {
attrs: {
"k": "no-search-results"
}
}, [_vm._v("No results")])], 1)], 1), _vm._v(" "), _vm.showOutputField ? _c('div', {
staticClass: "wf-search-input-container"
}, [_c('input', {
ref: "searchInput",
attrs: {
"id": _vm.inputId
}
})]) : _vm._e(), _vm._v(" "), _c('div', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.showKeyboard,
expression: "showKeyboard"
}],
staticClass: "wf-keyboard",
attrs: {
"id": _vm.keyboardContainerId
}
})])]);
};
var __vue_staticRenderFns__$k = [];
/* style */
const __vue_inject_styles__$k = function (inject) {
if (!inject) return;
inject("data-v-59c47238_0", {
source: ".wf-search .wf-close{position:absolute;top:0;right:.5rem;width:10rem;background-color:rgba(255,255,255,.7);background-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8' standalone='no'%3F%3E%3Csvg xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23' xmlns:svg='http://www.w3.org/2000/svg' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' enable-background='new 0 0 20 20' viewBox='0 0 20 20' y='0px' x='0px' id='Cross' version='1.1'%3E%3Cmetadata id='metadata9'%3E%3Crdf:RDF%3E%3Ccc:Work rdf:about=''%3E%3Cdc:format%3Eimage/svg+xml%3C/dc:format%3E%3Cdc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage' /%3E%3Cdc:title%3E%3C/dc:title%3E%3C/cc:Work%3E%3C/rdf:RDF%3E%3C/metadata%3E%3Cdefs id='defs7'%3E%3ClinearGradient spreadMethod='pad' gradientUnits='userSpaceOnUse' y2='29.3118' x2='11.0536' y1='16.0077' x1='24.5509' id='paint1_linear' gradientTransform='translate(-6.9097825,12.894087)'%3E%3Cstop id='stop16' stop-color='%23FF4C54' /%3E%3Cstop id='stop18' stop-color='%23BE3F45' offset='1' /%3E%3C/linearGradient%3E%3ClinearGradient gradientUnits='userSpaceOnUse' y2='34.9828' x2='34.294201' y1='14.605' x1='13.6189' id='paint0_linear'%3E%3Cstop id='stop11' stop-color='%23FF4C54' /%3E%3Cstop id='stop13' stop-color='%23BE3F45' offset='1' /%3E%3C/linearGradient%3E%3ClinearGradient gradientTransform='matrix(1.9229845,0,0,1.9229845,-9.2288833,-9.2308069)' gradientUnits='userSpaceOnUse' y2='14.322534' x2='6.3946652' y1='7.6276183' x1='12.290775' id='linearGradient4161' xlink:href='%23paint0_linear' /%3E%3C/defs%3E%3Cpath style='fill:url(%23linearGradient4161);fill-opacity:1' id='path3' d='m 18.362098,19.32359 c -0.90188,0.90188 -2.363348,0.90188 -3.263305,0 l -5.097832,-5.826643 -5.0978311,5.82472 c -0.9018797,0.90188 -2.3633479,0.90188 -3.2633047,0 -0.90187984,-0.90188 -0.90187984,-2.363347 0,-3.263304 L 6.9434164,10.000961 1.6379022,3.9397144 c -0.90187974,-0.9018798 -0.90187974,-2.361425 0,-3.26330476 0.9018798,-0.9018797 2.3614249,-0.9018797 3.2633048,0 l 5.099754,5.82856596 5.097832,-5.82856596 c 0.90188,-0.9018797 2.361425,-0.9018797 3.263305,0 0.901879,0.90187976 0.901879,2.36334796 0,3.26330476 l -5.30359,6.0612466 5.30359,6.057402 c 0.901879,0.90188 0.901879,2.363347 0,3.265227 z' /%3E%3C/svg%3E\")}.wf-search .results{overflow:hidden}.wf-search .wf-search-container{margin:auto;display:flex;flex-direction:column;justify-content:flex-end;height:100%}.wf-search .wf-search-input-container input{margin:auto;display:block;padding:1rem;font-size:2rem;font-weight:600;width:100%;border:1px solid #000;outline:0;background-repeat:no-repeat;user-select:none}.wf-search .wf-keyboard{user-select:none;display:flex;flex-direction:column;flex-shrink:0}.wf-search .wf-keyboard .keyboard-row{margin:auto;display:flex}.wf-search .wf-keyboard .keyboard-key{text-align:center;width:4ch;height:4ch;line-height:1.5;overflow:hidden;user-select:none}.wf-search .wf-keyboard .keyboard-key:last-child{margin-right:0}.wf-search .wf-keyboard .keyboard-key:active{background-color:#00f}.wf-search .wf-keyboard .keyboard-key2x{width:8ch}.wf-search .wf-keyboard .keyboard-key3x{width:12ch}.wf-search .wf-keyboard .keyboard-key_spacebar{width:24ch}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$k = undefined;
/* module identifier */
const __vue_module_identifier__$k = undefined;
/* functional template */
const __vue_is_functional_template__$k = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$B = /*#__PURE__*/normalizeComponent({
render: __vue_render__$k,
staticRenderFns: __vue_staticRenderFns__$k
}, __vue_inject_styles__$k, __vue_script__$k, __vue_scope_id__$k, __vue_is_functional_template__$k, __vue_module_identifier__$k, false, createInjector, undefined, undefined);
var __vue_component__$C = __vue_component__$B;
//
//
//
//
//
//
//
//
//
//
//
var script$j = {
name: 'Loading'
};
/* script */
const __vue_script__$j = script$j;
/* template */
var __vue_render__$j = function () {
var _vm = this;
var _h = _vm.$createElement;
_vm._self._c || _h;
return _vm._m(0);
};
var __vue_staticRenderFns__$j = [function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "loading"
}, [_c('div', {
staticClass: "lds-ellipsis"
}, [_c('div'), _vm._v(" "), _c('div'), _vm._v(" "), _c('div'), _vm._v(" "), _c('div')])]);
}];
/* style */
const __vue_inject_styles__$j = function (inject) {
if (!inject) return;
inject("data-v-7e3728f4_0", {
source: ".loading[data-v-7e3728f4]{width:100%;height:100vh;position:absolute;top:0;bottom:0;display:flex;z-index:100;justify-content:center;align-items:center;background-color:#fff}.lds-ellipsis[data-v-7e3728f4]{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div[data-v-7e3728f4]{position:absolute;display:inline-block;top:33px;width:13px;height:13px;border-radius:50%;background:#333;animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis div[data-v-7e3728f4]:nth-child(1){left:8px;animation:lds-ellipsis1-data-v-7e3728f4 .6s infinite}.lds-ellipsis div[data-v-7e3728f4]:nth-child(2){left:8px;animation:lds-ellipsis2-data-v-7e3728f4 .6s infinite}.lds-ellipsis div[data-v-7e3728f4]:nth-child(3){left:32px;animation:lds-ellipsis2-data-v-7e3728f4 .6s infinite}.lds-ellipsis div[data-v-7e3728f4]:nth-child(4){left:56px;animation:lds-ellipsis3-data-v-7e3728f4 .6s infinite}@keyframes lds-ellipsis1-data-v-7e3728f4{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3-data-v-7e3728f4{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2-data-v-7e3728f4{0%{transform:translate(0,0)}100%{transform:translate(24px,0)}}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$j = "data-v-7e3728f4";
/* module identifier */
const __vue_module_identifier__$j = undefined;
/* functional template */
const __vue_is_functional_template__$j = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$z = /*#__PURE__*/normalizeComponent({
render: __vue_render__$j,
staticRenderFns: __vue_staticRenderFns__$j
}, __vue_inject_styles__$j, __vue_script__$j, __vue_scope_id__$j, __vue_is_functional_template__$j, __vue_module_identifier__$j, false, createInjector, undefined, undefined);
var __vue_component__$A = __vue_component__$z;
//
//
//
//
//
//
var script$i = {
name: "Clock",
data() {
return {
time: new Date()
};
},
mounted() {
setTimeout(this.addTime, 500);
},
computed: {
hours() {
return (this.time.getHours() < 10 ? "0" : "") + this.time.getHours();
},
minutes() {
return (this.time.getMinutes() < 10 ? "0" : "") + this.time.getMinutes();
},
seconds() {
return (this.time.getSeconds() < 10 ? "0" : "") + this.time.getSeconds();
}
},
methods: {
addTime() {
this.time = new Date();
setTimeout(this.addTime, 500);
}
}
};
/* script */
const __vue_script__$i = script$i;
/* template */
var __vue_render__$i = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-clock"
}, [_c('div', [_c('span', {
staticClass: "wf-clock-hours"
}, [_vm._v(_vm._s(_vm.hours))]), _c('span', {
staticClass: "wf-clock-sp"
}, [_vm._v(":")]), _c('span', {
staticClass: "wf-clock-minutes"
}, [_vm._v(_vm._s(_vm.minutes))])])]);
};
var __vue_staticRenderFns__$i = [];
/* style */
const __vue_inject_styles__$i = undefined;
/* scoped */
const __vue_scope_id__$i = undefined;
/* module identifier */
const __vue_module_identifier__$i = undefined;
/* functional template */
const __vue_is_functional_template__$i = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$x = /*#__PURE__*/normalizeComponent({
render: __vue_render__$i,
staticRenderFns: __vue_staticRenderFns__$i
}, __vue_inject_styles__$i, __vue_script__$i, __vue_scope_id__$i, __vue_is_functional_template__$i, __vue_module_identifier__$i, false, undefined, undefined, undefined);
var __vue_component__$y = __vue_component__$x;
//
function loadScript$1(url, callback) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
var x = document.getElementsByTagName('head')[0];
x.appendChild(s);
if (typeof callback == "function") {
s.onload = callback;
s.src = url;
}
}
var script$h = {
name: "Date",
props: {
format: {
type: String,
default: "DD.MM"
}
},
data() {
return {
time: new Date(),
locales: {}
};
},
mounted() {
setTimeout(this.addDate, 1000);
if (typeof dayjs === "undefined") {
console.warn("WFDate dayjs is not loaded");
}
this.loadLocale(this.language);
},
computed: {
...mapState('wf', ['language']),
datestr() {
//console.log('datestr', this.time, typeof dayjs, this.language !== '' ? this.language : 'en')
if (typeof dayjs === "object") {
return dayjs(this.time).format(this.format);
} else {
return this.time.toLocaleString(this.language !== '' ? this.language : 'en', {
"dateStyle": "long"
});
}
}
},
watch: {
language() {
this.time = new Date();
if (typeof dayjs === "object") {
if (!this.locales[this.language]) {
this.loadLocale(this.language);
}
dayjs.locale(this.language);
}
}
},
methods: {
addDate() {
this.time = new Date();
setTimeout(this.addDate, 60 * 1000);
},
loadLocale(locale) {
if (this.$wayfinder) {
loadScript$1(this.$wayfinder.options.assetsLocation + "/dayjs/locale/" + locale + ".js", a => {
this.locales[locale] = true;
if (this.language == locale && typeof dayjs !== "undefined") {
//console.log('locale.set', locale, this.language, "dayjs", typeof dayjs)
dayjs.locale(this.language !== '' ? this.language : 'en');
}
});
} else {
console.warn('wayfinder not present');
}
}
}
};
/* script */
const __vue_script__$h = script$h;
/* template */
var __vue_render__$h = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-date"
}, [_vm._v("\n " + _vm._s(_vm.datestr) + "\n")]);
};
var __vue_staticRenderFns__$h = [];
/* style */
const __vue_inject_styles__$h = undefined;
/* scoped */
const __vue_scope_id__$h = undefined;
/* module identifier */
const __vue_module_identifier__$h = undefined;
/* functional template */
const __vue_is_functional_template__$h = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$v = /*#__PURE__*/normalizeComponent({
render: __vue_render__$h,
staticRenderFns: __vue_staticRenderFns__$h
}, __vue_inject_styles__$h, __vue_script__$h, __vue_scope_id__$h, __vue_is_functional_template__$h, __vue_module_identifier__$h, false, undefined, undefined, undefined);
var __vue_component__$w = __vue_component__$v;
//
//
//
//
//
//
//
//
var script$g = {
name: 'Tabs',
props: {
activeTab: '',
animate: {
type: String,
default: "none"
}
},
data: () => ({
tabs: [],
activeTabIndex: 0,
currentTab: null
}),
created() {
this.tabs = this.$children;
},
mounted() {
if (this.$props.activeTab) {
this.activate(this.$props.activeTab);
} else {
console.log('no active tab');
}
},
watch: {
activeTab: function () {
// watch it
this.activate();
}
},
methods: {
activate() {
//console.log('tabs.activate', this.activeTab, this.$props.activeTab)
this.currentTab = null;
let activeTab = 0;
for (var tab in this.tabs) {
if (this.tabs[tab].name == this.$props.activeTab) {
this.tabs[tab].isActive = true;
this.tabs[tab].isVisible = true;
this.$emit('tabChanged', this.tabs[tab]);
this.currentTab = this.tabs[tab];
this.activeTabIndex = tab;
activeTab = tab;
//this.tabs[tab].style.display = "block";
this.$nextTick(() => {
this.slide(activeTab);
});
} else {
this.tabs[tab].isActive = false;
this.tabs[tab].isVisible = false;
}
}
},
slide(tab) {
if (this.animate === "vertical") {
this.$refs.slide.style.transform = "translateX(0) translateY(-" + tab * 100 + "%)";
} else {
this.$refs.slide.style.transform = "translateY(0) translateX(-" + tab * 100 + "%)";
}
}
}
};
/* script */
const __vue_script__$g = script$g;
/* template */
var __vue_render__$g = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
ref: "tabs",
staticClass: "wf-component wf-tabs",
class: ['wf-tabs-' + _vm.activeTab, 'wf-tabs-index-' + _vm.activeTabIndex, 'wf-tabs-animate-' + _vm.animate]
}, [_c('div', {
ref: "slide",
staticClass: "wf-tabs-content"
}, [_vm._t("default")], 2)]);
};
var __vue_staticRenderFns__$g = [];
/* style */
const __vue_inject_styles__$g = function (inject) {
if (!inject) return;
inject("data-v-fc7bd0f2_0", {
source: ".wf-tabs[data-v-fc7bd0f2]{overflow:hidden;position:relative;width:100%;height:100%}.wf-tabs-content[data-v-fc7bd0f2]{height:100%;width:auto;display:flex;flex-direction:row;margin-left:0;transform:translateX(0) translateY(0)}.wf-tabs.wf-tabs-animate-vertical .wf-tabs-content[data-v-fc7bd0f2]{flex-direction:column}.wf-tab[data-v-fc7bd0f2]{opacity:0;transition:opacity .3s ease-out .5s}.wf-tabs-animate-none .wf-tab[data-v-fc7bd0f2]{transition:none!important}.wf-tab.wf-active[data-v-fc7bd0f2]{opacity:1;transition:opacity .3s ease-in}.wf-tabs.wf-tabs-animate-horizontal .wf-tabs-content[data-v-fc7bd0f2],.wf-tabs.wf-tabs-animate-vertical .wf-tabs-content[data-v-fc7bd0f2]{transition:transform .5s ease-in-out .2s}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$g = "data-v-fc7bd0f2";
/* module identifier */
const __vue_module_identifier__$g = undefined;
/* functional template */
const __vue_is_functional_template__$g = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$t = /*#__PURE__*/normalizeComponent({
render: __vue_render__$g,
staticRenderFns: __vue_staticRenderFns__$g
}, __vue_inject_styles__$g, __vue_script__$g, __vue_scope_id__$g, __vue_is_functional_template__$g, __vue_module_identifier__$g, false, createInjector, undefined, undefined);
var __vue_component__$u = __vue_component__$t;
//
//
//
//
//
//
var script$f = {
name: 'Tab',
props: {
name: ''
},
data: () => ({
isActive: false,
isVisible: true
}),
created() {},
methods: {}
};
/* script */
const __vue_script__$f = script$f;
/* template */
var __vue_render__$f = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('section', {
staticClass: "wf-component wf-tab",
class: {
'wf-active': _vm.isActive
}
}, [_vm._t("default")], 2);
};
var __vue_staticRenderFns__$f = [];
/* style */
const __vue_inject_styles__$f = function (inject) {
if (!inject) return;
inject("data-v-b8114d98_0", {
source: ".wf-tab[data-v-b8114d98]{overflow:hidden;flex-grow:1;flex-shrink:0;width:100%}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$f = "data-v-b8114d98";
/* module identifier */
const __vue_module_identifier__$f = undefined;
/* functional template */
const __vue_is_functional_template__$f = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$r = /*#__PURE__*/normalizeComponent({
render: __vue_render__$f,
staticRenderFns: __vue_staticRenderFns__$f
}, __vue_inject_styles__$f, __vue_script__$f, __vue_scope_id__$f, __vue_is_functional_template__$f, __vue_module_identifier__$f, false, createInjector, undefined, undefined);
var __vue_component__$s = __vue_component__$r;
//
var script$e = {
name: 'Tabs',
computed: {
...mapState('wf', ['currentTab', 'searchVisible', 'mobile', 'landscape', 'shortcuts', 'language'])
},
data() {
return {
toilet: false,
toiletsIcon: false
};
},
methods: {
switchTab(tab) {
this.$emit('switchTab', tab);
}
}
};
/* script */
const __vue_script__$e = script$e;
/* template */
var __vue_render__$e = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-tab-buttons"
}, [_c('div', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.mobile && !_vm.landscape,
expression: "mobile && !landscape"
}],
staticClass: "wf-item tab-map",
class: {
active: _vm.currentTab == 'map'
},
attrs: {
"data-translation-element": "map"
},
on: {
"click": function ($event) {
return _vm.switchTab('map');
}
}
}), _vm._v(" "), _c('div', {
staticClass: "wf-item tab-topics",
class: {
active: _vm.currentTab == 'groups' || _vm.currentTab == 'group-pois'
},
attrs: {
"data-translation-element": "topics"
},
on: {
"click": function ($event) {
return _vm.switchTab('groups');
}
}
}), _vm._v(" "), _c('div', {
staticClass: "wf-item tab-az",
class: {
active: _vm.currentTab == 'az'
},
attrs: {
"data-translation-element": "az"
},
on: {
"click": function ($event) {
return _vm.switchTab('az');
}
}
}), _vm._v(" "), _c('div', {
staticClass: "wf-item tab-search",
class: {
active: _vm.currentTab == 'search'
},
attrs: {
"data-translation-element": "search"
},
on: {
"click": function ($event) {
return _vm.switchTab('search');
}
}
})]);
};
var __vue_staticRenderFns__$e = [];
/* style */
const __vue_inject_styles__$e = function (inject) {
if (!inject) return;
inject("data-v-5229b2f8_0", {
source: ".wf-tab-buttons[data-v-5229b2f8]{display:flex;align-content:stretch;justify-content:space-between}.wf-tab-buttons .wf-item[data-v-5229b2f8]{background-size:auto 30%;background-repeat:no-repeat}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$e = "data-v-5229b2f8";
/* module identifier */
const __vue_module_identifier__$e = undefined;
/* functional template */
const __vue_is_functional_template__$e = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$p = /*#__PURE__*/normalizeComponent({
render: __vue_render__$e,
staticRenderFns: __vue_staticRenderFns__$e
}, __vue_inject_styles__$e, __vue_script__$e, __vue_scope_id__$e, __vue_is_functional_template__$e, __vue_module_identifier__$e, false, createInjector, undefined, undefined);
var __vue_component__$q = __vue_component__$p;
var scrollarea_common = createCommonjsModule(function (module) {
module.exports=function(t){var e={};function i(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s});},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0});},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(s,n,function(e){return t[e]}.bind(null,n));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e){t.exports={create:function(){return [0,0]},clone:function(t){var e=new Array(2);return e[0]=t[0],e[1]=t[1],e},fromValues:function(t,e){var i=new Array(2);return i[0]=t,i[1]=e,i},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},set:function(t,e,i){return t[0]=e,t[1]=i,t},add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},sub:function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},min:function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},max:function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},scale:function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},dist:function(t,e){var i=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(i*i+s*s)},sqrDist:function(t,e){var i=e[0]-t[0],s=e[1]-t[1];return i*i+s*s},len:function(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)},length:function(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)},sqrLen:function(t){var e=t[0],i=t[1];return e*e+i*i},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:function(t,e){var i=e[0],s=e[1],n=i*i+s*s;return n>0&&(n=1/Math.sqrt(n),t[0]=e[0]*n,t[1]=e[1]*n),t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},cross:function(t,e,i){var s=e[0]*i[1]-e[1]*i[0];return t[0]=t[1]=0,t[2]=s,t},lerp:function(t,e,i,s){var n=e[0],o=e[1];return t[0]=n+s*(i[0]-n),t[1]=o+s*(i[1]-o),t},transformMat2:function(t,e,i){var s=e[0],n=e[1];return t[0]=s*i[0]+n*i[1],t[1]=s*i[2]+n*i[3],t},str:function(t){return "this("+t[0]+", "+t[1]+")"}};},function(t,e,i){i.r(e),i.d(e,"ScrollArea",(function(){return r}));var s=i(0),n=i.n(s);class o{constructor(t,e){this.position=n.a.create(),this.contentSize=t,this.viewSize=e,this.contentViewRatio=n.a.div(n.a.create(),this.getViewSize(),this.getContentSize()),this._maxPosition=n.a.create(),this._minPosition=n.a.create(),this._vec2cache=n.a.create();}getViewPosition(){return this.position}getContentPosition(){return this.position}clampPosition(){n.a.max(this._maxPosition,this.getViewSize(),this.getContentSize()),n.a.min(this._minPosition,this.getViewSize(),this.getContentSize()),n.a.sub(this._maxPosition,this._maxPosition,this._minPosition),this.getContentSize()[0]<=this.getViewSize()[0]&&(this._maxPosition[0]=0),this.getContentSize()[1]<=this.getViewSize()[1]&&(this._maxPosition[1]=0),this.position=this.clamp(this.position,n.a.create(),this._maxPosition);}setViewPosition(t){!isNaN(parseFloat(t[0]))&&isFinite(t[0])&&!isNaN(parseFloat(t[1]))&&isFinite(t[1])&&(this.position=t,this.clampPosition());}move(t){t&&this.setViewPosition(n.a.sub(t,this.getViewPosition(),t));}setViewSize(t,e){n.a.set(this.viewSize,t,e),n.a.div(this.contentViewRatio,this.getViewSize(),this.getContentSize()),this.clampPosition();}setContentSize(t,e){n.a.set(this.contentSize,t,e),n.a.div(this.contentViewRatio,this.getViewSize(),this.getContentSize()),this.clampPosition();}isContentLonger(){return this.viewSize[1]<this.contentSize[1]}isContentWider(){return this.viewSize[0]<this.contentSize[0]}getContentSize(){return this.contentSize}getViewSize(){return this.viewSize}clamp(t,e,i){var s=n.a.clone(t);return n.a.max(s,s,e),n.a.min(s,s,i),s}getPercentagePosition(){return n.a.div(n.a.create(),this.position,this.viewSize)}getRelativePosition(){return n.a.sub(this._vec2cache,this.getViewSize(),this.getContentSize()),0!==n.a.len(this._vec2cache)&&n.a.div(this._vec2cache,this.getViewPosition(),n.a.sub(this._vec2cache,this.getViewSize(),this.getContentSize())),this._vec2cache}getContentViewRatio(){return this.contentViewRatio}}class a{constructor(t,e){this.options=e||{},this.vertical="vertical"==this.getOption("direction"),this.position=0,this.mouseDelta=n.a.create(),this.onScroll=!1,this.parentElement=t,this.element=document.createElement("div"),this.element.classList.add("sa-scrollbar"),this.element.classList.add("sa-scrollbar-position-"+this.getOption("scollbarPosition")),this.element.style.position="absolute",this.element.style.right="0",this.element.style.bottom="0",this.vertical?this.element.style.top="0":this.element.style.left="0",this.bar=document.createElement("div"),this.bar.style.minWidth="1px",this.bar.classList.add("sa-bar"),this.element.appendChild(this.bar),t.appendChild(this.element),this.element.addEventListener("click",t=>{var e=this.element.getBoundingClientRect();this.clickToPosition(t.clientX-e.left,t.clientY-e.top),t.stopPropagation(),t.preventDefault();}),this.view=new o(n.a.fromValues(this.element.clientWidth,this.element.clientHeight),n.a.fromValues(this.bar.clientWidth,this.bar.clientHeight));}getOption(t){return this.options[t]}attachEvents(t){t.addEventListener("mousedown",t=>{this.mousedown=!0,t.stopPropagation(),t.preventDefault();}),window.addEventListener("mousemove",t=>{if(this.mousedown){var e=n.a.fromValues(t.movementX,t.movementY);this.deltaMove=e,this.lastTime=Date.now(),this.getOption("reverse"),this.scroll(e);}}),window.addEventListener("mouseup",t=>{this.mousedown=!1;}),t.addEventListener("touchstart",t=>{t.touches&&t.touches.length>0&&(this.lastTouch=n.a.fromValues(t.touches[0].screenX,t.touches[0].screenY));},!1),window.addEventListener("touchend",t=>{this.lastTouch=null;},!1),window.addEventListener("touchcancel",t=>{this.lastTouch=null;},!1),window.addEventListener("touchmove",t=>{if(t.touches&&t.touches.length>0){if(this.lastTouch){var e=n.a.fromValues(t.touches[0].screenX,t.touches[0].screenY);this.getOption("reverse")?this.scroll(n.a.sub(e,this.lastTouch,e)):this.scroll(n.a.sub(e,e,this.lastTouch));}this.lastTouch=n.a.fromValues(t.touches[0].screenX,t.touches[0].screenY);}},!1);}scroll(t){var e=this;window.requestAnimationFrame((function(){e.view.move(t),t=n.a.clone(e.view.getContentPosition()),e.setPosition(t),e.updateCallback&&"function"==typeof e.updateCallback&&e.updateCallback(me);}));}clickToPosition(t,e){this.view.getViewSize()[0],this.element.clientWidth,this.view.getViewSize()[1],this.element.clientHeight;}setPosition(t){var e=1;this.getOption("swapContainers")&&(e=-1),this.bar.style.transform="translate("+t[0]*e+"px,"+t[1]*e+"px)",this.scrolling=!1;}clear(){this.position=0,this.setPosition(0);}getBarLength(){return this.vertical?parseInt(Math.ceil(this.bar.clientHeight)):parseInt(Math.ceil(this.bar.clientWidth))}getViewLength(){return this.vertical?this.view.getViewSize()[1]:this.view.getViewSize()[0]}getContentLength(){return this.vertical?this.view.getContentSize()[1]:this.view.getContentSize()[0]}setContentPosition(t){var e=n.a.create(),i=t.getContentViewRatio()[this.vertical?1:0];n.a.scale(e,t.getContentPosition(),i),this.view.setViewPosition(e),this.setPosition(this.view.getContentPosition());}getPercentage(){return n.a.len(this.view.getViewPosition())/this.getViewLength()}resizeContent(t){t?(this.vertical?(this.bar.style.height=Math.floor(t.getViewSize()[1]*t.getContentViewRatio()[1])+"px",this.element.style.height=t.getViewSize()[1]+"px",this.element.style.visibility=t.isContentLonger()?"visible":"hidden"):(this.bar.style.width=Math.floor(t.getViewSize()[0]*t.getContentViewRatio()[0])+"px",this.element.style.width=t.getViewSize()[0]+"px",this.element.style.visibility=t.isContentWider()?"visible":"hidden"),this.resize()):console.warn("View undefined");}resize(){this.getOption("swapContainers")?(this.view.setViewSize(parseInt(this.element.clientWidth),parseInt(this.element.clientHeight)),this.view.setContentSize(parseInt(this.bar.clientWidth),parseInt(this.bar.clientHeight))):(this.view.setViewSize(parseInt(this.bar.clientWidth),parseInt(this.bar.clientHeight)),this.view.setContentSize(parseInt(this.element.clientWidth),parseInt(this.element.clientHeight)));}}class r{constructor(t,e,i){this.container=null,this.content=null,this.logContainer=null,this.options={smooth:!0,reverse:!1,swapContainers:!1,updateInterval:10,wheelSpeed:50,scollbarPosition:"right",direction:"vertical"},void 0!==i&&i&&(this.options=this.chooseOptions(this.options,i)),this.setContainer(t),this.events={change:[],layout:[],ready:[]},this.lastTouch=null,this.deltaMove=n.a.create(),this.lastMouse=n.a.create(),this.mouseCache=n.a.create(),this.lastTime=0,this.deltaTime=0,this.smoothDistance=null,this.timeout=null,this.smoothCoeficent=n.a.fromValues(11,11),this.positionClassNames=["sa-on-left","sa-on-right","sa-on-top","sa-on-bottom"],this.mousedown=!1,this.touchstart=!1,this.mousestart=!1,this._vec2cache=n.a.create();this.container;if(this.getOption("swapContainers")?this.view=new o(n.a.fromValues(this.container.clientWidth,this.container.clientHeight),n.a.fromValues(this.content.clientWidth,this.content.clientHeight)):(this.content,this.view=new o(n.a.fromValues(this.content.clientWidth,this.content.clientHeight),n.a.fromValues(this.container.clientWidth,this.container.clientHeight))),this.container.style.position="relative",this.container.style.overflow="hidden",this.container.style.userSelect="none",this.container.style.webkitUserSelect="none",this.attachEvents(this.container),this.scrollbarV=new a(this.container,{direction:"vertical",scollbarPosition:"right",reverse:this.options.reverse,swapContainers:this.options.swapContainers}),this.scrollbarH=new a(this.container,{direction:"horizontal",scollbarPosition:"bottom",reverse:this.options.reverse}),"undefined"!=typeof ResizeObserver&&this.container){var s=this,r=0;this.resizeObserver=new ResizeObserver((function(){r&&clearTimeout(r),r=setTimeout((function(){s.resize();}),300);})),this.resizeObserver.observe(this.container),this.resizeObserver.observe(this.content);}this.checkContentPosition();}calcVelocity(t){this.lastTime&&(this.deltaTime=(this.deltaTime+(Date.now()-this.lastTime))/2),n.a.scale(this.deltaMove,n.a.add(this.deltaMove,this.deltaMove,t),.5),this.lastTime=Date.now();}attachEvents(t){t.addEventListener("mousewheel",t=>{var e=0;t.originalEvent&&(t=t.originalEvent),e="wheelDelta"in t?t.wheelDelta<0?-1:1:t.deltaY>0||t.deltaY<0?1:-1,this.scroll(n.a.fromValues(0,this.getOption("wheelSpeed")*e));}),t.addEventListener("mousedown",t=>{n.a.set(this.lastMouse,t.screenX,t.screenY),n.a.set(this.deltaMove,0,0),this.lastTime=Date.now(),this.mousestart=setTimeout(()=>{this.mousedown=!0;},120);}),window.addEventListener("mousemove",t=>{this.mousedown&&(n.a.sub(this.mouseCache,n.a.fromValues(t.screenX,t.screenY),this.lastMouse),n.a.set(this.lastMouse,t.screenX,t.screenY),this.calcVelocity(this.mouseCache),this.getOption("reverse"),this.scroll(this.mouseCache.slice()));}),window.addEventListener("mouseup",t=>{this.onEndDrag(this.deltaMove,this.deltaTime),this.mousedown=!1,clearTimeout(this.mousestart);}),t.addEventListener("touchstart",t=>{t.touches&&t.touches.length>0&&(this.mousedown=!0,this.lastTouch=n.a.fromValues(t.touches[0].screenX,t.touches[0].screenY),this.lastTime=Date.now());},!1),window.addEventListener("touchend",t=>{this.onEndDrag(n.a.negate(this.deltaMove,this.deltaMove),Date.now()-this.lastTime),this.lastTouch=null,this.mousedown=!1;},!1),window.addEventListener("touchcancel",t=>{this.onEndDrag(n.a.negate(this.deltaMove,this.deltaMove),Date.now()-this.lastTime),this.lastTouch=null,this.mousedown=!1;},!1),window.addEventListener("touchmove",t=>{if(t.touches&&t.touches.length>0&&this.mousedown){if(this.lastTouch){var e=n.a.fromValues(t.touches[0].screenX,t.touches[0].screenY);this.getOption("reverse")?this.scroll(n.a.sub(e,this.lastTouch,e)):this.scroll(n.a.sub(e,e,this.lastTouch));}this.lastTouch=n.a.fromValues(t.touches[0].screenX,t.touches[0].screenY),this.lastTime=Date.now();}},!1);}onEndDrag(t,e){if(!(e<=0)){var i=n.a.len(t)/e;if(this.getOption("smooth")&&i>.3){var s=n.a.create();n.a.scale(s,t,i),this.getOption("reverse");var o=this;this.stop();var a=n.a.create(),r=function(){n.a.div(a,s,o.smoothCoeficent),n.a.sqrLen(a)>3?(n.a.sub(s,s,a),window.requestAnimationFrame(r),o.scroll(a)):o.scrolling=!1;};this.timeout=window.requestAnimationFrame(r);}else this.scrolling=!1;}}stop(){this.scrolling=!1;}resize(){this.getOption("swapContainers")?(this.view.setViewSize(parseInt(Math.ceil(this.content.clientWidth)),parseInt(Math.ceil(this.content.clientHeight))),this.view.setContentSize(parseInt(this.container.clientWidth),parseInt(Math.ceilthis.container.clientHeight))):(this.view.setViewSize(parseInt(this.container.clientWidth),parseInt(this.container.clientHeight)),this.view.setContentSize(parseInt(Math.ceil(this.content.clientWidth)),parseInt(Math.ceil(this.content.clientHeight)))),this.checkIfScrollIsNeeded(),this.scrollbarV&&this.scrollbarV.resizeContent(this.view),this.scrollbarH&&this.scrollbarH.resizeContent(this.view);}reset(){this.scrollToSection(0,0,!1),this.scrollToSection(0,1,!1);}checkIfScrollIsNeeded(){this.view.isContentLonger()?this.container.classList.add("sa-content-longer"):this.container.classList.remove("sa-content-longer"),this.view.isContentWider()?this.container.classList.add("sa-content-wider"):this.container.classList.remove("sa-content-wider");}chooseOptions(t,e){for(var i in e)t[i]&&(t[i]=e[i]);return t}setContainer(t){switch(typeof t){case"undefined":this.container=document.createElement("div"),document.body.appendChild(this.container);break;case"string":this.container=document.getElementById(t);break;default:this.container=t;}this.container&&(this.content=this.container.firstElementChild);}getOption(t){return this.options[t]}on(t,e){"object"!=typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e);}trigger(){let t=Array.prototype.slice.call(arguments);if(t.length>0){let e=t[0];if(t.shift(),this.events[e]){let i;for(let s=0,n=this.events[e].length;s<n;s++)i=this.events[e][s],"function"==typeof i&&i.apply(this,t);}}}scroll(t){var e=this;Math.abs(n.a.len(t))>=0&&window.requestAnimationFrame((function(){e.view.move(t);var i=n.a.clone(e.view.getContentPosition());e.setContentOffset(i),e.scrollbarV.setContentPosition(e.view),e.scrollbarH.setContentPosition(e.view),e.updateCallback&&"function"==typeof e.updateCallback&&e.updateCallback(me);}));}smoothScroll(t,e){if(!(e<=0)){var i=n.a.create(),s=n.a.clone(t),o=e,a=Date.now(),r=0,h=this,l=function(){o=Date.now()-a,r=1-Math.pow(1-Math.min(1,o/e),3),n.a.scale(i,s,r),n.a.sub(s,s,i),o<e?(window.requestAnimationFrame(l),n.a.len(s)>0?h.scroll(i):h.scroll(n.a.sub(i,i,s))):(n.a.len(s)>0&&h.scroll(s),h.scrolling=!1);};this.timeout=window.requestAnimationFrame(l);}}setContentOffset(t){var e=-1;this.getOption("swapContainers")&&(e=1),this.content.style.transform="translate("+t[0]*e+"px,"+t[1]*e+"px)",this.scrolling=!1,this.checkContentPosition();}checkContentPosition(){var t=this.view.getRelativePosition(),e=[];0===t[0]&&e.push("sa-on-left"),0===t[1]&&e.push("sa-on-top"),1===Math.abs(t[0])&&e.push("sa-on-right"),1===Math.abs(t[1])&&e.push("sa-on-bottom"),e!==this.positionClassNames&&(this.container.classList.remove(...this.positionClassNames),e&&e.length>0&&this.container.classList.add(...e),this.positionClassNames=e);}scrollToSection(t,e,i,s){let o=n.a.mul(n.a.create(),this.view.getContentSize(),this.view.getContentViewRatio()),a=n.a.scale(n.a.create(),o,t);const r=s||1;0==e?a[1]=0:a[0]=0;let h=n.a.sub(n.a.create(),this.view.getContentPosition(),a);if(i){let t=n.a.len(h)*r;this.smoothScroll(h,t);}else this.scroll(h,h);}log(t){if(this.logContainer){let e=document.createElement("p"),i=document.createTextNode(t);e.appendChild(i),this.logContainer.appendChild(e),this.logContainer.children.length>10&&this.logContainer.removeChild(this.logContainer.getElementsByTagName("p")[0]);}}setLogContainer(t){this.logContainer=t;}}}]).ScrollArea;
});
//
var script$d = {
name: 'ScrollableArea',
props: {
enable: {
type: Boolean,
default: true
}
},
data: () => ({
scroll: null
}),
updated() {
this.$nextTick(() => {
if (this.scroll) {
this.scroll.resize();
}
});
},
mounted() {
this.$nextTick(() => {
if (!this.scroll && this.$refs.area) {
this.scroll = new scrollarea_common(this.$refs.area);
}
});
},
methods: {
activate() {
if (this.enable) {
this.makeScroll();
}
},
reset() {
this.$nextTick(() => {
if (this.enable && this.scroll) {
this.scroll.reset();
}
});
},
resize() {
this.$nextTick(() => {
if (this.enable && this.scroll) {
this.scroll.resize();
}
});
},
scrollToSection(index, direction, animate, animSpeed) {
if (this.scroll) {
this.scroll.scrollToSection(index, direction, animate, animSpeed);
}
}
}
};
/* script */
const __vue_script__$d = script$d;
/* template */
var __vue_render__$d = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
ref: "area",
staticClass: "wf-component wf-scrollable"
}, [_vm._t("default")], 2);
};
var __vue_staticRenderFns__$d = [];
/* style */
const __vue_inject_styles__$d = undefined;
/* scoped */
const __vue_scope_id__$d = "data-v-ba7fc91c";
/* module identifier */
const __vue_module_identifier__$d = undefined;
/* functional template */
const __vue_is_functional_template__$d = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$n = /*#__PURE__*/normalizeComponent({
render: __vue_render__$d,
staticRenderFns: __vue_staticRenderFns__$d
}, __vue_inject_styles__$d, __vue_script__$d, __vue_scope_id__$d, __vue_is_functional_template__$d, __vue_module_identifier__$d, false, undefined, undefined, undefined);
var __vue_component__$o = __vue_component__$n;
//
var script$c = {
name: 'Banner',
props: {
template: String,
container: String,
playOnBoot: {
type: Boolean,
default: false
},
qrURL: {
type: String,
default: "https://3dwayfinder.com"
}
},
computed: {
//yahLogo
...mapState('wf', ['banners']),
orderedFrames() {
return Object.values(this.loadedFrames).sort((a, b) => {
return a.index > b.index;
});
}
},
data() {
return {
frames: [],
loadedFrames: {},
displayedFrames: [],
current: -1,
timer: null,
fadeDuration: 500,
backgroundColor: "#fff",
visible: false,
qr: null,
qrPos: "",
displayQR: false,
frameKeywords: [],
last: 0
};
},
watch: {
banners() {
this.load();
},
qrURL(val) {
if (val && val !== "") {
this.renderQR();
}
}
},
mounted() {
this.renderQR();
if (this.playOnBoot) {
this.load();
}
},
methods: {
load() {
let now = Date.now();
let _template = 'template-' + this.template.toLowerCase();
if (this.banners && this.template && this.container && this.banners[_template] && this.banners[_template][this.container]) {
this.frames = this.banners[_template][this.container].filter(frame => {
let enabled = frame.enabled;
if (enabled && frame.from_date) {
enabled = enabled && new Date(frame.from_date).getTime() <= now;
}
if (enabled && frame.to_date) {
enabled = enabled && new Date(frame.to_date).getTime() >= now;
}
frame.loaded = false;
frame.loadCount = 0;
return enabled;
});
this.frames.forEach((f, i) => {
if (!this.loadedFrames[f.id]) {
this.preloadFrame(i, f);
} else {
console.log('frame allready loaded', f.id);
}
});
this.$emit('hasbanners', this.frames.length > 0, this.template, this.container);
}
},
preloadFrame(index, frame) {
frame.index = index;
for (let c in frame.containers) {
frame.containers[c].url = this.getUrl(frame.containers[c]);
frame.containers[c].loadFailed = 0;
this.fetchMedia(index, frame.containers[c]);
}
},
loadFailed(frameIndex, container) {
let scope = this;
console.log('loadFailed', container);
container.loadFailed++;
if (container.loadFailed <= 30) {
setTimeout(function () {
scope.fetchMedia(frameIndex, container);
}, Math.max(10000, container.loadFailed * 10000));
} else {
console.log('skipping container', frameIndex, container);
}
},
fetchMedia(frameIndex, container) {
if (container && container.advertisement_id > 0) {
let scope = this;
if (container.type.indexOf("image") == 0) {
let img = new Image();
img.src = container.url;
img.onload = function () {
scope.loaded(frameIndex, container);
};
img.onerror = function () {
scope.loadFailed(frameIndex, container);
};
} else if (container.type.indexOf("video") == 0) {
var video;
try {
video = new Video();
} catch (e) {
video = document.createElement('video');
}
video.src = container.url;
video.onloadeddata = function () {
scope.loaded(frameIndex, container);
};
video.onerror = function () {
scope.loadFailed(frameIndex, container);
};
video.load();
}
} else {
console.log('skipping container', container);
}
},
loaded(frameIndex) {
let frame = this.frames[frameIndex];
if (frame) {
frame.loadCount++;
if (frame.loadCount >= frame.containers.length) {
this.$set(this.loadedFrames, frame.id, frame);
this.displayedFrames = Object.values(this.loadedFrames).sort((a, b) => a.index > b.index);
if (!this.timer && this.playOnBoot) {
this.play();
}
}
}
},
visibilityChanged(visible) {
this.visible = visible;
if (visible) {
this.play();
} else {
this.stop();
}
},
play() {
if (this.current >= this.displayedFrames.length) {
return;
}
if (this.displayedFrames.length > 0) {
this.next();
}
let frame = this.displayedFrames[this.current];
if (this.timer != null) {
clearTimeout(this.timer);
}
if (!frame) {
return;
}
this.displayQR = frame && frame.keywords ? frame.keywords.join(",").indexOf("qr-") > -1 : false;
this.frameKeywords = frame.keywords.filter(k => typeof k === "string" && k.length > 0).map(k => "wf-keyword-" + k);
// console.log('displayQR', this.displayQR, this.qr);
// console.log('this.refs', this.$refs['frames']);
if (this.$refs['frames']) {
let _frame = this.$refs['frames'].children[this.current];
if (_frame) {
let video = _frame.querySelector("video");
if (video && video.readyState) {
setTimeout(() => {
this.playVideo(video, frame.duration);
}, 10);
} else {
if (video) {
console.log('video not ready. try again', video.readyState);
// maybe we should remove it?
setTimeout(() => {
console.log('play next instead');
this.play();
}, 100);
}
this.timer = setTimeout(this.play, frame.duration);
}
} else {
this.timer = setTimeout(this.play, frame.duration);
}
}
},
playVideo(video, duration) {
video.pause();
video.currentTime = 0;
var playPromise = video.play();
playPromise.catch(err => {
console.warn("Video playback failed", err);
clearTimeout(this.timer);
setTimeout(() => {
this.playVideo(video, duration);
}, 300);
});
this.timer = setTimeout(this.play, duration);
},
stop() {
if (this.timer) {
clearTimeout(this.timer);
}
},
next() {
if (this.current < this.displayedFrames.length - 1) {
this.current++;
} else {
this.current = 0;
}
},
onClick(frame, container) {
this.$emit('clicked', frame, container);
},
isImage(container) {
return !(container.type && container.type.substr(0, 5) === 'video');
},
isVideo(container) {
return container.type && container.type.substr(0, 5) === 'video';
},
getUrl(container) {
return WayfinderAPI.advertisements.data.url(container.advertisement_id);
},
renderQR() {
let url = this.qrURL;
const QRCode = require("qrcode-svg");
if (QRCode && url) {
this.qr = new QRCode({
content: url,
container: "svg-viewbox",
padding: 0
}).svg();
}
}
}
};
/* script */
const __vue_script__$c = script$c;
/* template */
var __vue_render__$c = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
directives: [{
name: "observe-visibility",
rawName: "v-observe-visibility",
value: _vm.visibilityChanged,
expression: "visibilityChanged"
}],
ref: "frames",
staticClass: "wf-component wf-banner"
}, _vm._l(_vm.displayedFrames, function (frame, index) {
return _c('div', {
key: frame.id,
staticClass: "wf-frame",
class: [{
'wf-active': index == _vm.current
}, _vm.frameKeywords]
}, [_vm._l(frame.containers, function (container) {
return _c('div', {
key: container.id,
staticClass: "wf-frame-container",
class: [container.containerType],
style: {
left: container.left + '%',
top: container.top + '%',
width: container.width + '%',
height: container.height + '%'
},
on: {
"click": function ($event) {
return _vm.onClick(frame, container);
}
}
}, [!_vm.isVideo(container) ? _c('img', {
attrs: {
"src": container.url
}
}) : _vm._e(), _vm._v(" "), _vm.isVideo(container) ? _c('video', {
attrs: {
"width": "100%",
"height": "auto",
"muted": "",
"crossorigin": "anonymous"
},
domProps: {
"muted": true
}
}, [_c('source', {
attrs: {
"src": container.url,
"type": container.type
}
})]) : _vm._e(), _vm._v(" "), _c('div', {
directives: [{
name: "show",
rawName: "v-show",
value: container.containerType.indexOf('qr') > -1 && _vm.qr != null,
expression: "container.containerType.indexOf('qr') > -1 && qr != null"
}],
staticClass: "wf-qr",
class: [container.containerType],
domProps: {
"innerHTML": _vm._s(_vm.qr)
}
})]);
}), _vm._v(" "), _vm._t("default", null, {
"frame": frame
})], 2);
}), 0);
};
var __vue_staticRenderFns__$c = [];
/* style */
const __vue_inject_styles__$c = function (inject) {
if (!inject) return;
inject("data-v-6ac4a309_0", {
source: ".wf-banner[data-v-6ac4a309]{position:relative;width:100%;height:100%}.wf-banner .wf-frame[data-v-6ac4a309]{width:100%;height:100%;position:absolute;background-size:cover;background-position:50% 50%;background-repeat:no-repeat;left:0;top:0;opacity:0;transition:opacity .5s ease-in-out}.wf-banner .wf-frame .wf-frame-container[data-v-6ac4a309]{position:absolute}.wf-banner .wf-frame .wf-frame-container img[data-v-6ac4a309]{object-fit:cover;width:100%;height:100%}.wf-banner .wf-frame.wf-active[data-v-6ac4a309]{opacity:1;transition:opacity .5s ease-in-out}.wf-banner .wf-frame video[data-v-6ac4a309]{position:relative;top:50%;transform:translateY(-50%)}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$c = "data-v-6ac4a309";
/* module identifier */
const __vue_module_identifier__$c = undefined;
/* functional template */
const __vue_is_functional_template__$c = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$l = /*#__PURE__*/normalizeComponent({
render: __vue_render__$c,
staticRenderFns: __vue_staticRenderFns__$c
}, __vue_inject_styles__$c, __vue_script__$c, __vue_scope_id__$c, __vue_is_functional_template__$c, __vue_module_identifier__$c, false, createInjector, undefined, undefined);
var __vue_component__$m = __vue_component__$l;
//
var script$b = {
name: 'PageMenu',
props: {
container: {
type: String,
default: "default"
},
showIcon: {
type: Boolean,
default: false
},
showName: {
type: Boolean,
default: true
},
currentPage: {
type: Object,
default: null
},
sortAZ: {
type: Boolean,
default: false
}
},
data() {
return {
count: 0
};
},
computed: {
...mapState('wf', ['pages', 'language']),
sortedPages() {
let arr = [];
if (this.pages && typeof this.pages == "object" && this.pages[this.container]) {
arr = Object.values(this.pages[this.container]).filter(page => {
return page && parseInt(page.visible);
}); // Copy and filter array
if (this.sortAZ) {
arr = arr.sort((a, b) => {
if (this.getName(a) && this.getName(b)) {
return this.getName(a).localeCompare(this.getName(b));
} else {
return 0;
}
});
} else {
arr = arr.sort((a, b) => {
return parseInt(a.order) - parseInt(b.order);
});
}
}
this.count = arr.length;
return arr;
}
},
methods: {
onClick(page) {
return () => {
this.$emit('clicked', page);
};
},
getName(page) {
if (page) {
return page["name"][this.language];
}
return "";
},
findBySlug(slug) {
if (this.pages && this.pages[this.container]) {
if (slug.length > 0) {
let page;
for (let p in this.pages[this.container]) {
page = this.pages[this.container][p];
if (page.slug.toLowerCase() == slug) {
return page;
}
}
}
}
return false;
}
}
};
/* script */
const __vue_script__$b = script$b;
/* template */
var __vue_render__$b = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-page-menu"
}, [_c('ul', {
staticClass: "wf-list",
class: ['wf-list-count-' + _vm.count]
}, _vm._l(_vm.sortedPages, function (page) {
return _c('li', {
directives: [{
name: "touch",
rawName: "v-touch:tap",
value: _vm.onClick(page),
expression: "onClick(page)",
arg: "tap"
}],
key: page.id,
staticClass: "wf-list-item",
class: {
"wf-active": _vm.currentPage && page.id == _vm.currentPage.id
},
on: {
"click": function ($event) {
return _vm.onClick(page);
}
}
}, [_c('i', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.showIcon,
expression: "showIcon"
}],
staticClass: "wf-icon",
domProps: {
"innerHTML": _vm._s(page.icon)
}
}), _vm._v(" "), _c('label', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.showName,
expression: "showName"
}]
}, [_vm._v(_vm._s(_vm.getName(page)))])]);
}), 0)]);
};
var __vue_staticRenderFns__$b = [];
/* style */
const __vue_inject_styles__$b = function (inject) {
if (!inject) return;
inject("data-v-3fbf9b45_0", {
source: ".wf-list-item[data-v-3fbf9b45]{list-style:none}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$b = "data-v-3fbf9b45";
/* module identifier */
const __vue_module_identifier__$b = undefined;
/* functional template */
const __vue_is_functional_template__$b = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$j = /*#__PURE__*/normalizeComponent({
render: __vue_render__$b,
staticRenderFns: __vue_staticRenderFns__$b
}, __vue_inject_styles__$b, __vue_script__$b, __vue_scope_id__$b, __vue_is_functional_template__$b, __vue_module_identifier__$b, false, createInjector, undefined, undefined);
var __vue_component__$k = __vue_component__$j;
//
var script$a = {
name: 'AlphabetMenu',
props: {
pois: {
type: Array,
default: []
},
overrideChar: {
type: String,
default: ""
},
showInMenu: {
type: Boolean,
default: true
},
group: {
type: String,
default: ""
}
},
data() {
return {
currentChar: "",
alphabet: [],
poisWithChar: {},
groupChars: [],
groupLabel: ""
};
},
computed: {
//yahLogo
...mapState('wf', ['language'])
},
watch: {
pois() {
this.makeGrouping();
this.generate();
},
overrideChar() {
if (this.overrideChar && this.overrideChar !== "") {
this.currentChar = this.overrideChar;
}
},
group() {
this.makeGrouping();
}
},
methods: {
onAZ(letter) {
this.currentChar = letter;
this.$emit("clicked", letter, this.poisWithChar[letter]);
},
makeGrouping() {
if (this.group) {
this.groupChars = this.group.toLowerCase().split("");
if (this.groupChars.length > 1) {
this.groupLabel = this.groupChars[0] + " - " + this.groupChars[this.groupChars.length - 1];
} else {
this.groupLabel = this.groupChars[0];
}
this.generate();
}
},
generate() {
let letters = [];
this.poisWithChar = [];
let poi, char;
for (let p in this.pois) {
poi = this.pois[p];
if ((!this.showInMenu || poi.getShowInMenu()) && poi.getName(this.language) && poi.getName(this.language).length > 0) {
char = poi.getName(this.language)[0].toLowerCase();
if (this.groupChars.indexOf(char) > -1) {
if (letters.indexOf(this.groupLabel) == -1) {
letters.push(this.groupLabel);
this.poisWithChar[this.groupLabel] = [];
}
this.poisWithChar[this.groupLabel].push(poi);
} else {
if (letters.indexOf(char) == -1) {
letters.push(char);
}
if (!this.poisWithChar[char]) {
this.poisWithChar[char] = [];
}
this.poisWithChar[char].push(poi);
}
}
}
letters.sort();
this.alphabet = letters;
}
}
};
/* script */
const __vue_script__$a = script$a;
/* template */
var __vue_render__$a = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('ul', {
staticClass: "wf-component wf-alphabet-menu"
}, _vm._l(_vm.alphabet, function (l) {
return _c('li', {
key: l,
class: [_vm.currentChar == l ? 'wf-active' : '', 'wf-char-' + l],
on: {
"click": function ($event) {
return _vm.onAZ(l);
}
}
}, [_vm._v(_vm._s(l))]);
}), 0);
};
var __vue_staticRenderFns__$a = [];
/* style */
const __vue_inject_styles__$a = function (inject) {
if (!inject) return;
inject("data-v-58de4247_0", {
source: ".wf-alphabet-menu{list-style:none;padding:0;margin:0}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$a = undefined;
/* module identifier */
const __vue_module_identifier__$a = undefined;
/* functional template */
const __vue_is_functional_template__$a = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$h = /*#__PURE__*/normalizeComponent({
render: __vue_render__$a,
staticRenderFns: __vue_staticRenderFns__$a
}, __vue_inject_styles__$a, __vue_script__$a, __vue_scope_id__$a, __vue_is_functional_template__$a, __vue_module_identifier__$a, false, createInjector, undefined, undefined);
var __vue_component__$i = __vue_component__$h;
//
var script$9 = {
name: "POI",
computed: {
...mapState('wf', ['language']),
url() {
if (this.ad) {
return WayfinderAPI.advertisements.data.url(this.ad.advertisement_id);
}
return "";
}
},
props: {
ad: {
type: Object,
default: null
}
},
mounted() {},
watch: {
language() {},
ad() {}
},
methods: {
clicked() {
if (this.ad) {
this.$emit('clicked', this.ad);
}
},
isVideo() {
return this.ad.contentType && this.ad.contentType.substr(0, 5) === 'video';
},
getImage() {
if (!!this.poi.getBackgroundUrl()) return this.poi.getBackgroundUrl();else if (!!this.poi.getIconUrl()) {
return this.poi.getIconUrl();
} else {
return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
}
},
isImage() {
if (this.ad.getMediaUrl()) return "image-background";else if (this.poi.getIconUrl()) return "image-logo";else return "image-none";
},
truncate(str, len) {
if (str && str.length > len) {
return str.substring(0, len) + '...';
} else {
return str;
}
}
},
data: function () {
return {
show_path: 'Show Path',
show_accessibility_path: "Show Accessibility Path",
pathTime: '',
unit: 'm',
path2Text: null
};
}
};
/* script */
const __vue_script__$9 = script$9;
/* template */
var __vue_render__$9 = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _vm.ad ? _c('div', {
staticClass: "wf-poi-advertisement"
}, [!_vm.isVideo() ? _c('img', {
attrs: {
"src": _vm.url
}
}) : _vm._e(), _vm._v(" "), _vm.isVideo() ? _c('video', {
attrs: {
"width": "100%",
"height": "auto",
"muted": "",
"crossorigin": "anonymous"
},
domProps: {
"muted": true
}
}, [_c('source', {
attrs: {
"src": _vm.url,
"type": _vm.ad.contentType
}
})]) : _vm._e()]) : _vm._e();
};
var __vue_staticRenderFns__$9 = [];
/* style */
const __vue_inject_styles__$9 = function (inject) {
if (!inject) return;
inject("data-v-2f9b3eb8_0", {
source: ".wf-poi-advertisement[data-v-2f9b3eb8]{width:100%;min-height:1em;overflow:hidden}.wf-poi-advertisement img[data-v-2f9b3eb8],.wf-poi-advertisement video[data-v-2f9b3eb8]{object-fit:contain}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$9 = "data-v-2f9b3eb8";
/* module identifier */
const __vue_module_identifier__$9 = undefined;
/* functional template */
const __vue_is_functional_template__$9 = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$f = /*#__PURE__*/normalizeComponent({
render: __vue_render__$9,
staticRenderFns: __vue_staticRenderFns__$9
}, __vue_inject_styles__$9, __vue_script__$9, __vue_scope_id__$9, __vue_is_functional_template__$9, __vue_module_identifier__$9, false, createInjector, undefined, undefined);
var __vue_component__$g = __vue_component__$f;
//
function parse(input) {
var value = input;
value = value.replaceAll("<", "<").replaceAll(">", ">");
value = value.replaceAll(" ", " ");
value = value.replaceAll("&", "&");
return value;
}
var script$8 = {
name: "page-html",
computed: {
...mapState('wf', ['language']),
value() {
if (this.item && this.item.value && this.item.value[this.language]) {
return parse(this.item.value[this.language]);
}
return "";
}
},
props: {
item: {
type: Object,
default: null
}
}
};
/* script */
const __vue_script__$8 = script$8;
/* template */
var __vue_render__$8 = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _vm.item ? _c('div', {
staticClass: "wf-page-item wf-page-html"
}, [_c('div', {
class: _vm.item.classes,
domProps: {
"innerHTML": _vm._s(_vm.value)
}
})]) : _vm._e();
};
var __vue_staticRenderFns__$8 = [];
/* style */
const __vue_inject_styles__$8 = undefined;
/* scoped */
const __vue_scope_id__$8 = "data-v-68ffe06a";
/* module identifier */
const __vue_module_identifier__$8 = undefined;
/* functional template */
const __vue_is_functional_template__$8 = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$e = /*#__PURE__*/normalizeComponent({
render: __vue_render__$8,
staticRenderFns: __vue_staticRenderFns__$8
}, __vue_inject_styles__$8, __vue_script__$8, __vue_scope_id__$8, __vue_is_functional_template__$8, __vue_module_identifier__$8, false, undefined, undefined, undefined);
var PageHTML = __vue_component__$e;
//
var script$7 = {
name: "page-url",
computed: {
...mapState('wf', ['language', 'reset'])
},
props: {
item: {
type: Object,
default: null
},
resetPage: {
type: Boolean,
default: false
}
},
watch: {
reset: function (newVal) {
if (this.resetPage) {
this.currentSRC = this.src + "?t=" + Date.now();
}
}
}
};
/* script */
const __vue_script__$7 = script$7;
/* template */
var __vue_render__$7 = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _vm.item ? _c('div', {
staticClass: "wf-page-item wf-page-url"
}, [_vm.item.value ? _c('iframe', {
attrs: {
"src": _vm.item.value[_vm.language],
"nwdisable": "",
"nwfaketop": ""
}
}) : _vm._e()]) : _vm._e();
};
var __vue_staticRenderFns__$7 = [];
/* style */
const __vue_inject_styles__$7 = function (inject) {
if (!inject) return;
inject("data-v-7a70ef1c_0", {
source: ".wf-page-url[data-v-7a70ef1c],.wf-page-url iframe[data-v-7a70ef1c],.wf-page-url webview[data-v-7a70ef1c]{width:100%;height:100%;border:none}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$7 = "data-v-7a70ef1c";
/* module identifier */
const __vue_module_identifier__$7 = undefined;
/* functional template */
const __vue_is_functional_template__$7 = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$d = /*#__PURE__*/normalizeComponent({
render: __vue_render__$7,
staticRenderFns: __vue_staticRenderFns__$7
}, __vue_inject_styles__$7, __vue_script__$7, __vue_scope_id__$7, __vue_is_functional_template__$7, __vue_module_identifier__$7, false, createInjector, undefined, undefined);
var PageURL = __vue_component__$d;
//
var script$6 = {
name: "page-image",
computed: {
...mapState('wf', ['language']),
src() {
return WayfinderAPI.getURL("images", "get", this.item.value[this.language]);
}
},
props: {
item: {
type: Object,
default: null
}
}
};
/* script */
const __vue_script__$6 = script$6;
/* template */
var __vue_render__$6 = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _vm.item ? _c('div', {
staticClass: "wf-page-item wf-page-image"
}, [_c('img', {
attrs: {
"src": _vm.src
}
})]) : _vm._e();
};
var __vue_staticRenderFns__$6 = [];
/* style */
const __vue_inject_styles__$6 = undefined;
/* scoped */
const __vue_scope_id__$6 = "data-v-4d06f861";
/* module identifier */
const __vue_module_identifier__$6 = undefined;
/* functional template */
const __vue_is_functional_template__$6 = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$c = /*#__PURE__*/normalizeComponent({
render: __vue_render__$6,
staticRenderFns: __vue_staticRenderFns__$6
}, __vue_inject_styles__$6, __vue_script__$6, __vue_scope_id__$6, __vue_is_functional_template__$6, __vue_module_identifier__$6, false, undefined, undefined, undefined);
var PageIMAGE = __vue_component__$c;
//
var script$5 = {
name: "Page",
components: {
PageHTML,
PageURL,
PageIMAGE
},
computed: {
...mapState('wf', ['language', 'pages']),
pageName() {
if (this.page && this.page.name) {
return this.page.name[this.language];
} else return "";
},
currentTab() {
return this.tab;
},
isSingle() {
if (this.page && ['collection', 'tab'].indexOf(this.page.type) > -1) return false;
return true;
}
},
props: {
container: {
type: String,
default: "default"
},
pid: {
type: Number,
default: -1
},
slug: {
type: String,
default: null
},
showName: {
type: Boolean,
default: true
},
showIcon: {
type: Boolean,
default: false
},
playAll: {
type: Boolean,
default: false
},
duration: {
type: Number,
default: 30
},
defaultTab: {
type: String,
default: null
},
index: {
type: Number,
default: 0
},
scrollable: {
type: Boolean,
default: false
}
},
mounted() {
console.log('mounted.page', this.defaultTab, this.slug, this.page);
this.getDefaultPage();
this.updatePage();
},
watch: {
pages() {
this.getDefaultPage();
this.updatePage();
},
container() {
this.getDefaultPage();
this.updatePage();
},
pid() {
let page = this.findByID(parseInt(this.pid));
if (page) {
this.page = page;
this.updatePage();
} else {
console.log('Page with ID', this.pid, 'not found');
}
},
slug() {
let page = this.findBySlug(this.slug.toLowerCase());
if (page) {
this.page = page;
this.updatePage();
} else {
console.log('Page with slug', this.slug, 'not found');
}
},
index() {
let page = this.findByIndex(this.index);
if (page) {
this.page = page;
this.updatePage();
} else {
console.log('Page with index', this.index, 'not found');
}
}
},
methods: {
getDefaultPage() {
if (this.defaultTab) {
this.tab = this.defaultTab;
} else if (typeof this.slug === "string" && this.slug.length > 0) {
this.page = this.findBySlug(this.slug);
} else if (!this.page) {
this.page = this.findByIndex(this.index);
}
},
findByID(id) {
if (this.pages && this.pages[this.container]) {
if (id > -1) {
let page;
for (let p in this.pages[this.container]) {
page = this.pages[this.container][p];
if (parseInt(page.id) == id) {
return page;
}
}
}
}
return false;
},
findByIndex(index) {
if (this.pages && this.pages[this.container]) {
if (index > -1) {
let page = Object.values(this.pages[this.container])[parseInt(index)];
return page;
}
}
return false;
},
findBySlug(slug) {
if (this.pages && this.pages[this.container]) {
if (slug.length > 0) {
let page;
for (let p in this.pages[this.container]) {
page = this.pages[this.container][p];
if (page.slug.toLowerCase() == slug) {
return page;
}
}
}
}
return false;
},
updatePage() {
console.log('updatePage', this.container, this.slug);
if (this.pages && this.pages[this.container]) {
if (this.page && this.page.type == "tab") {
this.tab = this.page.slug;
} else if (this.page) {
this.tab = null;
}
}
},
itemType(item) {
if (item && item.type) {
return "Page" + item.type.toUpperCase();
}
return "";
},
changePageWithSlug(slug) {
let page = this.findBySlug(slug);
if (page) {
this.updatePage();
return true;
}
return false;
}
},
data: function () {
return {
currentIndex: 1,
page: null,
tab: null
};
}
};
/* script */
const __vue_script__$5 = script$5;
/* template */
var __vue_render__$5 = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-page",
class: ['wf-page-slug-' + (_vm.page && _vm.page.slug ? _vm.page.slug : 'none'), 'wf-page-type-' + (_vm.page ? _vm.page.type : 'none'), _vm.page ? _vm.page.classes : '']
}, [_vm.page ? _c('WFScrollableArea', {
attrs: {
"enable": _vm.scrollable
}
}, [_c('div', {
staticClass: "wf-page-container",
class: {
'wf-page-empty': _vm.page.items.length === 0
}
}, [_vm.showIcon ? _c('div', {
staticClass: "wf-page-icon",
class: [_vm.page.icon ? 'wf-has-icon' : ''],
domProps: {
"innerHTML": _vm._s(_vm.page.icon)
}
}) : _vm._e(), _vm._v(" "), _vm.showName ? _c('label', {
staticClass: "wf-page-name",
domProps: {
"innerHTML": _vm._s(_vm.pageName || '')
}
}) : _vm._e(), _vm._v(" "), _c('WFPageContent', {
attrs: {
"page": _vm.page
}
})], 1)]) : _vm._e(), _vm._v(" "), _c('WFTabs', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.currentTab,
expression: "currentTab"
}],
ref: "tabs",
attrs: {
"activeTab": _vm.currentTab
}
}, [_vm._t("tabs")], 2)], 1);
};
var __vue_staticRenderFns__$5 = [];
/* style */
const __vue_inject_styles__$5 = function (inject) {
if (!inject) return;
inject("data-v-a5257d0e_0", {
source: ".wf-page-container[data-v-a5257d0e]{width:100%;height:100%}.wf-page-container .wf-page-content[data-v-a5257d0e]{width:100%;height:100%}.wf-page-container.wf-page-empty[data-v-a5257d0e]{height:auto!important}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$5 = "data-v-a5257d0e";
/* module identifier */
const __vue_module_identifier__$5 = undefined;
/* functional template */
const __vue_is_functional_template__$5 = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$a = /*#__PURE__*/normalizeComponent({
render: __vue_render__$5,
staticRenderFns: __vue_staticRenderFns__$5
}, __vue_inject_styles__$5, __vue_script__$5, __vue_scope_id__$5, __vue_is_functional_template__$5, __vue_module_identifier__$5, false, createInjector, undefined, undefined);
var __vue_component__$b = __vue_component__$a;
//
var script$4 = {
name: "Page",
components: {
PageHTML,
PageURL,
PageIMAGE
},
computed: {
...mapState('wf', ['language']),
isSingle() {
if (this.page && ['collection', 'tab'].indexOf(this.page.type) > -1) return false;
return true;
}
},
props: {
page: {
type: Object,
default: null
}
},
mounted() {},
watch: {
page() {}
},
methods: {
itemType(item) {
if (item && item.type) {
return "Page" + item.type.toUpperCase();
}
return "";
}
}
};
/* script */
const __vue_script__$4 = script$4;
/* template */
var __vue_render__$4 = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _vm.page ? _c('div', {
staticClass: "wf-page-content"
}, _vm._l(_vm.page.items, function (item, index) {
return _c(_vm.itemType(item), {
key: item.id,
tag: "component",
class: ['wf-page-item-' + index],
attrs: {
"item": item
}
});
}), 1) : _vm._e();
};
var __vue_staticRenderFns__$4 = [];
/* style */
const __vue_inject_styles__$4 = undefined;
/* scoped */
const __vue_scope_id__$4 = "data-v-6c574a23";
/* module identifier */
const __vue_module_identifier__$4 = undefined;
/* functional template */
const __vue_is_functional_template__$4 = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$8 = /*#__PURE__*/normalizeComponent({
render: __vue_render__$4,
staticRenderFns: __vue_staticRenderFns__$4
}, __vue_inject_styles__$4, __vue_script__$4, __vue_scope_id__$4, __vue_is_functional_template__$4, __vue_module_identifier__$4, false, undefined, undefined, undefined);
var __vue_component__$9 = __vue_component__$8;
//
var script$3 = {
name: "Translate",
props: {
k: {
type: String,
default: ""
},
params: {
type: Array,
default: () => []
}
},
computed: {
...mapState('wf', ['language'])
},
data() {
return {
translated: false,
value: ""
};
},
watch: {
language() {
if (this.$wayfinder) {
this.update();
}
},
k() {
this.update();
},
params() {
this.update();
}
},
mounted() {
this.$nextTick(() => {
this.update();
});
},
methods: {
update() {
if (this.$wayfinder && this.k && this.k.length > 0 && this.$wayfinder.translator.exists(this.k)) {
this.value = this.$wayfinder.translator.get(this.k, this.params);
this.translated = true;
}
}
}
};
/* script */
const __vue_script__$3 = script$3;
/* template */
var __vue_render__$3 = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('label', {
staticClass: "wf-translatable",
class: {
'wf-translated': _vm.translated
}
}, [_vm.value == '' ? _vm._t("default") : _vm._e(), _vm._v("\n " + _vm._s(_vm.value) + "\n")], 2);
};
var __vue_staticRenderFns__$3 = [];
/* style */
const __vue_inject_styles__$3 = undefined;
/* scoped */
const __vue_scope_id__$3 = undefined;
/* module identifier */
const __vue_module_identifier__$3 = undefined;
/* functional template */
const __vue_is_functional_template__$3 = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$6 = /*#__PURE__*/normalizeComponent({
render: __vue_render__$3,
staticRenderFns: __vue_staticRenderFns__$3
}, __vue_inject_styles__$3, __vue_script__$3, __vue_scope_id__$3, __vue_is_functional_template__$3, __vue_module_identifier__$3, false, undefined, undefined, undefined);
var __vue_component__$7 = __vue_component__$6;
//
//
//
//
//
//import Icons from '../assets/icons.svg';
var script$2 = {
props: ["name", "width", "height"],
computed: {
iconName() {
return "#icon-" + this.name;
}
}
};
/* script */
const __vue_script__$2 = script$2;
/* template */
var __vue_render__$2 = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('svg', {
staticClass: "wf-icon",
class: ["wf-icon-" + this.name],
attrs: {
"viewbox": "0 0 32 32"
}
}, [_c('use', {
attrs: {
"xlink:href": _vm.iconName
}
})]);
};
var __vue_staticRenderFns__$2 = [];
/* style */
const __vue_inject_styles__$2 = function (inject) {
if (!inject) return;
inject("data-v-6281073a_0", {
source: "svg[data-v-6281073a]{min-height:1rem;display:inline-block}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$2 = "data-v-6281073a";
/* module identifier */
const __vue_module_identifier__$2 = undefined;
/* functional template */
const __vue_is_functional_template__$2 = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$4 = /*#__PURE__*/normalizeComponent({
render: __vue_render__$2,
staticRenderFns: __vue_staticRenderFns__$2
}, __vue_inject_styles__$2, __vue_script__$2, __vue_scope_id__$2, __vue_is_functional_template__$2, __vue_module_identifier__$2, false, createInjector, undefined, undefined);
var __vue_component__$5 = __vue_component__$4;
//
var script$1 = {
name: 'Browser',
props: {
src: {
type: String,
default: ""
},
resetPage: {
type: Boolean,
default: false
}
},
computed: {
...mapState('wf', ['reset']),
webview() {
if ('options' in document.createElement('webview')) {
console.log('webview exists');
return true;
}
console.log('webview not exists');
return false;
}
},
data() {
return {
currentSRC: ""
};
},
mounted() {
this.currentSRC = this.src;
this.$refs.frame.addEventListener("load", () => {
console.log('frame.load', this.$refs.frame.contentWindow.document);
});
},
watch: {
reset: function (newVal) {
if (this.resetPage) {
this.currentSRC = this.src + "?t=" + Date.now();
}
},
src: function () {
this.currentSRC = this.src;
console.log('src', src);
}
}
};
/* script */
const __vue_script__$1 = script$1;
/* template */
var __vue_render__$1 = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "wf-component wf-browser"
}, [_c('iframe', {
ref: "frame",
attrs: {
"src": _vm.currentSRC,
"nwdisable": ""
}
})]);
};
var __vue_staticRenderFns__$1 = [];
/* style */
const __vue_inject_styles__$1 = function (inject) {
if (!inject) return;
inject("data-v-20fcd1d6_0", {
source: ".wf-browser,.wf-browser iframe,.wf-browser webview{width:100%;height:100%;border:none}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__$1 = undefined;
/* module identifier */
const __vue_module_identifier__$1 = undefined;
/* functional template */
const __vue_is_functional_template__$1 = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$2 = /*#__PURE__*/normalizeComponent({
render: __vue_render__$1,
staticRenderFns: __vue_staticRenderFns__$1
}, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, createInjector, undefined, undefined);
var __vue_component__$3 = __vue_component__$2;
//
var script = {
name: "Path2Text",
props: {
path: {
type: Object,
default: null
},
showDistance: {
type: Boolean,
default: false
},
showTime: {
type: Boolean,
default: false
},
showPath2Text: {
type: Boolean,
default: false
},
showStepCount: {
type: Boolean,
default: false
}
},
mounted() {
this.$nextTick(() => {
this.makePath();
});
},
data: function () {
return {
timeText: "",
steps: null,
stepCount: 0
};
},
watch: {
path() {
this.$nextTick(() => {
this.makePath();
});
}
},
methods: {
makeType(step) {
return step.walk ? "walk" : step.turn ? "turn" : step.use ? "use" : "NA";
},
makeValue(step, type) {
return step[type];
},
makeStep(step) {
var type = this.makeType(step);
var value = this.makeValue(step, type);
return {
type: type,
value: value,
translate: "path-" + (type == "turn" ? type + "-" + value : type),
icon: "#path-" + (type === "turn" ? "turn-" + value : type === 'use' ? "use" + value : "walk")
};
},
makePath() {
if (this.path) {
var pathTime = this.path.distance / 1.2;
var minutes = Math.floor(pathTime / 60);
var seconds = Math.ceil(pathTime - Math.floor(pathTime / 60) * 60);
this.timeText = this.$wayfinder.translator.get("path-time", [minutes, seconds]);
this.steps = this.path.steps.map(s => this.makeStep(s));
this.stepCount = Math.round(this.path.distance / 0.9);
console.log('watch.path', this.path, pathTime, this.time, this.stepCount);
}
}
}
};
/* script */
const __vue_script__ = script;
/* template */
var __vue_render__ = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _vm.path ? _c('div', {
staticClass: "wf-path"
}, [_vm._t("icons", function () {
return [_c('svg', {
staticStyle: {
"position": "absolute",
"width": "0",
"height": "0",
"overflow": "hidden"
},
attrs: {
"aria-hidden": "true",
"version": "1.1",
"xmlns": "http://www.w3.org/2000/svg",
"xmlns:xlink": "http://www.w3.org/1999/xlink"
}
}, [_c('symbol', {
attrs: {
"id": "path-turn-right",
"viewBox": "0 0 32 32"
}
}, [_c('path', {
staticStyle: {
"fill": "currentColor"
},
attrs: {
"d": "M20.9062 0.124997C21.4562 -0.112504 22.0937 -2.8731e-06 22.5312 0.412497L31.5312 8.9125C31.8312 9.19375 32 9.5875 32 10C32 10.4125 31.8312 10.8062 31.5312 11.0875L22.5312 19.5875C22.0937 20 21.4562 20.1125 20.9062 19.875C20.3563 19.6375 20 19.0937 20 18.5L20 13L8 13C6.89375 13 6 13.8937 6 15L6 20C6 21.1062 5.10625 22 4 22L2 22C0.89375 22 -3.90671e-08 21.1062 -8.74228e-08 20L-3.0598e-07 15C-4.99129e-07 10.5812 3.58125 7 8 7L20 7L20 1.5C20 0.899997 20.3562 0.362496 20.9062 0.124997Z"
}
})]), _vm._v(" "), _c('symbol', {
attrs: {
"id": "path-use-elevator",
"viewBox": "0 0 24 24"
}
}, [_c('path', {
staticStyle: {
"fill": "currentColor"
},
attrs: {
"d": "M6.22031 0.220312L3.22031 3.22031C3.00469 3.43594 2.94375 3.75937 3.05625 4.03594C3.16875 4.3125 3.44531 4.5 3.75 4.5H9.75C10.0547 4.5 10.3266 4.31719 10.4438 4.03594C10.5609 3.75469 10.4953 3.43125 10.2797 3.22031L7.27969 0.220312C6.98906 -0.0703125 6.51094 -0.0703125 6.22031 0.220312ZM3 6C1.34531 6 0 7.34531 0 9V21C0 22.6547 1.34531 24 3 24H21C22.6547 24 24 22.6547 24 21V9C24 7.34531 22.6547 6 21 6H3ZM7.5 10.5C8.09674 10.5 8.66903 10.7371 9.09099 11.159C9.51295 11.581 9.75 12.1533 9.75 12.75C9.75 13.3467 9.51295 13.919 9.09099 14.341C8.66903 14.7629 8.09674 15 7.5 15C6.90326 15 6.33097 14.7629 5.90901 14.341C5.48705 13.919 5.25 13.3467 5.25 12.75C5.25 12.1533 5.48705 11.581 5.90901 11.159C6.33097 10.7371 6.90326 10.5 7.5 10.5ZM3.75 18.75C3.75 17.5078 4.75781 16.5 6 16.5H9C10.2422 16.5 11.25 17.5078 11.25 18.75V19.5C11.25 20.3297 10.5797 21 9.75 21H5.25C4.42031 21 3.75 20.3297 3.75 19.5V18.75ZM12.75 18.75C12.75 17.5078 13.7578 16.5 15 16.5H18C19.2422 16.5 20.25 17.5078 20.25 18.75V19.5C20.25 20.3297 19.5797 21 18.75 21H14.25C13.4203 21 12.75 20.3297 12.75 19.5V18.75ZM14.25 12.75C14.25 12.4545 14.3082 12.1619 14.4213 11.889C14.5343 11.616 14.7001 11.3679 14.909 11.159C15.1179 10.9501 15.366 10.7843 15.639 10.6713C15.9119 10.5582 16.2045 10.5 16.5 10.5C16.7955 10.5 17.0881 10.5582 17.361 10.6713C17.634 10.7843 17.8821 10.9501 18.091 11.159C18.2999 11.3679 18.4657 11.616 18.5787 11.889C18.6918 12.1619 18.75 12.4545 18.75 12.75C18.75 13.0455 18.6918 13.3381 18.5787 13.611C18.4657 13.884 18.2999 14.1321 18.091 14.341C17.8821 14.5499 17.634 14.7157 17.361 14.8287C17.0881 14.9418 16.7955 15 16.5 15C16.2045 15 15.9119 14.9418 15.639 14.8287C15.366 14.7157 15.1179 14.5499 14.909 14.341C14.7001 14.1321 14.5343 13.884 14.4213 13.611C14.3082 13.3381 14.25 13.0455 14.25 12.75ZM16.7203 4.27969C17.0109 4.57031 17.4891 4.57031 17.7797 4.27969L20.7797 1.27969C20.9953 1.06406 21.0562 0.740625 20.9437 0.464062C20.8312 0.1875 20.5547 0 20.25 0H14.25C13.9453 0 13.6734 0.182812 13.5563 0.464062C13.4391 0.745312 13.5047 1.06875 13.7203 1.27969L16.7203 4.27969Z",
"fill": "#0F417C"
}
})]), _vm._v(" "), _c('symbol', {
attrs: {
"id": "path-turn-left",
"viewBox": "0 0 32 22"
}
}, [_c('path', {
staticStyle: {
"fill": "currentColor"
},
attrs: {
"d": "M11.0938 0.124997C10.5438 -0.112504 9.90625 -2.8731e-06 9.46875 0.412497L0.468751 8.9125C0.168751 9.19375 5.42568e-07 9.5875 5.24537e-07 10C5.06506e-07 10.4125 0.168751 10.8062 0.46875 11.0875L9.46875 19.5875C9.90625 20 10.5438 20.1125 11.0938 19.875C11.6437 19.6375 12 19.0937 12 18.5L12 13L24 13C25.1063 13 26 13.8937 26 15L26 20C26 21.1062 26.8938 22 28 22L30 22C31.1063 22 32 21.1062 32 20L32 15C32 10.5812 28.4188 7 24 7L12 7L12 1.5C12 0.899997 11.6438 0.362496 11.0938 0.124997Z",
"fill": "#0F417C"
}
})]), _vm._v(" "), _c('symbol', {
staticStyle: {
"rotate": "-90deg"
},
attrs: {
"id": "path-turn-around",
"viewBox": "0 0 32 22"
}
}, [_c('path', {
staticStyle: {
"fill": "currentColor"
},
attrs: {
"d": "M11.0938 0.124997C10.5438 -0.112504 9.90625 -2.8731e-06 9.46875 0.412497L0.468751 8.9125C0.168751 9.19375 5.42568e-07 9.5875 5.24537e-07 10C5.06506e-07 10.4125 0.168751 10.8062 0.46875 11.0875L9.46875 19.5875C9.90625 20 10.5438 20.1125 11.0938 19.875C11.6437 19.6375 12 19.0937 12 18.5L12 13L24 13C25.1063 13 26 13.8937 26 15L26 20C26 21.1062 26.8938 22 28 22L30 22C31.1063 22 32 21.1062 32 20L32 15C32 10.5812 28.4188 7 24 7L12 7L12 1.5C12 0.899997 11.6438 0.362496 11.0938 0.124997Z",
"fill": "#0F417C"
}
})]), _vm._v(" "), _c('symbol', {
attrs: {
"id": "path-use-stairs",
"viewBox": "0 0 27 22"
}
}, [_c('path', {
staticStyle: {
"fill": "currentColor"
},
attrs: {
"d": "M18 2C18 1.17031 18.6703 0.5 19.5 0.5H25.5C26.3297 0.5 27 1.17031 27 2C27 2.82969 26.3297 3.5 25.5 3.5H21V8C21 8.82969 20.3297 9.5 19.5 9.5H15V14C15 14.8297 14.3297 15.5 13.5 15.5H9V20C9 20.8297 8.32969 21.5 7.5 21.5H1.5C0.670312 21.5 0 20.8297 0 20C0 19.1703 0.670312 18.5 1.5 18.5H6V14C6 13.1703 6.67031 12.5 7.5 12.5H12V8C12 7.17031 12.6703 6.5 13.5 6.5H18V2Z",
"fill": "#0F417C"
}
})]), _vm._v(" "), _c('symbol', {
attrs: {
"id": "path-walk",
"viewBox": "0 0 320 512"
}
}, [_c('path', {
staticStyle: {
"fill": "currentColor"
},
attrs: {
"d": "M160 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM126.5 199.3c-1 .4-1.9 .8-2.9 1.2l-8 3.5c-16.4 7.3-29 21.2-34.7 38.2l-2.6 7.8c-5.6 16.8-23.7 25.8-40.5 20.2s-25.8-23.7-20.2-40.5l2.6-7.8c11.4-34.1 36.6-61.9 69.4-76.5l8-3.5c20.8-9.2 43.3-14 66.1-14c44.6 0 84.8 26.8 101.9 67.9L281 232.7l21.4 10.7c15.8 7.9 22.2 27.1 14.3 42.9s-27.1 22.2-42.9 14.3L247 287.3c-10.3-5.2-18.4-13.8-22.8-24.5l-9.6-23-19.3 65.5 49.5 54c5.4 5.9 9.2 13 11.2 20.8l23 92.1c4.3 17.1-6.1 34.5-23.3 38.8s-34.5-6.1-38.8-23.3l-22-88.1-70.7-77.1c-14.8-16.1-20.3-38.6-14.7-59.7l16.9-63.5zM68.7 398l25-62.4c2.1 3 4.5 5.8 7 8.6l40.7 44.4-14.5 36.2c-2.4 6-6 11.5-10.6 16.1L54.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L68.7 398z"
}
})])])];
}), _vm._v(" "), _vm.showPath2Text ? _c('div', {
staticClass: "wf-path-steps"
}, _vm._l(_vm.steps, function (step, index) {
return _c('div', {
key: index,
staticClass: "wf-step"
}, [_c('svg', {
staticClass: "wf-icon",
class: ["wf-icon-" + step.type],
attrs: {
"viewbox": "0 0 32 32"
}
}, [_c('use', {
attrs: {
"xlink:href": step.icon
}
})]), _vm._v(" "), _c('div', [_c('WFTranslate', {
attrs: {
"k": step.translate,
"params": [step.value]
}
})], 1)]);
}), 0) : _vm._e(), _vm._v(" "), _c('span', [_vm.showDistance ? _c('WFTranslate', {
staticClass: "wf-path-length",
attrs: {
"k": "path-distance",
"params": [_vm.path.distance]
}
}) : _vm._e(), _vm._v(" "), _vm.showStepCount ? _c('WFTranslate', {
staticClass: "wf-path-steps",
attrs: {
"k": "path-step-count",
"params": [_vm.stepCount]
}
}) : _vm._e(), _vm._v(" "), _vm.showTime ? _c('label', {
staticClass: "wf-path-time"
}, [_vm._v(_vm._s(_vm.timeText))]) : _vm._e()], 1)], 2) : _vm._e();
};
var __vue_staticRenderFns__ = [];
/* style */
const __vue_inject_styles__ = function (inject) {
if (!inject) return;
inject("data-v-abac1b94_0", {
source: ".wf-path{align-items:center}.wf-icon{width:2em;height:2em}",
map: undefined,
media: undefined
});
};
/* scoped */
const __vue_scope_id__ = undefined;
/* module identifier */
const __vue_module_identifier__ = undefined;
/* functional template */
const __vue_is_functional_template__ = false;
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__ = /*#__PURE__*/normalizeComponent({
render: __vue_render__,
staticRenderFns: __vue_staticRenderFns__
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, createInjector, undefined, undefined);
var __vue_component__$1 = __vue_component__;
/* eslint-disable import/prefer-default-export */
const urls = {
assets: {
live: "https://wayfinder-cdn.com/shared/",
cdn: "https://wayfinder-cdn.com/shared/",
dev: "//static.3dwayfinder.com/shared/",
enterprise: "../../../shared/",
snapshot: "../../../shared/"
},
js: {
live: "https://wayfinder-cdn.com/",
cdn: "https://wayfinder-cdn.com/",
dev: "//static.3dwayfinder.com",
enterprise: "../../../",
snapshot: "../../../",
local: "./"
}
};
function getURL(_env, type) {
return urls[type][_env];
}
/* global WF_MAP_TYPE WayfinderAPI wayfinder*/
function loadScript(url, callback) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
var x = document.getElementsByTagName('head')[0];
x.appendChild(s);
if (typeof callback == "function") {
s.onload = callback;
s.src = url;
}
}
function load3D(env, callback) {
loadScript(getURL(env, "js") + "/shared/js/minified/frak-latest.debug.js", function () {
loadScript(getURL(env, "js") + "/js/dist/3d/latest/Wayfinder3D.debug.js", function () {
callback();
});
});
}
function load3D2(env, callback) {
loadScript(getURL(env, "js") + "/shared/js/minified/frak2.debug.js", function () {
loadScript(getURL(env, "js") + "/js/dist/3d/latest/Wayfinder3D.debug.js", function () {
callback();
});
});
}
function load2D(env, callback) {
loadScript(getURL(env, "js") + "/js/dist/2d/latest/Wayfinder2D.debug.js", function () {
callback();
});
}
function loadWayfinder(type, env, callback) {
if (location && location.search) {
var options = decodeURI(location.search.substring(1));
if (options.indexOf("mobile=") > -1) {
load2D(env, callback);
} else if (type == "2d") {
load2D(env, callback);
} else if (type == "3d2") {
load3D2(env, callback);
} else {
load3D(env, callback);
}
} else {
if (typeof type == "undefined" || type == "2d") {
load2D(env, callback);
} else if (type == "3d2") {
load3D2(env, callback);
} else {
load3D(env, callback);
}
}
}
var components = /*#__PURE__*/Object.freeze({
__proto__: null,
loadWayfinder: loadWayfinder,
WFApp: __vue_component__$14,
WFMap: __vue_component__$11,
WFAZMenu: __vue_component__$$,
WFFlagsMenu: __vue_component__$Z,
WFLanguagesMenu: __vue_component__$X,
WFGroupsMenu: __vue_component__$T,
WFSubGroupMenu: SubGroupMenu,
WFGroupPOIsMenu: __vue_component__$R,
WFBuildingLogo: __vue_component__$P,
WFShortcutsMenu: __vue_component__$M,
WFZoomMenu: __vue_component__$K,
WFFloorsMenu: __vue_component__$I,
WFFilteredMenu: __vue_component__$G,
WFPOIAdvertisements: __vue_component__$E,
WFSearch: __vue_component__$C,
WFLoading: __vue_component__$A,
WFClock: __vue_component__$y,
WFDate: __vue_component__$w,
WFTabs: __vue_component__$u,
WFTab: __vue_component__$s,
WFTabButtons: __vue_component__$q,
WFScrollableArea: __vue_component__$o,
WFBanner: __vue_component__$m,
WFPageMenu: __vue_component__$k,
WFAlphabet: __vue_component__$i,
WFPOI: POI,
WFPOIAdvertisement: __vue_component__$g,
WFGroup: Group,
WFPage: __vue_component__$b,
WFPageContent: __vue_component__$9,
WFTranslate: __vue_component__$7,
WFYAH: YAH,
WFIcon: __vue_component__$5,
WFBrowser: __vue_component__$3,
WFPath2Text: __vue_component__$1
});
/* global wayfinder: false, WayfinderAPI */
function clone(obj) {
return Object.assign(Object.create(Object.getPrototypeOf(obj)), obj);
}
function freezeGroup(g) {
g = clone(g);
Object.defineProperty(g, 'parent', {
configurable: false
});
Object.defineProperty(g, 'color', {
configurable: false
});
Object.defineProperty(g, 'desciptions', {
configurable: false
});
Object.defineProperty(g, 'childGroups', {
configurable: false
});
Object.defineProperty(g, 'names', {
configurable: false
});
return g;
}
var freezeProps = ["floor", "groups", "groupNames", "node", "settings", "names", "descriptions", "advertisements", "meshNode", "submesh", "canvasBoard", "poiComponent", "wayfinder", "engine", "open"];
function freezePOI(p) {
p = clone(p);
for (let f in freezeProps) {
if (typeof p[freezeProps[f]] !== "undefined") {
Object.defineProperty(p, freezeProps[f], {
configurable: false
});
}
}
p.wayfinder = undefined;
p.engine = undefined;
p.poiComponent = undefined;
p.object = undefined;
p.submesh = undefined;
return p;
}
var store = {
namespaced: true,
state: {
floors: [],
pois: [],
poiGroups: [],
loaded: false,
language: '',
languages: [],
shortcuts: [],
filteredPOIs: [],
currentFloor: null,
building: null,
yahLogo: '',
banners: null,
landscape: false,
portrait: false,
mobile: false,
maxInActivity: 30,
reset: 0,
pages: {},
poiAdvertisements: [],
template: {}
},
getters: {
xLanguage: (state, context) => {
if (typeof Vue$1.prototype.$wayfinder !== 'undefined') {
state.language = Object.freeze(Vue$1.prototype.$wayfinder.getLanguage());
}
return state.language;
},
xFloors: state => {
if (typeof Vue$1.prototype.$wayfinder !== 'undefined' && Vue$1.prototype.$wayfinder.building) {
let _f;
state.floors = Object.freeze(Vue$1.prototype.$wayfinder.building.getSortedFloors().map(f => {
_f = clone(f);
_f.pois = _f.pois.map(p => freezePOI(p));
delete _f.nodes;
delete _f.node3D;
return _f;
}));
}
return state.floors;
},
xLanguages: state => {
if (typeof Vue$1.prototype.$wayfinder !== 'undefined') {
state.languages = Object.freeze(Object.values(Vue$1.prototype.$wayfinder.getLanguages()).reverse());
}
return state.languages;
},
xShortcuts: state => {
if (typeof Vue$1.prototype.$wayfinder !== 'undefined') {
let groups = Vue$1.prototype.$wayfinder.getPOIGroups();
let shortcuts = [];
let g;
Object.keys(groups).forEach(key => {
if (parseInt(groups[key].showInTopMenu)) {
g = freezeGroup(groups[key]);
g.pois = g.pois.map(p => freezePOI(p));
shortcuts.push(Object.freeze(g));
}
});
shortcuts = shortcuts.sort((a, b) => {
return -(a.order - b.order);
});
state.shortcuts = shortcuts;
}
return state.shortcuts;
},
xBuilding: state => {
if (Vue$1.prototype.$wayfinder !== 'undefined') {
let building = clone(Vue$1.prototype.$wayfinder.building);
Object.defineProperty(building, 'floors', {
configurable: false
});
Object.defineProperty(building, 'currentFloor', {
configurable: false
});
Object.defineProperty(building, 'sortedFloors', {
configurable: false
});
state.building = Object.freeze(building);
}
return state.building;
},
xYahLogo: state => {
if (typeof Vue$1.prototype.$wayfinder !== 'undefined') {
state.yahLogo = 'url(' + WayfinderAPI.getURL("images", "get", Vue$1.prototype.$wayfinder.settings.getInt('kiosk.you-are-here-image', 0)) + ')';
}
},
xPOIs: state => {
if (typeof Vue$1.prototype.$wayfinder !== 'undefined') {
state.pois = Object.freeze(Vue$1.prototype.$wayfinder.poisArray.map(p => {
return freezePOI(p);
}));
}
},
xTopics: state => {
if (typeof Vue$1.prototype.$wayfinder !== 'undefined') {
let groups = Vue$1.prototype.$wayfinder.poiGroups;
let _groups = [];
let group;
for (let g in groups) {
group = freezeGroup(groups[g]);
group.pois = groups[g].pois.map(p => freezePOI(p));
_groups.push(group);
}
state.poiGroups = Object.freeze(_groups);
}
},
xBanners: state => {
if (typeof Vue$1.prototype.$wayfinder !== 'undefined') {
state.banners = Object.assign({}, Vue$1.prototype.$wayfinder.getFilteredAdvertisements());
}
},
xTemplateSettings: state => {
if (typeof Vue$1.prototype.$wayfinder !== 'undefined') {
const wfSettings = Vue$1.prototype.$wayfinder.settings;
function camelize(str) {
let strs = str.split(".");
str = strs[strs.length - 1];
str = str.replaceAll("-", " ");
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function (word, index) {
return index === 0 ? word.toLowerCase() : word.toUpperCase();
}).replace(/\s+/g, '');
}
for (let s in wfSettings.data) {
if (s.indexOf("template.default") === 0) {
wfSettings.data[s];
state.template[camelize(s)] = wfSettings.get(s);
}
}
}
},
xPOIAdvertisements: state => {
if (typeof Vue$1.prototype.$wayfinder !== 'undefined' && Array.isArray(Vue$1.prototype.$wayfinder.poiAdvertisements)) {
state.poiAdvertisements = Object.freeze(Vue$1.prototype.$wayfinder.poiAdvertisements.map(p => {
return Object.freeze(p);
}));
}
},
freezePOI: state => p => {
return freezePOI(p);
},
freezeGroup: state => p => {
return freezeGroup(p);
}
},
mutations: {
SET_POI: (state, poi) => {
state.currentPOI = poi;
},
SET_TAB: (state, tab) => {
state.currentTab = tab;
},
SET_GROUP: (state, group) => {
state.currentGroup = Object.freeze(group);
},
SET_SHOW_SEARCH: (state, visible) => {
state.searchVisible = visible;
},
SET_NEW_RESET: state => {
state.reset = state.reset + 1;
state.currentPOI = false;
state.currentGroup = false;
},
SET_LANDSCAPE: (state, landscape) => {
state.landscape = landscape;
},
SET_PORTRAIT: (state, portrait) => {
state.portrait = portrait;
},
SET_MOBILE: (state, mobile) => {
state.mobile = mobile;
},
SET_INACTIVITY_TIME: (state, time) => {
state.maxInActivity = time;
},
SET_CURRENT_FLOOR: (state, floor) => {
state.currentFloor = floor;
},
SET_FILTERED_POIS: (state, pois) => {
state.filteredPOIs = pois;
},
SET_PAGES: (state, pages) => {
state.pages = pages;
},
RESET: (state, pois) => {
state.reset = Date.now();
},
LOADED: (state, val) => {
state.loaded = val;
}
},
actions: {
SET_CURRENT_POI: (context, poi) => {
context.commit('SET_POI', Object.freeze(poi));
},
SET_CURRENT_TAB: (context, tab) => {
context.commit('SET_TAB', tab);
},
SET_CURRENT_GROUP: (context, group) => {
context.commit('SET_GROUP', Object.freeze(group));
},
SHOW_SEARCH: (context, visible) => {
context.commit('SET_SHOW_SEARCH', visible);
},
SET_RESET: context => {
context.commit('SET_NEW_RESET');
},
SET_LANDSCAPE: (context, landscape) => {
context.commit('SET_LANDSCAPE', landscape);
},
SET_PORTRAIT: (context, portrait) => {
context.commit('SET_PORTRAIT', portrait);
},
SET_INACTIVITY_TIME: (context, time) => {
context.commit('SET_INACTIVITY_TIME', time);
},
SET_MOBILE: (context, mobile) => {
context.commit('SET_MOBILE', mobile);
},
SET_CURRENT_FLOOR: (context, floor) => {
context.commit('SET_CURRENT_FLOOR', Object.freeze(floor));
},
SET_FILTERED_POIS: (context, pois) => {
pois = pois.map(p => {
return Object.freeze(p);
});
context.commit('SET_FILTERED_POIS', pois);
},
LOAD_PAGES: context => {
Logistics.getJSON(WayfinderAPI.getURL("pages", "getAll", []), null, function (data) {
if (data && data.data) {
context.commit('SET_PAGES', Object.freeze(data.data));
}
});
},
SET_TEMPLATE_SETTINGS: context => {},
LOADED: (context, val) => {
context.commit('LOADED', val);
}
}
};
let wfStore;
var app = {
init(_store) {
_store.registerModule('wf', store);
wfStore = _store;
},
loadPages() {
wfStore.dispatch('wf/LOAD_PAGES');
}
};
// Import vue components
// install function executed by Vue.use()
const install = function installWayfinderVueComponents(Vue, store, mapType, project, env, apiLocation) {
app.init(store);
Vue.prototype.$wayfinderApp = app;
Vue.prototype.$WF_MAP_TYPE = mapType;
Vue.prototype.$WF_PROJECT = project;
Vue.prototype.$WF_ENV = env ? env : "cdn";
Vue.prototype.$WF_API = apiLocation ? apiLocation : "cdn";
Object.entries(components).forEach(([componentName, component]) => {
Vue.component(componentName, component);
});
};
export { __vue_component__$$ as WFAZMenu, __vue_component__$i as WFAlphabet, __vue_component__$14 as WFApp, __vue_component__$m as WFBanner, __vue_component__$3 as WFBrowser, __vue_component__$P as WFBuildingLogo, __vue_component__$y as WFClock, __vue_component__$w as WFDate, __vue_component__$G as WFFilteredMenu, __vue_component__$Z as WFFlagsMenu, __vue_component__$I as WFFloorsMenu, Group as WFGroup, __vue_component__$R as WFGroupPOIsMenu, __vue_component__$T as WFGroupsMenu, __vue_component__$5 as WFIcon, __vue_component__$X as WFLanguagesMenu, __vue_component__$A as WFLoading, __vue_component__$11 as WFMap, POI as WFPOI, __vue_component__$g as WFPOIAdvertisement, __vue_component__$E as WFPOIAdvertisements, __vue_component__$b as WFPage, __vue_component__$9 as WFPageContent, __vue_component__$k as WFPageMenu, __vue_component__$1 as WFPath2Text, __vue_component__$o as WFScrollableArea, __vue_component__$C as WFSearch, __vue_component__$M as WFShortcutsMenu, SubGroupMenu as WFSubGroupMenu, __vue_component__$s as WFTab, __vue_component__$q as WFTabButtons, __vue_component__$u as WFTabs, __vue_component__$7 as WFTranslate, YAH as WFYAH, __vue_component__$K as WFZoomMenu, install as default, loadWayfinder };