@story-protocol/ipkit 0.4.0-beta.11 → 0.4.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,2 @@
1
- export * from "./utils";
2
- export * from "./functions/convertLicenseTermObject";
3
1
  export * from "./api";
4
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,sCAAsC,CAAA;AACpD,cAAc,OAAO,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
@@ -1,12 +1,4 @@
1
- import { PilFlavor } from "@/types/assets";
2
- import { PILTerms } from "@/types/openapi";
3
1
  import { type ClassValue } from "clsx";
4
2
  export declare function cn(...inputs: ClassValue[]): string;
5
3
  export declare function shortenAddress(address: string, length?: number): string;
6
- export declare function camelize(str: string): string;
7
- export declare function getPilFlavorByLicenseTerms(pilTerms: PILTerms): PilFlavor;
8
- export declare function getImageUrlFromIpfsUrl(ipfsUrl: string): Promise<string>;
9
- export declare function convertIpfsUriToUrl(ipfsUri: string): string;
10
- export declare function getMetadataFromIpfs(ipfsUrl: string): Promise<any>;
11
- export declare function fetchLicenseOffChainData(uri: string): Promise<any>;
12
4
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAQ5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAYlE;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,UAKnC;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAiBxE;AAED,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,mBAI3D;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAO3D;AAED,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,MAAM,gBAGxD;AAED,wBAAsB,wBAAwB,CAAC,GAAG,EAAE,MAAM,gBAazD"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAQ5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAYlE"}
@@ -1,25 +1,18 @@
1
1
  import { ApiClient } from "@/lib/api/apiClient";
2
2
  import { ChainConfig } from "@/types/chains";
3
3
  import React from "react";
4
- export type Mode = "light" | "dark" | undefined;
5
- export type Theme = "default" | "story" | string;
6
4
  export interface IpKitProviderOptions {
7
5
  apiKey: string;
8
6
  appId?: string;
9
7
  children: React.ReactNode;
10
8
  isTestnet?: boolean;
11
- mode?: Mode;
12
- theme?: Theme;
13
9
  }
14
- export declare const IpKitProvider: ({ apiKey, appId, children, isTestnet, mode, theme, }: IpKitProviderOptions) => React.JSX.Element;
10
+ export declare const IpKitProvider: ({ apiKey, appId, children, isTestnet, }: IpKitProviderOptions) => React.JSX.Element;
15
11
  export declare const useIpKit: () => {
16
12
  apiBaseUrl: string;
17
13
  apiClient: ApiClient;
18
14
  apiKey: string;
19
15
  appId: string | undefined;
20
16
  chain: ChainConfig;
21
- mode: Mode;
22
- theme: Theme;
23
- themeClass: string;
24
17
  };
25
18
  //# sourceMappingURL=IpKitProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IpKitProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/IpKitProvider/IpKitProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAmB,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAE,WAAW,EAAyB,MAAM,gBAAgB,CAAA;AACnE,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,MAAM,MAAM,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;AAC/C,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AAEhD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,KAAK,CAAA;CAKd;AAaD,eAAO,MAAM,aAAa,yDAOvB,oBAAoB,sBA4BtB,CAAA;AAED,eAAO,MAAM,QAAQ;gBA/CP,MAAM;;YAEV,MAAM;WACP,MAAM,GAAG,SAAS;WAClB,WAAW;UACZ,IAAI;WACH,KAAK;gBACA,MAAM;CA8CnB,CAAA"}
1
+ {"version":3,"file":"IpKitProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/IpKitProvider/IpKitProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAmB,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAE,WAAW,EAAyB,MAAM,gBAAgB,CAAA;AACnE,OAAO,KAAkB,MAAM,OAAO,CAAA;AAKtC,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,OAAO,CAAA;CAQpB;AAaD,eAAO,MAAM,aAAa,4CAOvB,oBAAoB,sBA4BtB,CAAA;AAED,eAAO,MAAM,QAAQ;gBA/CP,MAAM;;YAEV,MAAM;WACP,MAAM,GAAG,SAAS;WAClB,WAAW;CAiDnB,CAAA"}
@@ -1,10 +1,7 @@
1
1
  import React, { FC } from "react";
2
2
  import "../../../global.css";
3
- import { Theme } from "../IpKitProvider";
4
3
  declare const Example: FC<{
5
4
  isTestnet: boolean;
6
- theme: Theme;
7
- mode: "auto" | "light" | "dark";
8
5
  children?: React.ReactNode;
9
6
  }>;
10
7
  export default Example;
@@ -1 +1 @@
1
- {"version":3,"file":"Example.d.ts","sourceRoot":"","sources":["../../../../src/providers/IpKitProvider/__docs__/Example.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,qBAAqB,CAAA;AAC5B,OAAO,EAAiB,KAAK,EAAY,MAAM,kBAAkB,CAAA;AAKjE,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,KAAK,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAWA,CAAA;AA+BD,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"Example.d.ts","sourceRoot":"","sources":["../../../../src/providers/IpKitProvider/__docs__/Example.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,qBAAqB,CAAA;AAM5B,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAA;IAElB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAMA,CAAA;AA+BD,eAAe,OAAO,CAAA"}
@@ -4,8 +4,6 @@ declare const meta: {
4
4
  title: string;
5
5
  component: import("react").FC<{
6
6
  isTestnet: boolean;
7
- theme: string;
8
- mode: "auto" | "light" | "dark";
9
7
  children?: import("react").ReactNode;
10
8
  }>;
11
9
  parameters: {
@@ -16,19 +14,9 @@ declare const meta: {
16
14
  isTestnet: {
17
15
  control: "boolean";
18
16
  };
19
- theme: {
20
- control: "select";
21
- options: string[];
22
- };
23
- mode: {
24
- control: "select";
25
- options: string[];
26
- };
27
17
  };
28
18
  args: {
29
19
  isTestnet: true;
30
- theme: string;
31
- mode: "auto";
32
20
  };
33
21
  };
34
22
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"IpKitProvider.stories.d.ts","sourceRoot":"","sources":["../../../../src/providers/IpKitProvider/__docs__/IpKitProvider.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAItD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBsB,CAAA;AAEhC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAA"}
1
+ {"version":3,"file":"IpKitProvider.stories.d.ts","sourceRoot":"","sources":["../../../../src/providers/IpKitProvider/__docs__/IpKitProvider.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAItD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;CAiBsB,CAAA;AAEhC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAA"}
@@ -1,5 +1,4 @@
1
1
  import { Address } from 'viem';
2
- import { ClassValue } from 'clsx';
3
2
  import * as openapi_fetch from 'openapi-fetch';
4
3
  import { Client } from 'openapi-fetch';
5
4
 
@@ -1188,7 +1187,7 @@ type IPSearchResult = components["schemas"]["IPSearchResult"];
1188
1187
  type Collection = components["schemas"]["EnrichedCollection"];
1189
1188
  type CollectionMetadata = components["schemas"]["ContractMetadataByAddressResponse"];
1190
1189
  type License = components["schemas"]["License"];
1191
- type LicenseTerms$1 = components["schemas"]["LicenseTerms"];
1190
+ type LicenseTerms = components["schemas"]["LicenseTerms"];
1192
1191
  type LicenseToken = components["schemas"]["LicenseToken"];
1193
1192
  type LicensingConfig = components["schemas"]["LicensingConfig"];
1194
1193
  type NFTMetadata = components["schemas"]["NFTMetadata"];
@@ -1196,7 +1195,7 @@ type InfringementStatus = components["schemas"]["InfringementStatus"];
1196
1195
  type ModerationStatus = components["schemas"]["ModerationStatus"];
1197
1196
  type ContractMetadata = components["schemas"]["ContractMetadata"];
1198
1197
  type Dispute = components["schemas"]["Dispute"];
1199
- type PILTerms = LicenseTerms$1;
1198
+ type PILTerms = LicenseTerms;
1200
1199
  type TransactionEventType = "IPRegistered" | "LicenseTermsAttached" | "DerivativeRegistered" | "DisputeRaised" | "DisputeResolved" | "DisputeCancelled" | "DisputeJudgementSet" | "RoyaltyPaid";
1201
1200
 
1202
1201
  declare enum PIL_FLAVOR {
@@ -1287,18 +1286,6 @@ declare enum IPKIT_SUPPORTED_CHAIN {
1287
1286
  }
1288
1287
  declare const WRAPPED_IP: ERC20Token;
1289
1288
 
1290
- declare function cn(...inputs: ClassValue[]): string;
1291
- declare function shortenAddress(address: string, length?: number): string;
1292
- declare function camelize(str: string): string;
1293
- declare function getPilFlavorByLicenseTerms(pilTerms: PILTerms): PilFlavor;
1294
- declare function getImageUrlFromIpfsUrl(ipfsUrl: string): Promise<string>;
1295
- declare function convertIpfsUriToUrl(ipfsUri: string): string;
1296
- declare function getMetadataFromIpfs(ipfsUrl: string): Promise<any>;
1297
- declare function fetchLicenseOffChainData(uri: string): Promise<any>;
1298
-
1299
- type LicenseTerms = Partial<PILTerms>;
1300
- declare function convertLicenseTermObject(licenseTerms: Trait[]): LicenseTerms;
1301
-
1302
1289
  type ApiClient = Client<paths>;
1303
1290
  declare const createApiClient: (baseUrl: string) => Client<paths>;
1304
1291
  declare const stagingClient: Client<paths, `${string}/${string}`>;
@@ -3865,4 +3852,4 @@ declare enum API_URL {
3865
3852
  PRODUCTION = "https://api.storyapis.com/api/v4"
3866
3853
  }
3867
3854
 
3868
- export { API_URL, type ApiClient, CHAINID_TO_CHAINNAME, CHAINS, type ChainConfig, type Collection, type CollectionMetadata, type CollectionsOptions, type CollectionsResponse, type ContractMetadata, type Creator, type Dispute, type DisputeResponse, type DisputesOptions, type DisputesResponse, type ERC20Token, type GetCollectionsOptions, type GetDisputeOptions, type GetDisputesOptions, type GetIpAssetEdgesOptions, type GetIpAssetsOptions, type GetLicenseTokensOptions, type GetSearchOptions, type GetTransactionsOptions, type IPAsset, type IPAssetEdge, IPKIT_SUPPORTED_CHAIN, type IPMetadata, type IPSearchResult, type IPTransaction, type InfringementStatus, type IpAssetEdgesOptions, type IpAssetEdgesResponse, type IpAssetsOptions, type IpAssetsResponse, type IpQueryOptions, type License, type LicenseOffChainData, type LicenseTerms$1 as LicenseTerms, type LicenseTermsWithOffChainData, type LicenseToken, type LicenseTokensOptions, type LicenseTokensResponse, type LicenseWithOffChainData, type LicensingConfig, type ModerationStatus, type NFTMetadata, type PILTerms, type PILTermsWithOffChainData, PIL_FLAVOR, type PilFlavor, STORY_AENEID, STORY_MAINNET, type SearchOptions, type SearchResponse, type SocialMedia, type SupportedChainConfig, type Trait, type TransactionEventType, type TransactionsOptions, type TransactionsResponse, WRAPPED_IP, camelize, cn, type components, convertIpfsUriToUrl, convertLicenseTermObject, createApiClient, fetchLicenseOffChainData, getCollections, getDispute, getDisputes, getImageUrlFromIpfsUrl, getIpAssetEdges, getIpAssets, getLicenseTokens, getMetadataFromIpfs, getPilFlavorByLicenseTerms, getSearch, getTransactions, type operations, type paths, prodClient, shortenAddress, stagingClient };
3855
+ export { API_URL, type ApiClient, CHAINID_TO_CHAINNAME, CHAINS, type ChainConfig, type Collection, type CollectionMetadata, type CollectionsOptions, type CollectionsResponse, type ContractMetadata, type Creator, type Dispute, type DisputeResponse, type DisputesOptions, type DisputesResponse, type ERC20Token, type GetCollectionsOptions, type GetDisputeOptions, type GetDisputesOptions, type GetIpAssetEdgesOptions, type GetIpAssetsOptions, type GetLicenseTokensOptions, type GetSearchOptions, type GetTransactionsOptions, type IPAsset, type IPAssetEdge, IPKIT_SUPPORTED_CHAIN, type IPMetadata, type IPSearchResult, type IPTransaction, type InfringementStatus, type IpAssetEdgesOptions, type IpAssetEdgesResponse, type IpAssetsOptions, type IpAssetsResponse, type IpQueryOptions, type License, type LicenseOffChainData, type LicenseTerms, type LicenseTermsWithOffChainData, type LicenseToken, type LicenseTokensOptions, type LicenseTokensResponse, type LicenseWithOffChainData, type LicensingConfig, type ModerationStatus, type NFTMetadata, type PILTerms, type PILTermsWithOffChainData, PIL_FLAVOR, type PilFlavor, STORY_AENEID, STORY_MAINNET, type SearchOptions, type SearchResponse, type SocialMedia, type SupportedChainConfig, type Trait, type TransactionEventType, type TransactionsOptions, type TransactionsResponse, WRAPPED_IP, type components, createApiClient, getCollections, getDispute, getDisputes, getIpAssetEdges, getIpAssets, getLicenseTokens, getSearch, getTransactions, type operations, type paths, prodClient, stagingClient };
@@ -1,2 +1,2 @@
1
- "use strict";var e,r;exports.PIL_FLAVOR=void 0,(e=exports.PIL_FLAVOR||(exports.PIL_FLAVOR={})).NON_COMMERCIAL_SOCIAL_REMIXING="Non-Commercial Social Remixing",e.COMMERCIAL_USE="Commercial Use",e.COMMERCIAL_REMIX="Commercial Remix",e.CUSTOM="Custom",e.OPEN_USE="Open Use",exports.IPKIT_SUPPORTED_CHAIN=void 0,(r=exports.IPKIT_SUPPORTED_CHAIN||(exports.IPKIT_SUPPORTED_CHAIN={})).AENEID_TESTNET="story-aeneid",r.STORY_MAINNET="story";var t={name:"Wrapped IP",address:"0x1514000000000000000000000000000000000000",symbol:"WIP"},o=function(){return o=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},o.apply(this,arguments)};function n(e,r,t,o){return new(t||(t=Promise))((function(n,s){function i(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var r;e.done?n(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(i,a)}l((o=o.apply(e,r||[])).next())}))}function s(e,r){var t,o,n,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(t=1,o&&(n=2&a[0]?o.return:a[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;switch(o=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(n=s.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){s.label=a[1];break}if(6===a[0]&&s.label<n[1]){s.label=n[1],n=a;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(a);break}n[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],o=0}finally{t=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function i(e){var r,t,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(t=i(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}"function"==typeof SuppressedError&&SuppressedError;const a="-";function l(e){const r=function(e){const{theme:r,prefix:t}=e,o={nextPart:new Map,validators:[]},n=function(e,r){if(!r)return e;return e.map((([e,t])=>[e,t.map((e=>"string"==typeof e?r+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,t])=>[r+e,t]))):e))]))}(Object.entries(e.classGroups),t);return n.forEach((([e,t])=>{p(t,o,e,r)})),o}(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:function(e){const t=e.split(a);return""===t[0]&&1!==t.length&&t.shift(),c(t,r)||function(e){if(d.test(e)){const r=d.exec(e)[1],t=r?.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}}(e)},getConflictingClassGroupIds:function(e,r){const n=t[e]||[];return r&&o[e]?[...n,...o[e]]:n}}}function c(e,r){if(0===e.length)return r.classGroupId;const t=e[0],o=r.nextPart.get(t),n=o?c(e.slice(1),o):void 0;if(n)return n;if(0===r.validators.length)return;const s=e.join(a);return r.validators.find((({validator:e})=>e(s)))?.classGroupId}const d=/^\[(.+)\]$/;function p(e,r,t,o){e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return e.isThemeGetter?void p(e(o),r,t,o):void r.validators.push({validator:e,classGroupId:t});Object.entries(e).forEach((([e,n])=>{p(n,u(r,e),t,o)}))}else{(""===e?r:u(r,e)).classGroupId=t}}))}function u(e,r){let t=e;return r.split(a).forEach((e=>{t.nextPart.has(e)||t.nextPart.set(e,{nextPart:new Map,validators:[]}),t=t.nextPart.get(e)})),t}function f(e){if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,o=new Map;function n(n,s){t.set(n,s),r++,r>e&&(r=0,o=t,t=new Map)}return{get(e){let r=t.get(e);return void 0!==r?r:void 0!==(r=o.get(e))?(n(e,r),r):void 0},set(e,r){t.has(e)?t.set(e,r):n(e,r)}}}const b="!";function h(e){const r=e.separator,t=1===r.length,o=r[0],n=r.length;return function(e){const s=[];let i,a=0,l=0;for(let c=0;c<e.length;c++){let d=e[c];if(0===a){if(d===o&&(t||e.slice(c,c+n)===r)){s.push(e.slice(l,c)),l=c+n;continue}if("/"===d){i=c;continue}}"["===d?a++:"]"===d&&a--}const c=0===s.length?e:e.substring(l),d=c.startsWith(b);return{modifiers:s,hasImportantModifier:d,baseClassName:d?c.substring(1):c,maybePostfixModifierPosition:i&&i>l?i-l:void 0}}}const m=/\s+/;function g(){let e,r,t=0,o="";for(;t<arguments.length;)(e=arguments[t++])&&(r=y(e))&&(o&&(o+=" "),o+=r);return o}function y(e){if("string"==typeof e)return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=y(e[o]))&&(t&&(t+=" "),t+=r);return t}function v(e,...r){let t,o,n,s=function(a){const c=r.reduce(((e,r)=>r(e)),e());return t=function(e){return{cache:f(e.cacheSize),splitModifiers:h(e),...l(e)}}(c),o=t.cache.get,n=t.cache.set,s=i,i(a)};function i(e){const r=o(e);if(r)return r;const s=function(e,r){const{splitModifiers:t,getClassGroupId:o,getConflictingClassGroupIds:n}=r,s=new Set;return e.trim().split(m).map((e=>{const{modifiers:r,hasImportantModifier:n,baseClassName:s,maybePostfixModifierPosition:i}=t(e);let a=o(i?s.substring(0,i):s),l=Boolean(i);if(!a){if(!i)return{isTailwindClass:!1,originalClassName:e};if(a=o(s),!a)return{isTailwindClass:!1,originalClassName:e};l=!1}const c=function(e){if(e.length<=1)return e;const r=[];let t=[];return e.forEach((e=>{"["===e[0]?(r.push(...t.sort(),e),t=[]):t.push(e)})),r.push(...t.sort()),r}(r).join(":");return{isTailwindClass:!0,modifierId:n?c+b:c,classGroupId:a,originalClassName:e,hasPostfixModifier:l}})).reverse().filter((e=>{if(!e.isTailwindClass)return!0;const{modifierId:r,classGroupId:t,hasPostfixModifier:o}=e,i=r+t;return!s.has(i)&&(s.add(i),n(t,o).forEach((e=>s.add(r+e))),!0)})).reverse().map((e=>e.originalClassName)).join(" ")}(e,t);return n(e,s),s}return function(){return s(g.apply(null,arguments))}}function x(e){const r=r=>r[e]||[];return r.isThemeGetter=!0,r}const w=/^\[(?:([a-z-]+):)?(.+)\]$/i,I=/^\d+\/\d+$/,C=new Set(["px","full","screen"]),R=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,k=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,A=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,E=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,P=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function O(e){return S(e)||C.has(e)||I.test(e)}function j(e){return H(e,"length",W)}function S(e){return Boolean(e)&&!Number.isNaN(Number(e))}function T(e){return H(e,"number",S)}function z(e){return Boolean(e)&&Number.isInteger(Number(e))}function N(e){return e.endsWith("%")&&S(e.slice(0,-1))}function U(e){return w.test(e)}function _(e){return R.test(e)}const M=new Set(["length","size","percentage"]);function L(e){return H(e,M,F)}function $(e){return H(e,"position",F)}const q=new Set(["image","url"]);function G(e){return H(e,q,V)}function D(e){return H(e,"",B)}function K(){return!0}function H(e,r,t){const o=w.exec(e);return!!o&&(o[1]?"string"==typeof r?o[1]===r:r.has(o[1]):t(o[2]))}function W(e){return k.test(e)&&!A.test(e)}function F(){return!1}function B(e){return E.test(e)}function V(e){return P.test(e)}function X(){const e=x("colors"),r=x("spacing"),t=x("blur"),o=x("brightness"),n=x("borderColor"),s=x("borderRadius"),i=x("borderSpacing"),a=x("borderWidth"),l=x("contrast"),c=x("grayscale"),d=x("hueRotate"),p=x("invert"),u=x("gap"),f=x("gradientColorStops"),b=x("gradientColorStopPositions"),h=x("inset"),m=x("margin"),g=x("opacity"),y=x("padding"),v=x("saturate"),w=x("scale"),I=x("sepia"),C=x("skew"),R=x("space"),k=x("translate"),A=()=>["auto",U,r],E=()=>[U,r],P=()=>["",O,j],M=()=>["auto",S,U],q=()=>["","0",U],H=()=>[S,T],W=()=>[S,U];return{cacheSize:500,separator:":",theme:{colors:[K],spacing:[O,j],blur:["none","",_,U],brightness:H(),borderColor:[e],borderRadius:["none","","full",_,U],borderSpacing:E(),borderWidth:P(),contrast:H(),grayscale:q(),hueRotate:W(),invert:q(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[N,j],inset:A(),margin:A(),opacity:H(),padding:E(),saturate:H(),scale:H(),sepia:q(),skew:W(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",U]}],container:["container"],columns:[{columns:[_]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",U]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",z,U]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",U]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",z,U]}],"grid-cols":[{"grid-cols":[K]}],"col-start-end":[{col:["auto",{span:["full",z,U]},U]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[K]}],"row-start-end":[{row:["auto",{span:[z,U]},U]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",U]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",U]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",U,r]}],"min-w":[{"min-w":[U,r,"min","max","fit"]}],"max-w":[{"max-w":[U,r,"none","full","min","max","fit","prose",{screen:[_]},_]}],h:[{h:[U,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[U,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[U,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[U,r,"auto","min","max","fit"]}],"font-size":[{text:["base",_,j]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",T]}],"font-family":[{font:[K]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",U]}],"line-clamp":[{"line-clamp":["none",S,T]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",O,U]}],"list-image":[{"list-image":["none",U]}],"list-style-type":[{list:["none","disc","decimal",U]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",O,j]}],"underline-offset":[{"underline-offset":["auto",O,U]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",$]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",L]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},G]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[O,U]}],"outline-w":[{outline:[O,j]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[O,j]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_,D]}],"shadow-color":[{shadow:[K]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",_,U]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[p]}],saturate:[{saturate:[v]}],sepia:[{sepia:[I]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",U]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",U]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",U]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[z,U]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",U]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",U]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",U]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[O,j,T]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function Y(e,r,t){void 0!==t&&(e[r]=t)}function J(e,r){if(r)for(const t in r)Y(e,t,r[t])}function Z(e,r){if(r)for(const t in r){const o=r[t];void 0!==o&&(e[t]=(e[t]||[]).concat(o))}}var Q,ee=function(e,...r){return"function"==typeof e?v(X,e,...r):v((()=>function(e,{cacheSize:r,prefix:t,separator:o,extend:n={},override:s={}}){Y(e,"cacheSize",r),Y(e,"prefix",t),Y(e,"separator",o);for(const r in s)J(e[r],s[r]);for(const r in n)Z(e[r],n[r]);return e}(X(),e)),...r)}({prefix:"sk-"});function re(e){return e.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g,(function(e,r){return 0==+e?"":0===r?e.toLowerCase():e.toUpperCase()}))}function te(e){if(!e.startsWith("ipfs://"))return e;var r=e.slice(7);return"https://ipfs.io/ipfs/".concat(r)}function oe(e){return n(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,fetch(e).then((function(e){return e.json()}))];case 1:return[2,r.sent()]}}))}))}exports.API_URL=void 0,(Q=exports.API_URL||(exports.API_URL={})).STAGING="https://staging-api.storyprotocol.net/api/v4",Q.PRODUCTION="https://api.storyapis.com/api/v4";const ne=/\{[^{}]+\}/g;function se(e){let{baseUrl:r="",Request:t=globalThis.Request,fetch:o=globalThis.fetch,querySerializer:n,bodySerializer:s,headers:i,requestInitExt:a,...l}={...e};a="object"==typeof process&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici?a:void 0,r=ue(r);const c=[];async function d(e,d){const{baseUrl:p,fetch:u=o,Request:f=t,headers:b,params:h={},parseAs:m="json",querySerializer:g,bodySerializer:y=s??de,body:v,...x}=d||{};p&&(r=ue(p));let w="function"==typeof n?n:ce(n);g&&(w="function"==typeof g?g:ce({..."object"==typeof n?n:{},...g}));const I=void 0===v?void 0:y(v),C=void 0===I||I instanceof FormData?{}:{"Content-Type":"application/json"},R={redirect:"follow",...l,...x,body:I,headers:pe(C,i,b,h.header)};let k,A,E,P=new t(function(e,r){let t=`${r.baseUrl}${e}`;r.params?.path&&(t=function(e,r){let t=e;for(const o of e.match(ne)??[]){let e=o.substring(1,o.length-1),n=!1,s="simple";if(e.endsWith("*")&&(n=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(s="label",e=e.substring(1)):e.startsWith(";")&&(s="matrix",e=e.substring(1)),!r||void 0===r[e]||null===r[e])continue;const i=r[e];Array.isArray(i)?t=t.replace(o,le(e,i,{style:s,explode:n})):t="object"!=typeof i?"matrix"!==s?t.replace(o,"label"===s?`.${encodeURIComponent(i)}`:encodeURIComponent(i)):t.replace(o,`;${ie(e,i)}`):t.replace(o,ae(e,i,{style:s,explode:n}))}return t}(t,r.params.path));let o=r.querySerializer(r.params.query??{});o.startsWith("?")&&(o=o.substring(1));o&&(t+=`?${o}`);return t}(e,{baseUrl:r,params:h,querySerializer:w}),R);for(const e in x)e in P||(P[e]=x[e]);if(c.length){k=Math.random().toString(36).slice(2,11),A=Object.freeze({baseUrl:r,fetch:u,parseAs:m,querySerializer:w,bodySerializer:y});for(const r of c)if(r&&"object"==typeof r&&"function"==typeof r.onRequest){const o=await r.onRequest({request:P,schemaPath:e,params:h,options:A,id:k});if(o){if(!(o instanceof t)){if(o instanceof Response){E=o;break}throw new Error("onRequest: must return new Request() or Response() when modifying the request")}P=o}}}if(!E){try{E=await u(P,a)}catch(O){let r=O;if(c.length)for(let t=c.length-1;t>=0;t--){const o=c[t];if(o&&"object"==typeof o&&"function"==typeof o.onError){const t=await o.onError({request:P,error:r,schemaPath:e,params:h,options:A,id:k});if(t){if(t instanceof Response){r=void 0,E=t;break}if(t instanceof Error){r=t;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(r)throw r}if(c.length)for(let r=c.length-1;r>=0;r--){const t=c[r];if(t&&"object"==typeof t&&"function"==typeof t.onResponse){const r=await t.onResponse({request:P,response:E,schemaPath:e,params:h,options:A,id:k});if(r){if(!(r instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");E=r}}}}if(204===E.status||"0"===E.headers.get("Content-Length"))return E.ok?{data:void 0,response:E}:{error:void 0,response:E};if(E.ok)return"stream"===m?{data:E.body,response:E}:{data:await E[m](),response:E};let O=await E.text();try{O=JSON.parse(O)}catch{}return{error:O,response:E}}return{request:(e,r,t)=>d(r,{...t,method:e.toUpperCase()}),GET:(e,r)=>d(e,{...r,method:"GET"}),PUT:(e,r)=>d(e,{...r,method:"PUT"}),POST:(e,r)=>d(e,{...r,method:"POST"}),DELETE:(e,r)=>d(e,{...r,method:"DELETE"}),OPTIONS:(e,r)=>d(e,{...r,method:"OPTIONS"}),HEAD:(e,r)=>d(e,{...r,method:"HEAD"}),PATCH:(e,r)=>d(e,{...r,method:"PATCH"}),TRACE:(e,r)=>d(e,{...r,method:"TRACE"}),use(...e){for(const r of e)if(r){if("object"!=typeof r||!("onRequest"in r||"onResponse"in r||"onError"in r))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");c.push(r)}},eject(...e){for(const r of e){const e=c.indexOf(r);-1!==e&&c.splice(e,1)}}}}function ie(e,r,t){if(null==r)return"";if("object"==typeof r)throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${!0===t?.allowReserved?r:encodeURIComponent(r)}`}function ae(e,r,t){if(!r||"object"!=typeof r)return"";const o=[],n={simple:",",label:".",matrix:";"}[t.style]||"&";if("deepObject"!==t.style&&!1===t.explode){for(const e in r)o.push(e,!0===t.allowReserved?r[e]:encodeURIComponent(r[e]));const n=o.join(",");switch(t.style){case"form":return`${e}=${n}`;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return n}}for(const n in r){const s="deepObject"===t.style?`${e}[${n}]`:n;o.push(ie(s,r[n],t))}const s=o.join(n);return"label"===t.style||"matrix"===t.style?`${n}${s}`:s}function le(e,r,t){if(!Array.isArray(r))return"";if(!1===t.explode){const o={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[t.style]||",",n=(!0===t.allowReserved?r:r.map((e=>encodeURIComponent(e)))).join(o);switch(t.style){case"simple":return n;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return`${e}=${n}`}}const o={simple:",",label:".",matrix:";"}[t.style]||"&",n=[];for(const o of r)"simple"===t.style||"label"===t.style?n.push(!0===t.allowReserved?o:encodeURIComponent(o)):n.push(ie(e,o,t));return"label"===t.style||"matrix"===t.style?`${o}${n.join(o)}`:n.join(o)}function ce(e){return function(r){const t=[];if(r&&"object"==typeof r)for(const o in r){const n=r[o];if(null!=n)if(Array.isArray(n)){if(0===n.length)continue;t.push(le(o,n,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}))}else"object"!=typeof n?t.push(ie(o,n,e)):t.push(ae(o,n,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}))}return t.join("&")}}function de(e){return e instanceof FormData?e:JSON.stringify(e)}function pe(...e){const r=new Headers;for(const t of e){if(!t||"object"!=typeof t)continue;const e=t instanceof Headers?t.entries():Object.entries(t);for(const[t,o]of e)if(null===o)r.delete(t);else if(Array.isArray(o))for(const e of o)r.append(t,e);else void 0!==o&&r.set(t,o)}return r}function ue(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var fe,be={onRequest:function(e){return n(this,arguments,void 0,(function(e){var r=e.request;return s(this,(function(e){return r.headers.set("Content-Type","application/json"),[2,r]}))}))}},he=function(e){var r=se({baseUrl:e});return r.use(be),r},me=he(exports.API_URL.STAGING),ge=he(exports.API_URL.PRODUCTION);function ye(e){var r=e.apiClient,t=e.path,n=e.apiKey,s=e.body,i=e.additionalHeaders,a={params:{header:o({"X-Api-Key":n},i)}},l={body:s||{}};return r.POST(t,o(o({},a),l))}var ve={id:1315,name:"story-aeneid",apiVersion:"v3",displayName:"Story Aeneid Testnet",rpcUrl:"https://aeneid.storyrpc.io/",blockExplorerUrl:"https://aeneid.storyscan.io",protocolExplorerUrl:"https://aeneid.explorer.story.foundation",defaultCurrency:t},xe={id:1514,name:"story",apiVersion:"v3",displayName:"Story Mainnet",rpcUrl:"https://mainnet.storyrpc.io",blockExplorerUrl:"https://storyscan.io",protocolExplorerUrl:"https://explorer.story.foundation",defaultCurrency:t},we=((fe={})[ve.name]=ve,fe[xe.name]=xe,fe);exports.CHAINID_TO_CHAINNAME={1315:"story-aeneid",1514:"story"},exports.CHAINS=we,exports.STORY_AENEID=ve,exports.STORY_MAINNET=xe,exports.WRAPPED_IP=t,exports.camelize=re,exports.cn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return ee(function(){for(var e,r,t=0,o="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=i(e))&&(o&&(o+=" "),o+=r);return o}(e))},exports.convertIpfsUriToUrl=te,exports.convertLicenseTermObject=function(e){return e.reduce((function(e,r){return e[re(r.trait_type)]="true"===r.value||"false"!==r.value&&r.value,e}),{})},exports.createApiClient=he,exports.fetchLicenseOffChainData=function(e){return n(this,void 0,void 0,(function(){var r;return s(this,(function(t){switch(t.label){case 0:return""===e?[2]:(r=e,e.startsWith("https://github.com/")&&(r=e.replace("https://github.com/","https://raw.githubusercontent.com/").replace("/blob/","/")),[4,oe(te(r))]);case 1:return[2,t.sent()]}}))}))},exports.getCollections=function(e){var r=e.collectionAddresses,t=e.apiClient,n=e.options,s=e.apiKey;return ye({apiClient:t,path:"/collections",body:o(o({orderBy:"updatedAt",orderDirection:"desc"},n),{where:o(o({},null==n?void 0:n.where),r?{collectionAddresses:r}:{})}),apiKey:s})},exports.getDispute=function(e){return function(e){var r=e.apiClient,t=e.path,n=e.apiKey,s=e.pathParams,i=e.additionalHeaders,a={params:{path:s,header:o({"X-Api-Key":n},i)}};return r.GET(t,a)}({apiClient:e.apiClient,path:"/disputes/{disputeId}",pathParams:{disputeId:e.disputeId},apiKey:e.apiKey})},exports.getDisputes=function(e){var r=e.apiClient,t=e.initiator,n=e.targetIpId,s=e.options,i=e.apiKey;return ye({apiClient:r,path:"/disputes",body:o(o({orderBy:"blockNumber",orderDirection:"desc"},s),{where:o(o(o({},null==s?void 0:s.where),t?{initiator:t}:{}),n?{targetIpId:n}:{})}),apiKey:i})},exports.getImageUrlFromIpfsUrl=function(e){return n(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,fetch(e).then((function(e){return e.json()}))];case 1:return[2,te(r.sent().image)]}}))}))},exports.getIpAssetEdges=function(e){var r=e.apiClient,t=e.ipId,n=e.parentIpId,s=e.options,i=e.apiKey;return ye({apiClient:r,path:"/assets/edges",body:o(o({orderBy:"blockNumber",orderDirection:"desc"},s),{where:o(o(o({},null==s?void 0:s.where),t?{childIpId:t}:{}),n?{parentIpId:n}:{})}),apiKey:i})},exports.getIpAssets=function(e){var r=e.apiClient,t=e.ownerAddress,n=e.tokenContract,s=e.includeLicenses,i=e.moderated,a=e.ipIds,l=e.options,c=e.apiKey;return ye({apiClient:r,path:"/assets",body:o(o({orderBy:"blockNumber",orderDirection:"desc",includeLicenses:null!=s&&s,moderated:null!=i&&i},l),{where:o(o(o(o({},null==l?void 0:l.where),a?{ipIds:a}:{}),t?{ownerAddress:t}:{}),n?{tokenContract:n}:{})}),apiKey:c})},exports.getLicenseTokens=function(e){var r=e.apiClient,t=e.ownerAddress,n=e.licensorIpId,s=e.options,i=e.apiKey;return ye({apiClient:r,path:"/licenses/tokens",body:o(o({orderBy:"blockNumber",orderDirection:"desc"},s),{where:o(o(o({},null==s?void 0:s.where),(null==t?void 0:t.length)?{ownerAddress:t}:{}),(null==n?void 0:n.length)?{licensorIpId:n}:{})}),apiKey:i})},exports.getMetadataFromIpfs=oe,exports.getPilFlavorByLicenseTerms=function(e){var r=e.commercialUse,t=e.derivativesAllowed,o=e.derivativesAttribution,n=e.commercialRevShare;return!r&&t?o?exports.PIL_FLAVOR.NON_COMMERCIAL_SOCIAL_REMIXING:exports.PIL_FLAVOR.OPEN_USE:!r||t||o||0!==n?r&&t&&o&&n&&n>0?exports.PIL_FLAVOR.COMMERCIAL_REMIX:exports.PIL_FLAVOR.CUSTOM:exports.PIL_FLAVOR.COMMERCIAL_USE},exports.getSearch=function(e){var r=e.apiClient,t=e.query,n=e.mediaType,s=e.options,i=e.apiKey;return ye({apiClient:r,path:"/search",body:o(o({query:t},n?{mediaType:n}:{}),s),apiKey:i})},exports.getTransactions=function(e){var r=e.apiClient,t=e.txHashes,n=e.ipIds,s=e.initiators,i=e.eventTypes,a=e.options,l=e.apiKey;return ye({apiClient:r,path:"/transactions",body:o(o({orderBy:"blockNumber",orderDirection:"desc"},a),{where:o(o(o(o(o({},null==a?void 0:a.where),t?{txHashes:t}:{}),n?{ipIds:n}:{}),s?{initiators:s}:{}),i?{eventTypes:i}:{})}),apiKey:l})},exports.prodClient=ge,exports.shortenAddress=function(e,r){if(void 0===r&&(r=4),!e)return"";if(e.length<2*r+2)return e;var t=e.substring(0,r+2),o=e.substring(e.length-r);return"".concat(t,"...").concat(o)},exports.stagingClient=me;
1
+ "use strict";var e,t;exports.PIL_FLAVOR=void 0,(e=exports.PIL_FLAVOR||(exports.PIL_FLAVOR={})).NON_COMMERCIAL_SOCIAL_REMIXING="Non-Commercial Social Remixing",e.COMMERCIAL_USE="Commercial Use",e.COMMERCIAL_REMIX="Commercial Remix",e.CUSTOM="Custom",e.OPEN_USE="Open Use",exports.IPKIT_SUPPORTED_CHAIN=void 0,(t=exports.IPKIT_SUPPORTED_CHAIN||(exports.IPKIT_SUPPORTED_CHAIN={})).AENEID_TESTNET="story-aeneid",t.STORY_MAINNET="story";var r,o={name:"Wrapped IP",address:"0x1514000000000000000000000000000000000000",symbol:"WIP"},n=function(){return n=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},n.apply(this,arguments)};function s(e,t,r,o){return new(r||(r=Promise))((function(n,s){function i(e){try{p(o.next(e))}catch(e){s(e)}}function a(e){try{p(o.throw(e))}catch(e){s(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}p((o=o.apply(e,t||[])).next())}))}function i(e,t){var r,o,n,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(p){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(r=1,o&&(n=2&a[0]?o.return:a[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;switch(o=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(n=s.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){s.label=a[1];break}if(6===a[0]&&s.label<n[1]){s.label=n[1],n=a;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(a);break}n[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],o=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,p])}}}"function"==typeof SuppressedError&&SuppressedError,exports.API_URL=void 0,(r=exports.API_URL||(exports.API_URL={})).STAGING="https://staging-api.storyprotocol.net/api/v4",r.PRODUCTION="https://api.storyapis.com/api/v4";const a=/\{[^{}]+\}/g;function p(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:o=globalThis.fetch,querySerializer:n,bodySerializer:s,headers:i,requestInitExt:p,...b}={...e};p="object"==typeof process&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici?p:void 0,t=h(t);const m=[];async function I(e,I){const{baseUrl:w,fetch:v=o,Request:R=r,headers:x,params:C={},parseAs:A="json",querySerializer:E,bodySerializer:g=s??f,body:T,...O}=I||{};w&&(t=h(w));let P="function"==typeof n?n:d(n);E&&(P="function"==typeof E?E:d({..."object"==typeof n?n:{},...E}));const S=void 0===T?void 0:g(T),U=void 0===S||S instanceof FormData?{}:{"Content-Type":"application/json"},N={redirect:"follow",...b,...O,body:S,headers:y(U,i,x,C.header)};let j,_,q,D=new r(function(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=function(e,t){let r=e;for(const o of e.match(a)??[]){let e=o.substring(1,o.length-1),n=!1,s="simple";if(e.endsWith("*")&&(n=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(s="label",e=e.substring(1)):e.startsWith(";")&&(s="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;const i=t[e];Array.isArray(i)?r=r.replace(o,u(e,i,{style:s,explode:n})):r="object"!=typeof i?"matrix"!==s?r.replace(o,"label"===s?`.${encodeURIComponent(i)}`:encodeURIComponent(i)):r.replace(o,`;${l(e,i)}`):r.replace(o,c(e,i,{style:s,explode:n}))}return r}(r,t.params.path));let o=t.querySerializer(t.params.query??{});o.startsWith("?")&&(o=o.substring(1));o&&(r+=`?${o}`);return r}(e,{baseUrl:t,params:C,querySerializer:P}),N);for(const e in O)e in D||(D[e]=O[e]);if(m.length){j=Math.random().toString(36).slice(2,11),_=Object.freeze({baseUrl:t,fetch:v,parseAs:A,querySerializer:P,bodySerializer:g});for(const t of m)if(t&&"object"==typeof t&&"function"==typeof t.onRequest){const o=await t.onRequest({request:D,schemaPath:e,params:C,options:_,id:j});if(o){if(!(o instanceof r)){if(o instanceof Response){q=o;break}throw new Error("onRequest: must return new Request() or Response() when modifying the request")}D=o}}}if(!q){try{q=await v(D,p)}catch(K){let t=K;if(m.length)for(let r=m.length-1;r>=0;r--){const o=m[r];if(o&&"object"==typeof o&&"function"==typeof o.onError){const r=await o.onError({request:D,error:t,schemaPath:e,params:C,options:_,id:j});if(r){if(r instanceof Response){t=void 0,q=r;break}if(r instanceof Error){t=r;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(t)throw t}if(m.length)for(let t=m.length-1;t>=0;t--){const r=m[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){const t=await r.onResponse({request:D,response:q,schemaPath:e,params:C,options:_,id:j});if(t){if(!(t instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");q=t}}}}if(204===q.status||"0"===q.headers.get("Content-Length"))return q.ok?{data:void 0,response:q}:{error:void 0,response:q};if(q.ok)return"stream"===A?{data:q.body,response:q}:{data:await q[A](),response:q};let K=await q.text();try{K=JSON.parse(K)}catch{}return{error:K,response:q}}return{request:(e,t,r)=>I(t,{...r,method:e.toUpperCase()}),GET:(e,t)=>I(e,{...t,method:"GET"}),PUT:(e,t)=>I(e,{...t,method:"PUT"}),POST:(e,t)=>I(e,{...t,method:"POST"}),DELETE:(e,t)=>I(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>I(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>I(e,{...t,method:"HEAD"}),PATCH:(e,t)=>I(e,{...t,method:"PATCH"}),TRACE:(e,t)=>I(e,{...t,method:"TRACE"}),use(...e){for(const t of e)if(t){if("object"!=typeof t||!("onRequest"in t||"onResponse"in t||"onError"in t))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");m.push(t)}},eject(...e){for(const t of e){const e=m.indexOf(t);-1!==e&&m.splice(e,1)}}}}function l(e,t,r){if(null==t)return"";if("object"==typeof t)throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${!0===r?.allowReserved?t:encodeURIComponent(t)}`}function c(e,t,r){if(!t||"object"!=typeof t)return"";const o=[],n={simple:",",label:".",matrix:";"}[r.style]||"&";if("deepObject"!==r.style&&!1===r.explode){for(const e in t)o.push(e,!0===r.allowReserved?t[e]:encodeURIComponent(t[e]));const n=o.join(",");switch(r.style){case"form":return`${e}=${n}`;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return n}}for(const n in t){const s="deepObject"===r.style?`${e}[${n}]`:n;o.push(l(s,t[n],r))}const s=o.join(n);return"label"===r.style||"matrix"===r.style?`${n}${s}`:s}function u(e,t,r){if(!Array.isArray(t))return"";if(!1===r.explode){const o={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",n=(!0===r.allowReserved?t:t.map((e=>encodeURIComponent(e)))).join(o);switch(r.style){case"simple":return n;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return`${e}=${n}`}}const o={simple:",",label:".",matrix:";"}[r.style]||"&",n=[];for(const o of t)"simple"===r.style||"label"===r.style?n.push(!0===r.allowReserved?o:encodeURIComponent(o)):n.push(l(e,o,r));return"label"===r.style||"matrix"===r.style?`${o}${n.join(o)}`:n.join(o)}function d(e){return function(t){const r=[];if(t&&"object"==typeof t)for(const o in t){const n=t[o];if(null!=n)if(Array.isArray(n)){if(0===n.length)continue;r.push(u(o,n,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}))}else"object"!=typeof n?r.push(l(o,n,e)):r.push(c(o,n,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}))}return r.join("&")}}function f(e){return e instanceof FormData?e:JSON.stringify(e)}function y(...e){const t=new Headers;for(const r of e){if(!r||"object"!=typeof r)continue;const e=r instanceof Headers?r.entries():Object.entries(r);for(const[r,o]of e)if(null===o)t.delete(r);else if(Array.isArray(o))for(const e of o)t.append(r,e);else void 0!==o&&t.set(r,o)}return t}function h(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var b,m={onRequest:function(e){return s(this,arguments,void 0,(function(e){var t=e.request;return i(this,(function(e){return t.headers.set("Content-Type","application/json"),[2,t]}))}))}},I=function(e){var t=p({baseUrl:e});return t.use(m),t},w=I(exports.API_URL.STAGING),v=I(exports.API_URL.PRODUCTION);function R(e){var t=e.apiClient,r=e.path,o=e.apiKey,s=e.body,i=e.additionalHeaders,a={params:{header:n({"X-Api-Key":o},i)}},p={body:s||{}};return t.POST(r,n(n({},a),p))}var x={id:1315,name:"story-aeneid",apiVersion:"v3",displayName:"Story Aeneid Testnet",rpcUrl:"https://aeneid.storyrpc.io/",blockExplorerUrl:"https://aeneid.storyscan.io",protocolExplorerUrl:"https://aeneid.explorer.story.foundation",defaultCurrency:o},C={id:1514,name:"story",apiVersion:"v3",displayName:"Story Mainnet",rpcUrl:"https://mainnet.storyrpc.io",blockExplorerUrl:"https://storyscan.io",protocolExplorerUrl:"https://explorer.story.foundation",defaultCurrency:o},A=((b={})[x.name]=x,b[C.name]=C,b);exports.CHAINID_TO_CHAINNAME={1315:"story-aeneid",1514:"story"},exports.CHAINS=A,exports.STORY_AENEID=x,exports.STORY_MAINNET=C,exports.WRAPPED_IP=o,exports.createApiClient=I,exports.getCollections=function(e){var t=e.collectionAddresses,r=e.apiClient,o=e.options,s=e.apiKey;return R({apiClient:r,path:"/collections",body:n(n({orderBy:"updatedAt",orderDirection:"desc"},o),{where:n(n({},null==o?void 0:o.where),t?{collectionAddresses:t}:{})}),apiKey:s})},exports.getDispute=function(e){return function(e){var t=e.apiClient,r=e.path,o=e.apiKey,s=e.pathParams,i=e.additionalHeaders,a={params:{path:s,header:n({"X-Api-Key":o},i)}};return t.GET(r,a)}({apiClient:e.apiClient,path:"/disputes/{disputeId}",pathParams:{disputeId:e.disputeId},apiKey:e.apiKey})},exports.getDisputes=function(e){var t=e.apiClient,r=e.initiator,o=e.targetIpId,s=e.options,i=e.apiKey;return R({apiClient:t,path:"/disputes",body:n(n({orderBy:"blockNumber",orderDirection:"desc"},s),{where:n(n(n({},null==s?void 0:s.where),r?{initiator:r}:{}),o?{targetIpId:o}:{})}),apiKey:i})},exports.getIpAssetEdges=function(e){var t=e.apiClient,r=e.ipId,o=e.parentIpId,s=e.options,i=e.apiKey;return R({apiClient:t,path:"/assets/edges",body:n(n({orderBy:"blockNumber",orderDirection:"desc"},s),{where:n(n(n({},null==s?void 0:s.where),r?{childIpId:r}:{}),o?{parentIpId:o}:{})}),apiKey:i})},exports.getIpAssets=function(e){var t=e.apiClient,r=e.ownerAddress,o=e.tokenContract,s=e.includeLicenses,i=e.moderated,a=e.ipIds,p=e.options,l=e.apiKey;return R({apiClient:t,path:"/assets",body:n(n({orderBy:"blockNumber",orderDirection:"desc",includeLicenses:null!=s&&s,moderated:null!=i&&i},p),{where:n(n(n(n({},null==p?void 0:p.where),a?{ipIds:a}:{}),r?{ownerAddress:r}:{}),o?{tokenContract:o}:{})}),apiKey:l})},exports.getLicenseTokens=function(e){var t=e.apiClient,r=e.ownerAddress,o=e.licensorIpId,s=e.options,i=e.apiKey;return R({apiClient:t,path:"/licenses/tokens",body:n(n({orderBy:"blockNumber",orderDirection:"desc"},s),{where:n(n(n({},null==s?void 0:s.where),(null==r?void 0:r.length)?{ownerAddress:r}:{}),(null==o?void 0:o.length)?{licensorIpId:o}:{})}),apiKey:i})},exports.getSearch=function(e){var t=e.apiClient,r=e.query,o=e.mediaType,s=e.options,i=e.apiKey;return R({apiClient:t,path:"/search",body:n(n({query:r},o?{mediaType:o}:{}),s),apiKey:i})},exports.getTransactions=function(e){var t=e.apiClient,r=e.txHashes,o=e.ipIds,s=e.initiators,i=e.eventTypes,a=e.options,p=e.apiKey;return R({apiClient:t,path:"/transactions",body:n(n({orderBy:"blockNumber",orderDirection:"desc"},a),{where:n(n(n(n(n({},null==a?void 0:a.where),r?{txHashes:r}:{}),o?{ipIds:o}:{}),s?{initiators:s}:{}),i?{eventTypes:i}:{})}),apiKey:p})},exports.prodClient=v,exports.stagingClient=w;
2
2
  //# sourceMappingURL=server.cjs.js.map