System.register(["src/components/widgets/lively-morph.js"], function (_export, _context) {
  "use strict";

  var Morph;
  return {
    setters: [function (_srcComponentsWidgetsLivelyMorphJs) {
      Morph = _srcComponentsWidgetsLivelyMorphJs.default;
    }],
    execute: function () {
      _recorder_._src_components_widgets_lively_import_js = _recorder_._src_components_widgets_lively_import_js || {};
      _recorder_._src_components_widgets_lively_import_js.Morph = Morph;
      class LivelyImport extends _recorder_._src_components_widgets_lively_import_js.Morph {
        async initialize() {
          var url = this.getAttribute("src");
          if (!url) return;
          var src = await fetch(url).then(r => r.text());
          this.shadowRoot.innerHTML = "" + src;
          var container = lively.query(this, "lively-container");
          if (container) {
            var dir = url.replace(/[^/]*$/, "");
            lively.notify("IMPORT DIR " + dir);
            lively.html.fixLinks(this.shadowRoot.childNodes, dir, path => container.followPath(path));
          }
          await lively.components.loadUnresolved(this.shadowRoot, false, "lively-import", true);
        }
      }

      _export("default", LivelyImport);

      _recorder_._src_components_widgets_lively_import_js.LivelyImport = LivelyImport;
    }
  };
});