"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index_esm = require("../../../min-dash/dist/index.esm.js");
function u(e) {
  return function() {
    if (!window.Promise)
      throw new Error("Promises is not supported in this environment. Please polyfill Promise.");
    var n = arguments.length;
    if (n >= 1 && index_esm.isFunction(arguments[n - 1])) {
      var t = arguments[n - 1];
      console.warn(new Error(
        "Passing callbacks to " + e.name + " is deprecated and will be removed in a future major release. Please switch to promises: https://bpmn.io/l/moving-to-promises.html"
      ));
      var i = Array.prototype.slice.call(arguments, 0, -1);
      e.apply(this, i).then(function(r) {
        var o = Object.keys(r)[0];
        return t(null, r[o]);
      }, function(r) {
        return t(r, r.warnings);
      });
    } else
      return e.apply(this, arguments);
  };
}
var m = "Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472";
function p(e) {
  index_esm.has(e, "di") || Object.defineProperty(e, "di", {
    enumerable: false,
    get: function() {
      throw new Error(m);
    }
  });
}
exports.ensureCompatDiRef = p;
exports.wrapForCompatibility = u;
