{"version":3,"file":"ng-vibe-service-locator.mjs","sources":["../../../../libs/service-locator/src/tools/service-injector/locator.service.ts","../../../../libs/service-locator/src/providers/service-locator-provider.ts","../../../../libs/service-locator/src/ng-vibe-service-locator.ts"],"sourcesContent":["import { Injector, Type } from '@angular/core';\n\nexport function setupServiceLocator(injector: Injector): void {\n  ServiceLocator.injector = injector;\n}\nexport class ServiceLocator {\n  static injector: Injector;\n\n  static getInstance<T>(serviceType: Type<T>): T {\n    return ServiceLocator.injector.get(serviceType);\n  }\n\n  static createService<T>(serviceType: Type<T>): T {\n    const childInjector = Injector.create({\n      providers: [{ provide: serviceType, useClass: serviceType }],\n      parent: ServiceLocator.injector,\n    });\n    return childInjector.get(serviceType);\n  }\n}\n","import { APP_INITIALIZER, Injector, Provider } from '@angular/core';\nimport { provideAnimations } from '@angular/platform-browser/animations';\nimport { setupServiceLocator } from '../tools';\n\nexport function provideNgVibeServiceLocator(): Provider[] {\n  return [\n    provideAnimations(),\n    {\n      provide: APP_INITIALIZER,\n      useFactory: (injector: Injector) => () => setupServiceLocator(injector),\n      deps: [Injector],\n      multi: true,\n    },\n  ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEM,SAAU,mBAAmB,CAAC,QAAkB,EAAA;AACpD,IAAA,cAAc,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACrC,CAAC;MACY,cAAc,CAAA;IAGzB,OAAO,WAAW,CAAI,WAAoB,EAAA;QACxC,OAAO,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;KACjD;IAED,OAAO,aAAa,CAAI,WAAoB,EAAA;AAC1C,QAAA,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC;YACpC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;YAC5D,MAAM,EAAE,cAAc,CAAC,QAAQ;AAChC,SAAA,CAAC,CAAC;AACH,QAAA,OAAO,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;KACvC;AACF;;SCfe,2BAA2B,GAAA;IACzC,OAAO;AACL,QAAA,iBAAiB,EAAE;AACnB,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;AACxB,YAAA,UAAU,EAAE,CAAC,QAAkB,KAAK,MAAM,mBAAmB,CAAC,QAAQ,CAAC;YACvE,IAAI,EAAE,CAAC,QAAQ,CAAC;AAChB,YAAA,KAAK,EAAE,IAAI;AACZ,SAAA;KACF,CAAC;AACJ;;ACdA;;AAEG;;;;"}