function F(l, i) {
  if (l && i.numberingPlan.nationalPrefixForParsing()) {
    var g = new RegExp("^(?:" + i.numberingPlan.nationalPrefixForParsing() + ")"), n = g.exec(l);
    if (n) {
      var r, P, v = n.length - 1, e = v > 0 && n[v];
      if (i.nationalPrefixTransformRule() && e)
        r = l.replace(g, i.nationalPrefixTransformRule()), v > 1 && (P = n[1]);
      else {
        var o = n[0];
        r = l.slice(o.length), e && (P = n[1]);
      }
      var f;
      if (e) {
        var s = l.indexOf(n[1]), a = l.slice(0, s);
        a === i.numberingPlan.nationalPrefix() && (f = i.numberingPlan.nationalPrefix());
      } else
        f = n[0];
      return {
        nationalNumber: r,
        nationalPrefix: f,
        carrierCode: P
      };
    }
  }
  return {
    nationalNumber: l
  };
}
export {
  F as default
};
