/**
 * Copyright 2020 The Pennsylvania State University
 * @license Apache-2.0, see License.md for full text.
 */
import{autorun as e,toJS as s}from"../../../mobx/dist/mobx.esm.js";import{store as r}from"../../haxcms-elements/lib/core/haxcms-site-store.js";import{LrsBridge as t}from"./lrs-bridge.js";class LrsBridgeHaxcms extends t{constructor(){super(),e((()=>{this._locationChanged(s(r.location))}))}static get tag(){return"lrs-bridge-haxcms"}_locationChanged(e){const trimSlash=e=>e.replace(/(^\/|\/$)/,""),s=`${trimSlash(e.baseUrl)}/${trimSlash(e.pathname)}`;this.recordStatement({verb:{id:"viewed"},object:{id:s}})}}customElements.define(LrsBridgeHaxcms.tag,LrsBridgeHaxcms);export{LrsBridgeHaxcms};