@story-protocol/ipkit 0.4.0-beta.9 → 0.4.0
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.
- package/README.md +183 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/stories/useLicenseTokens.stories.d.ts +38 -0
- package/dist/hooks/stories/useLicenseTokens.stories.d.ts.map +1 -0
- package/dist/hooks/useLicenseTokens.d.ts +12 -0
- package/dist/hooks/useLicenseTokens.d.ts.map +1 -0
- package/dist/lib/api/getCollections.d.ts +3 -3
- package/dist/lib/api/getIpAssetEdges.d.ts +3 -3
- package/dist/lib/api/getIpAssets.d.ts +6 -6
- package/dist/lib/api/getLicenseTokens.d.ts +273 -0
- package/dist/lib/api/getLicenseTokens.d.ts.map +1 -0
- package/dist/lib/api/getSearch.d.ts +3 -3
- package/dist/lib/api/getTransactions.d.ts +3 -3
- package/dist/lib/api/index.d.ts +1 -0
- package/dist/lib/api/index.d.ts.map +1 -1
- package/dist/lib/index.d.ts +0 -2
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/utils.d.ts +0 -8
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/providers/IpKitProvider/IpKitProvider.d.ts +1 -8
- package/dist/providers/IpKitProvider/IpKitProvider.d.ts.map +1 -1
- package/dist/providers/IpKitProvider/__docs__/Example.d.ts +0 -3
- package/dist/providers/IpKitProvider/__docs__/Example.d.ts.map +1 -1
- package/dist/providers/IpKitProvider/__docs__/IpKitProvider.stories.d.ts +0 -12
- package/dist/providers/IpKitProvider/__docs__/IpKitProvider.stories.d.ts.map +1 -1
- package/dist/server-types.d.ts +412 -37
- package/dist/server.cjs.js +1 -1
- package/dist/server.cjs.js.map +1 -1
- package/dist/server.esm.js +1 -1
- package/dist/server.esm.js.map +1 -1
- package/dist/storyprotocol-storykit.cjs.js +1 -1
- package/dist/storyprotocol-storykit.cjs.js.map +1 -1
- package/dist/storyprotocol-storykit.esm.js +1 -1
- package/dist/storyprotocol-storykit.esm.js.map +1 -1
- package/dist/types/openapi.d.ts +1 -0
- package/dist/types/openapi.d.ts.map +1 -1
- package/dist/types/schema.d.ts +120 -3
- package/dist/types/schema.d.ts.map +1 -1
- package/dist/types.d.ts +421 -45
- package/package.json +20 -31
- package/dist/lib/functions/convertLicenseTermObject.d.ts +0 -6
- package/dist/lib/functions/convertLicenseTermObject.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e,t,r=require("react"),o=require("@tanstack/react-query");exports.API_URL=void 0,(e=exports.API_URL||(exports.API_URL={})).STAGING="https://staging-api.storyprotocol.net/api/v4",e.PRODUCTION="https://api.storyapis.com/api/v4",exports.IPKIT_SUPPORTED_CHAIN=void 0,(t=exports.IPKIT_SUPPORTED_CHAIN||(exports.IPKIT_SUPPORTED_CHAIN={})).AENEID_TESTNET="story-aeneid",t.STORY_MAINNET="story";var n,i,s={name:"Wrapped IP",address:"0x1514000000000000000000000000000000000000",symbol:"WIP"},a={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:s},l={id:1514,name:"story",apiVersion:"v3",displayName:"Story Mainnet",rpcUrl:"https://mainnet.storyrpc.io",blockExplorerUrl:"https://storyscan.io",protocolExplorerUrl:"https://explorer.story.foundation",defaultCurrency:s},c=((n={})[a.name]=a,n[l.name]=l,n),u=function(){return u=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},u.apply(this,arguments)};function d(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function a(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((o=o.apply(e,t||[])).next())}))}function p(e,t){var r,o,n,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)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 i.label++,{value:a[1],done:!1};case 5:i.label++,o=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(6===a[0]&&i.label<n[1]){i.label=n[1],n=a;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(a);break}n[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}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,l])}}}function f(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=f(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}"function"==typeof SuppressedError&&SuppressedError,exports.PIL_FLAVOR=void 0,(i=exports.PIL_FLAVOR||(exports.PIL_FLAVOR={})).NON_COMMERCIAL_SOCIAL_REMIXING="Non-Commercial Social Remixing",i.COMMERCIAL_USE="Commercial Use",i.COMMERCIAL_REMIX="Commercial Remix",i.CUSTOM="Custom",i.OPEN_USE="Open Use";const h="-";function b(e){const t=function(e){const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]},n=function(e,t){if(!t)return e;return e.map((([e,r])=>[e,r.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,r])=>[t+e,r]))):e))]))}(Object.entries(e.classGroups),r);return n.forEach((([e,r])=>{g(r,o,e,t)})),o}(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:function(e){const r=e.split(h);return""===r[0]&&1!==r.length&&r.shift(),y(r,t)||function(e){if(m.test(e)){const t=m.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}(e)},getConflictingClassGroupIds:function(e,t){const n=r[e]||[];return t&&o[e]?[...n,...o[e]]:n}}}function y(e,t){if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?y(e.slice(1),o):void 0;if(n)return n;if(0===t.validators.length)return;const i=e.join(h);return t.validators.find((({validator:e})=>e(i)))?.classGroupId}const m=/^\[(.+)\]$/;function g(e,t,r,o){e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return e.isThemeGetter?void g(e(o),t,r,o):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach((([e,n])=>{g(n,v(t,e),r,o)}))}else{(""===e?t:v(t,e)).classGroupId=r}}))}function v(e,t){let r=e;return t.split(h).forEach((e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)})),r}function x(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;function n(n,i){r.set(n,i),t++,t>e&&(t=0,o=r,r=new Map)}return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(n(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):n(e,t)}}}const w="!";function I(e){const t=e.separator,r=1===t.length,o=t[0],n=t.length;return function(e){const i=[];let s,a=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===a){if(u===o&&(r||e.slice(c,c+n)===t)){i.push(e.slice(l,c)),l=c+n;continue}if("/"===u){s=c;continue}}"["===u?a++:"]"===u&&a--}const c=0===i.length?e:e.substring(l),u=c.startsWith(w);return{modifiers:i,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:s&&s>l?s-l:void 0}}}const C=/\s+/;function A(){let e,t,r=0,o="";for(;r<arguments.length;)(e=arguments[r++])&&(t=E(e))&&(o&&(o+=" "),o+=t);return o}function E(e){if("string"==typeof e)return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=E(e[o]))&&(r&&(r+=" "),r+=t);return r}function R(e,...t){let r,o,n,i=function(a){const l=t.reduce(((e,t)=>t(e)),e());return r=function(e){return{cache:x(e.cacheSize),splitModifiers:I(e),...b(e)}}(l),o=r.cache.get,n=r.cache.set,i=s,s(a)};function s(e){const t=o(e);if(t)return t;const i=function(e,t){const{splitModifiers:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,i=new Set;return e.trim().split(C).map((e=>{const{modifiers:t,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:s}=r(e);let a=o(s?i.substring(0,s):i),l=Boolean(s);if(!a){if(!s)return{isTailwindClass:!1,originalClassName:e};if(a=o(i),!a)return{isTailwindClass:!1,originalClassName:e};l=!1}const c=function(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach((e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)})),t.push(...r.sort()),t}(t).join(":");return{isTailwindClass:!0,modifierId:n?c+w:c,classGroupId:a,originalClassName:e,hasPostfixModifier:l}})).reverse().filter((e=>{if(!e.isTailwindClass)return!0;const{modifierId:t,classGroupId:r,hasPostfixModifier:o}=e,s=t+r;return!i.has(s)&&(i.add(s),n(r,o).forEach((e=>i.add(t+e))),!0)})).reverse().map((e=>e.originalClassName)).join(" ")}(e,r);return n(e,i),i}return function(){return i(A.apply(null,arguments))}}function O(e){const t=t=>t[e]||[];return t.isThemeGetter=!0,t}const T=/^\[(?:([a-z-]+):)?(.+)\]$/i,P=/^\d+\/\d+$/,k=new Set(["px","full","screen"]),q=/^(\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$/,S=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,j=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,N=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function z(e){return _(e)||k.has(e)||P.test(e)}function U(e){return Y(e,"length",J)}function _(e){return Boolean(e)&&!Number.isNaN(Number(e))}function L(e){return Y(e,"number",_)}function M(e){return Boolean(e)&&Number.isInteger(Number(e))}function D(e){return e.endsWith("%")&&_(e.slice(0,-1))}function G(e){return T.test(e)}function $(e){return q.test(e)}const F=new Set(["length","size","percentage"]);function H(e){return Y(e,F,Z)}function Q(e){return Y(e,"position",Z)}const W=new Set(["image","url"]);function B(e){return Y(e,W,te)}function V(e){return Y(e,"",ee)}function X(){return!0}function Y(e,t,r){const o=T.exec(e);return!!o&&(o[1]?"string"==typeof t?o[1]===t:t.has(o[1]):r(o[2]))}function J(e){return K.test(e)&&!S.test(e)}function Z(){return!1}function ee(e){return j.test(e)}function te(e){return N.test(e)}function re(){const e=O("colors"),t=O("spacing"),r=O("blur"),o=O("brightness"),n=O("borderColor"),i=O("borderRadius"),s=O("borderSpacing"),a=O("borderWidth"),l=O("contrast"),c=O("grayscale"),u=O("hueRotate"),d=O("invert"),p=O("gap"),f=O("gradientColorStops"),h=O("gradientColorStopPositions"),b=O("inset"),y=O("margin"),m=O("opacity"),g=O("padding"),v=O("saturate"),x=O("scale"),w=O("sepia"),I=O("skew"),C=O("space"),A=O("translate"),E=()=>["auto",G,t],R=()=>[G,t],T=()=>["",z,U],P=()=>["auto",_,G],k=()=>["","0",G],q=()=>[_,L],K=()=>[_,G];return{cacheSize:500,separator:":",theme:{colors:[X],spacing:[z,U],blur:["none","",$,G],brightness:q(),borderColor:[e],borderRadius:["none","","full",$,G],borderSpacing:R(),borderWidth:T(),contrast:q(),grayscale:k(),hueRotate:K(),invert:k(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[D,U],inset:E(),margin:E(),opacity:q(),padding:R(),saturate:q(),scale:q(),sepia:k(),skew:K(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",G]}],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",G]}],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:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",M,G]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",G]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",M,G]}],"grid-cols":[{"grid-cols":[X]}],"col-start-end":[{col:["auto",{span:["full",M,G]},G]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[X]}],"row-start-end":[{row:["auto",{span:[M,G]},G]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",G]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",G]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"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:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",G,t]}],"min-w":[{"min-w":[G,t,"min","max","fit"]}],"max-w":[{"max-w":[G,t,"none","full","min","max","fit","prose",{screen:[$]},$]}],h:[{h:[G,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[G,t,"auto","min","max","fit"]}],"font-size":[{text:["base",$,U]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",L]}],"font-family":[{font:[X]}],"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",G]}],"line-clamp":[{"line-clamp":["none",_,L]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",z,G]}],"list-image":[{"list-image":["none",G]}],"list-style-type":[{list:["none","disc","decimal",G]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"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",z,U]}],"underline-offset":[{"underline-offset":["auto",z,G]}],"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:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G]}],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",G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Q]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",H]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},B]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[m]}],"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":[m]}],"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":[z,G]}],"outline-w":[{outline:[z,U]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[z,U]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",$,V]}],"shadow-color":[{shadow:[X]}],opacity:[{opacity:[m]}],"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:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",$,G]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",G]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",G]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",G]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[M,G]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",G]}],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",G]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",G]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[z,U,L]}],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 oe(e,t,r){void 0!==r&&(e[t]=r)}function ne(e,t){if(t)for(const r in t)oe(e,r,t[r])}function ie(e,t){if(t)for(const r in t){const o=t[r];void 0!==o&&(e[r]=(e[r]||[]).concat(o))}}var se=function(e,...t){return"function"==typeof e?R(re,e,...t):R((()=>function(e,{cacheSize:t,prefix:r,separator:o,extend:n={},override:i={}}){oe(e,"cacheSize",t),oe(e,"prefix",r),oe(e,"separator",o);for(const t in i)ne(e[t],i[t]);for(const t in n)ie(e[t],n[t]);return e}(re(),e)),...t)}({prefix:"sk-"});function ae(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return se(function(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=f(e))&&(o&&(o+=" "),o+=t);return o}(e))}function le(e){return e.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g,(function(e,t){return 0==+e?"":0===t?e.toLowerCase():e.toUpperCase()}))}function ce(e){if(!e.startsWith("ipfs://"))return e;var t=e.slice(7);return"https://ipfs.io/ipfs/".concat(t)}function ue(e){return d(this,void 0,void 0,(function(){return p(this,(function(t){switch(t.label){case 0:return[4,fetch(e).then((function(e){return e.json()}))];case 1:return[2,t.sent()]}}))}))}const de=/\{[^{}]+\}/g;function pe(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:o=globalThis.fetch,querySerializer:n,bodySerializer:i,headers:s,requestInitExt:a,...l}={...e};a="object"==typeof process&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici?a:void 0,t=ve(t);const c=[];async function u(e,u){const{baseUrl:d,fetch:p=o,Request:f=r,headers:h,params:b={},parseAs:y="json",querySerializer:m,bodySerializer:g=i??me,body:v,...x}=u||{};d&&(t=ve(d));let w="function"==typeof n?n:ye(n);m&&(w="function"==typeof m?m:ye({..."object"==typeof n?n:{},...m}));const I=void 0===v?void 0:g(v),C=void 0===I||I instanceof FormData?{}:{"Content-Type":"application/json"},A={redirect:"follow",...l,...x,body:I,headers:ge(C,s,h,b.header)};let E,R,O,T=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(de)??[]){let e=o.substring(1,o.length-1),n=!1,i="simple";if(e.endsWith("*")&&(n=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(i="label",e=e.substring(1)):e.startsWith(";")&&(i="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;const s=t[e];Array.isArray(s)?r=r.replace(o,be(e,s,{style:i,explode:n})):r="object"!=typeof s?"matrix"!==i?r.replace(o,"label"===i?`.${encodeURIComponent(s)}`:encodeURIComponent(s)):r.replace(o,`;${fe(e,s)}`):r.replace(o,he(e,s,{style:i,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:b,querySerializer:w}),A);for(const e in x)e in T||(T[e]=x[e]);if(c.length){E=Math.random().toString(36).slice(2,11),R=Object.freeze({baseUrl:t,fetch:p,parseAs:y,querySerializer:w,bodySerializer:g});for(const t of c)if(t&&"object"==typeof t&&"function"==typeof t.onRequest){const o=await t.onRequest({request:T,schemaPath:e,params:b,options:R,id:E});if(o){if(!(o instanceof r)){if(o instanceof Response){O=o;break}throw new Error("onRequest: must return new Request() or Response() when modifying the request")}T=o}}}if(!O){try{O=await p(T,a)}catch(P){let t=P;if(c.length)for(let r=c.length-1;r>=0;r--){const o=c[r];if(o&&"object"==typeof o&&"function"==typeof o.onError){const r=await o.onError({request:T,error:t,schemaPath:e,params:b,options:R,id:E});if(r){if(r instanceof Response){t=void 0,O=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(c.length)for(let t=c.length-1;t>=0;t--){const r=c[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){const t=await r.onResponse({request:T,response:O,schemaPath:e,params:b,options:R,id:E});if(t){if(!(t instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");O=t}}}}if(204===O.status||"0"===O.headers.get("Content-Length"))return O.ok?{data:void 0,response:O}:{error:void 0,response:O};if(O.ok)return"stream"===y?{data:O.body,response:O}:{data:await O[y](),response:O};let P=await O.text();try{P=JSON.parse(P)}catch{}return{error:P,response:O}}return{request:(e,t,r)=>u(t,{...r,method:e.toUpperCase()}),GET:(e,t)=>u(e,{...t,method:"GET"}),PUT:(e,t)=>u(e,{...t,method:"PUT"}),POST:(e,t)=>u(e,{...t,method:"POST"}),DELETE:(e,t)=>u(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>u(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>u(e,{...t,method:"HEAD"}),PATCH:(e,t)=>u(e,{...t,method:"PATCH"}),TRACE:(e,t)=>u(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()`");c.push(t)}},eject(...e){for(const t of e){const e=c.indexOf(t);-1!==e&&c.splice(e,1)}}}}function fe(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 he(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 i="deepObject"===r.style?`${e}[${n}]`:n;o.push(fe(i,t[n],r))}const i=o.join(n);return"label"===r.style||"matrix"===r.style?`${n}${i}`:i}function be(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(fe(e,o,r));return"label"===r.style||"matrix"===r.style?`${o}${n.join(o)}`:n.join(o)}function ye(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(be(o,n,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}))}else"object"!=typeof n?r.push(fe(o,n,e)):r.push(he(o,n,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}))}return r.join("&")}}function me(e){return e instanceof FormData?e:JSON.stringify(e)}function ge(...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 ve(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var xe={onRequest:function(e){return d(this,arguments,void 0,(function(e){var t=e.request;return p(this,(function(e){return t.headers.set("Content-Type","application/json"),[2,t]}))}))}},we=function(e){var t=pe({baseUrl:e});return t.use(xe),t},Ie=we(exports.API_URL.STAGING),Ce=we(exports.API_URL.PRODUCTION);function Ae(e){var t=e.apiClient,r=e.path,o=e.apiKey,n=e.body,i=e.additionalHeaders,s={params:{header:u({"X-Api-Key":o},i)}},a={body:n||{}};return t.POST(r,u(u({},s),a))}function Ee(e){var t=e.collectionAddresses,r=e.apiClient,o=e.options,n=e.apiKey;return Ae({apiClient:r,path:"/collections",body:u(u({orderBy:"updatedAt",orderDirection:"desc"},o),{where:u(u({},null==o?void 0:o.where),t?{collectionAddresses:t}:{})}),apiKey:n})}function Re(e){return function(e){var t=e.apiClient,r=e.path,o=e.apiKey,n=e.pathParams,i=e.additionalHeaders,s={params:{path:n,header:u({"X-Api-Key":o},i)}};return t.GET(r,s)}({apiClient:e.apiClient,path:"/disputes/{disputeId}",pathParams:{disputeId:e.disputeId},apiKey:e.apiKey})}function Oe(e){var t=e.apiClient,r=e.initiator,o=e.targetIpId,n=e.options,i=e.apiKey;return Ae({apiClient:t,path:"/disputes",body:u(u({orderBy:"blockNumber",orderDirection:"desc"},n),{where:u(u(u({},null==n?void 0:n.where),r?{initiator:r}:{}),o?{targetIpId:o}:{})}),apiKey:i})}function Te(e){var t=e.apiClient,r=e.ipId,o=e.parentIpId,n=e.options,i=e.apiKey;return Ae({apiClient:t,path:"/assets/edges",body:u(u({orderBy:"blockNumber",orderDirection:"desc"},n),{where:u(u(u({},null==n?void 0:n.where),r?{childIpId:r}:{}),o?{parentIpId:o}:{})}),apiKey:i})}function Pe(e){var t=e.apiClient,r=e.ownerAddress,o=e.tokenContract,n=e.includeLicenses,i=e.moderated,s=e.ipIds,a=e.options,l=e.apiKey;return Ae({apiClient:t,path:"/assets",body:u(u({orderBy:"blockNumber",orderDirection:"desc",includeLicenses:null!=n&&n,moderated:null!=i&&i},a),{where:u(u(u(u({},null==a?void 0:a.where),s?{ipIds:s}:{}),r?{ownerAddress:r}:{}),o?{tokenContract:o}:{})}),apiKey:l})}function ke(e){var t=e.apiClient,r=e.query,o=e.mediaType,n=e.options,i=e.apiKey;return Ae({apiClient:t,path:"/search",body:u(u({query:r},o?{mediaType:o}:{}),n),apiKey:i})}function qe(e){var t=e.apiClient,r=e.txHashes,o=e.ipIds,n=e.initiators,i=e.eventTypes,s=e.options,a=e.apiKey;return Ae({apiClient:t,path:"/transactions",body:u(u({orderBy:"blockNumber",orderDirection:"desc"},s),{where:u(u(u(u(u({},null==s?void 0:s.where),r?{txHashes:r}:{}),o?{ipIds:o}:{}),n?{initiators:n}:{}),i?{eventTypes:i}:{})}),apiKey:a})}var Ke=r.createContext(null),Se=function(){var e=r.useContext(Ke);if(!e)throw new Error("useIpKit must be used within an IpKitProvider");return e};exports.CHAINID_TO_CHAINNAME={1315:"story-aeneid",1514:"story"},exports.CHAINS=c,exports.IpKitProvider=function(e){var t=e.apiKey,o=e.appId,n=e.children,i=e.isTestnet,s=e.mode,a=e.theme,l=void 0===a?"default":a,u=r.useMemo((function(){return c[i?exports.IPKIT_SUPPORTED_CHAIN.AENEID_TESTNET:exports.IPKIT_SUPPORTED_CHAIN.STORY_MAINNET]}),[i]),d=r.useMemo((function(){return i?exports.API_URL.STAGING:exports.API_URL.PRODUCTION}),[i]),p=r.useMemo((function(){return we(d)}),[d]);return r.createElement(Ke.Provider,{value:{apiBaseUrl:d,apiClient:p,apiKey:t,appId:o,chain:u,mode:s,theme:l,themeClass:"".concat(l).concat(s?"-".concat(s):"")}},r.createElement("div",{className:ae(l)},n))},exports.STORY_AENEID=a,exports.STORY_MAINNET=l,exports.WRAPPED_IP=s,exports.camelize=le,exports.cn=ae,exports.convertIpfsUriToUrl=ce,exports.convertLicenseTermObject=function(e){return e.reduce((function(e,t){return e[le(t.trait_type)]="true"===t.value||"false"!==t.value&&t.value,e}),{})},exports.createApiClient=we,exports.fetchLicenseOffChainData=function(e){return d(this,void 0,void 0,(function(){var t;return p(this,(function(r){switch(r.label){case 0:return""===e?[2]:(t=e,e.startsWith("https://github.com/")&&(t=e.replace("https://github.com/","https://raw.githubusercontent.com/").replace("/blob/","/")),[4,ue(ce(t))]);case 1:return[2,r.sent()]}}))}))},exports.getCollections=Ee,exports.getDispute=Re,exports.getDisputes=Oe,exports.getImageUrlFromIpfsUrl=function(e){return d(this,void 0,void 0,(function(){return p(this,(function(t){switch(t.label){case 0:return[4,fetch(e).then((function(e){return e.json()}))];case 1:return[2,ce(t.sent().image)]}}))}))},exports.getIpAssetEdges=Te,exports.getIpAssets=Pe,exports.getMetadataFromIpfs=ue,exports.getPilFlavorByLicenseTerms=function(e){var t=e.commercialUse,r=e.derivativesAllowed,o=e.derivativesAttribution,n=e.commercialRevShare;return!t&&r?o?exports.PIL_FLAVOR.NON_COMMERCIAL_SOCIAL_REMIXING:exports.PIL_FLAVOR.OPEN_USE:!t||r||o||0!==n?t&&r&&o&&n&&n>0?exports.PIL_FLAVOR.COMMERCIAL_REMIX:exports.PIL_FLAVOR.CUSTOM:exports.PIL_FLAVOR.COMMERCIAL_USE},exports.getSearch=ke,exports.getTransactions=qe,exports.prodClient=Ce,exports.shortenAddress=function(e,t){if(void 0===t&&(t=4),!e)return"";if(e.length<2*t+2)return e;var r=e.substring(0,t+2),o=e.substring(e.length-t);return"".concat(r,"...").concat(o)},exports.stagingClient=Ie,exports.useCollection=function(e){var t=this,r=e.collectionAddress,n=e.queryOptions,i=Se(),s=i.apiKey,a=i.apiClient;return o.useQuery(u({queryKey:["getCollection",r],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,o,n;return p(this,(function(i){switch(i.label){case 0:return[4,Ee({collectionAddresses:[r],apiKey:s,apiClient:a})];case 1:if(e=i.sent(),t=e.data,o=e.error)throw o;return[2,(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n[0])||null]}}))}))},enabled:!!r.length},n))},exports.useCollections=function(e){var t=this,r=void 0===e?{}:e,n=r.collectionAddresses,i=r.options,s=r.queryOptions,a=Se(),l=a.apiKey,c=a.apiClient;return o.useQuery(u({queryKey:["getCollections",n,i],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,r;return p(this,(function(o){switch(o.label){case 0:return[4,Ee({collectionAddresses:n,options:i,apiKey:l,apiClient:c})];case 1:if(e=o.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},s))},exports.useDispute=function(e){var t=this,r=e.disputeId,n=e.queryOptions,i=Se(),s=i.apiKey,a=i.apiClient;return o.useQuery(u({queryKey:["getDispute",r],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,o;return p(this,(function(n){switch(n.label){case 0:return[4,Re({disputeId:r,apiKey:s,apiClient:a})];case 1:if(e=n.sent(),t=e.data,o=e.error)throw o;return[2,(null==t?void 0:t.data)||null]}}))}))},enabled:!!r.length},n))},exports.useDisputes=function(e){var t=this,r=void 0===e?{}:e,n=r.initiator,i=r.targetIpId,s=r.options,a=r.queryOptions,l=Se(),c=l.apiKey,f=l.apiClient;return o.useQuery(u({queryKey:["getDisputes",s,n,i],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,r;return p(this,(function(o){switch(o.label){case 0:return[4,Oe({initiator:n,targetIpId:i,options:s,apiKey:c,apiClient:f})];case 1:if(e=o.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},a))},exports.useIpAsset=function(e){var t=this,r=e.ipId,n=e.includeLicenses,i=e.queryOptions,s=Se(),a=s.apiKey,l=s.apiClient;return o.useQuery(u({queryKey:["getIpAsset",r,n],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,o,i;return p(this,(function(s){switch(s.label){case 0:return[4,Pe({ipIds:[r],includeLicenses:n,apiKey:a,apiClient:l})];case 1:if(e=s.sent(),t=e.data,o=e.error)throw o;return[2,(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i[0])||null]}}))}))},enabled:!!r.length},i))},exports.useIpAssetChildren=function(e){var t=this,r=void 0===e?{}:e,n=r.ipId,i=r.options,s=r.queryOptions,a=Se(),l=a.apiKey,c=a.apiClient;return o.useQuery(u({queryKey:["getIpAssetEdges",void 0,n,i],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,r;return p(this,(function(o){switch(o.label){case 0:return[4,Te({parentIpId:n,options:i,apiKey:l,apiClient:c})];case 1:if(e=o.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},s))},exports.useIpAssetEdges=function(e){var t=this,r=void 0===e?{}:e,n=r.ipId,i=r.parentIpId,s=r.options,a=r.queryOptions,l=Se(),c=l.apiKey,f=l.apiClient;return o.useQuery(u({queryKey:["getIpAssetEdges",n,i,s],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,r;return p(this,(function(o){switch(o.label){case 0:return[4,Te({ipId:n,parentIpId:i,options:s,apiKey:c,apiClient:f})];case 1:if(e=o.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},a))},exports.useIpAssetLicenses=function(e){var t=this,r=e.ipId,n=e.queryOptions,i=Se(),s=i.apiKey,a=i.apiClient;return o.useQuery(u({queryKey:["getIpAsset",r,!0],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,o,n;return p(this,(function(i){switch(i.label){case 0:return[4,Pe({ipIds:[r],includeLicenses:!0,apiKey:s,apiClient:a})];case 1:if(e=i.sent(),t=e.data,o=e.error)throw o;return[2,(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n[0].licenses)||null]}}))}))},enabled:!!r.length},n))},exports.useIpAssetParents=function(e){var t=this,r=void 0===e?{}:e,n=r.ipId,i=r.options,s=r.queryOptions,a=Se(),l=a.apiKey,c=a.apiClient;return o.useQuery(u({queryKey:["getIpAssetEdges",n,void 0,i],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,r;return p(this,(function(o){switch(o.label){case 0:return[4,Te({ipId:n,options:i,apiKey:l,apiClient:c})];case 1:if(e=o.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},s))},exports.useIpAssets=function(e){var t=this,r=void 0===e?{}:e,n=r.ipIds,i=r.tokenContract,s=r.includeLicenses,a=r.moderated,l=r.options,c=r.queryOptions,f=Se(),h=f.apiKey,b=f.apiClient;return o.useQuery(u({queryKey:["getIpAssets",n,i,s,a,l],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,r;return p(this,(function(o){switch(o.label){case 0:return[4,Pe({ipIds:n,tokenContract:i,includeLicenses:s,moderated:a,options:l,apiKey:h,apiClient:b})];case 1:if(e=o.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},c))},exports.useIpAssetsByOwner=function(e){var t=this,r=void 0===e?{}:e,n=r.ownerAddress,i=r.includeLicenses,s=r.moderated,a=r.options,l=r.queryOptions,c=Se(),f=c.apiKey,h=c.apiClient;return o.useQuery(u({queryKey:["getIpAssets",n,i,s,a],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,r;return p(this,(function(o){switch(o.label){case 0:return[4,Pe({ownerAddress:n,includeLicenses:i,moderated:s,options:a,apiKey:f,apiClient:h})];case 1:if(e=o.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},l))},exports.useIpKit=Se,exports.useSearch=function(e){var t=this,r=e.query,n=e.mediaType,i=e.queryOptions,s=Se(),a=s.apiKey,l=s.apiClient;return o.useQuery(u({queryKey:["getSearch",r,n],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,o;return p(this,(function(i){switch(i.label){case 0:return[4,ke({query:r,mediaType:n,apiKey:a,apiClient:l})];case 1:if(e=i.sent(),t=e.data,o=e.error)throw o;return[2,t]}}))}))},enabled:!!r.length},i))},exports.useTransaction=function(e){var t=this,r=e.txHash,n=e.queryOptions,i=Se(),s=i.apiKey,a=i.apiClient;return o.useQuery(u({queryKey:["getTransactions",r],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,o,n;return p(this,(function(i){switch(i.label){case 0:return[4,qe({txHashes:[r],apiKey:s,apiClient:a})];case 1:if(e=i.sent(),t=e.data,o=e.error)throw o;return[2,(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n[0])||null]}}))}))},enabled:!!r.length},n))},exports.useTransactions=function(e){var t=this,r=void 0===e?{}:e,n=r.txHashes,i=r.ipIds,s=r.initiators,a=r.eventTypes,l=r.options,c=r.queryOptions,f=Se(),h=f.apiKey,b=f.apiClient;return o.useQuery(u({queryKey:["getTransactions",n,i,s,a,l],queryFn:function(){return d(t,void 0,void 0,(function(){var e,t,r;return p(this,(function(o){switch(o.label){case 0:return[4,qe({txHashes:n,ipIds:i,initiators:s,eventTypes:a,options:l,apiKey:h,apiClient:b})];case 1:if(e=o.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},c))};
|
|
1
|
+
"use strict";var e,t,r=require("react"),n=require("@tanstack/react-query");exports.API_URL=void 0,(e=exports.API_URL||(exports.API_URL={})).STAGING="https://staging-api.storyprotocol.net/api/v4",e.PRODUCTION="https://api.storyapis.com/api/v4",exports.IPKIT_SUPPORTED_CHAIN=void 0,(t=exports.IPKIT_SUPPORTED_CHAIN||(exports.IPKIT_SUPPORTED_CHAIN={})).AENEID_TESTNET="story-aeneid",t.STORY_MAINNET="story";var i,o={name:"Wrapped IP",address:"0x1514000000000000000000000000000000000000",symbol:"WIP"},s={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},a={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},u=((i={})[s.name]=s,i[a.name]=a,i),p=function(){return p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},p.apply(this,arguments)};function l(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function c(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}"function"==typeof SuppressedError&&SuppressedError;const d=/\{[^{}]+\}/g;function y(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:o,headers:s,requestInitExt:a,...u}={...e};a="object"==typeof process&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici?a:void 0,t=w(t);const p=[];async function l(e,l){const{baseUrl:c,fetch:y=n,Request:C=r,headers:x,params:A={},parseAs:g="json",querySerializer:q,bodySerializer:K=o??b,body:T,...E}=l||{};c&&(t=w(c));let R="function"==typeof i?i:I(i);q&&(R="function"==typeof q?q:I({..."object"==typeof i?i:{},...q}));const O=void 0===T?void 0:K(T),P=void 0===O||O instanceof FormData?{}:{"Content-Type":"application/json"},S={redirect:"follow",...u,...E,body:O,headers:m(P,s,x,A.header)};let N,U,_,j=new r(function(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=function(e,t){let r=e;for(const n of e.match(d)??[]){let e=n.substring(1,n.length-1),i=!1,o="simple";if(e.endsWith("*")&&(i=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(o="label",e=e.substring(1)):e.startsWith(";")&&(o="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;const s=t[e];Array.isArray(s)?r=r.replace(n,v(e,s,{style:o,explode:i})):r="object"!=typeof s?"matrix"!==o?r.replace(n,"label"===o?`.${encodeURIComponent(s)}`:encodeURIComponent(s)):r.replace(n,`;${f(e,s)}`):r.replace(n,h(e,s,{style:o,explode:i}))}return r}(r,t.params.path));let n=t.querySerializer(t.params.query??{});n.startsWith("?")&&(n=n.substring(1));n&&(r+=`?${n}`);return r}(e,{baseUrl:t,params:A,querySerializer:R}),S);for(const e in E)e in j||(j[e]=E[e]);if(p.length){N=Math.random().toString(36).slice(2,11),U=Object.freeze({baseUrl:t,fetch:y,parseAs:g,querySerializer:R,bodySerializer:K});for(const t of p)if(t&&"object"==typeof t&&"function"==typeof t.onRequest){const n=await t.onRequest({request:j,schemaPath:e,params:A,options:U,id:N});if(n){if(!(n instanceof r)){if(n instanceof Response){_=n;break}throw new Error("onRequest: must return new Request() or Response() when modifying the request")}j=n}}}if(!_){try{_=await y(j,a)}catch(D){let t=D;if(p.length)for(let r=p.length-1;r>=0;r--){const n=p[r];if(n&&"object"==typeof n&&"function"==typeof n.onError){const r=await n.onError({request:j,error:t,schemaPath:e,params:A,options:U,id:N});if(r){if(r instanceof Response){t=void 0,_=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(p.length)for(let t=p.length-1;t>=0;t--){const r=p[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){const t=await r.onResponse({request:j,response:_,schemaPath:e,params:A,options:U,id:N});if(t){if(!(t instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");_=t}}}}if(204===_.status||"0"===_.headers.get("Content-Length"))return _.ok?{data:void 0,response:_}:{error:void 0,response:_};if(_.ok)return"stream"===g?{data:_.body,response:_}:{data:await _[g](),response:_};let D=await _.text();try{D=JSON.parse(D)}catch{}return{error:D,response:_}}return{request:(e,t,r)=>l(t,{...r,method:e.toUpperCase()}),GET:(e,t)=>l(e,{...t,method:"GET"}),PUT:(e,t)=>l(e,{...t,method:"PUT"}),POST:(e,t)=>l(e,{...t,method:"POST"}),DELETE:(e,t)=>l(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>l(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>l(e,{...t,method:"HEAD"}),PATCH:(e,t)=>l(e,{...t,method:"PATCH"}),TRACE:(e,t)=>l(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()`");p.push(t)}},eject(...e){for(const t of e){const e=p.indexOf(t);-1!==e&&p.splice(e,1)}}}}function f(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 h(e,t,r){if(!t||"object"!=typeof t)return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if("deepObject"!==r.style&&!1===r.explode){for(const e in t)n.push(e,!0===r.allowReserved?t[e]:encodeURIComponent(t[e]));const i=n.join(",");switch(r.style){case"form":return`${e}=${i}`;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return i}}for(const i in t){const o="deepObject"===r.style?`${e}[${i}]`:i;n.push(f(o,t[i],r))}const o=n.join(i);return"label"===r.style||"matrix"===r.style?`${i}${o}`:o}function v(e,t,r){if(!Array.isArray(t))return"";if(!1===r.explode){const n={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",i=(!0===r.allowReserved?t:t.map((e=>encodeURIComponent(e)))).join(n);switch(r.style){case"simple":return i;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return`${e}=${i}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const n of t)"simple"===r.style||"label"===r.style?i.push(!0===r.allowReserved?n:encodeURIComponent(n)):i.push(f(e,n,r));return"label"===r.style||"matrix"===r.style?`${n}${i.join(n)}`:i.join(n)}function I(e){return function(t){const r=[];if(t&&"object"==typeof t)for(const n in t){const i=t[n];if(null!=i)if(Array.isArray(i)){if(0===i.length)continue;r.push(v(n,i,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}))}else"object"!=typeof i?r.push(f(n,i,e)):r.push(h(n,i,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}))}return r.join("&")}}function b(e){return e instanceof FormData?e:JSON.stringify(e)}function m(...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,n]of e)if(null===n)t.delete(r);else if(Array.isArray(n))for(const e of n)t.append(r,e);else void 0!==n&&t.set(r,n)}return t}function w(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var C,x={onRequest:function(e){return l(this,arguments,void 0,(function(e){var t=e.request;return c(this,(function(e){return t.headers.set("Content-Type","application/json"),[2,t]}))}))}},A=function(e){var t=y({baseUrl:e});return t.use(x),t},g=A(exports.API_URL.STAGING),q=A(exports.API_URL.PRODUCTION),K=r.createContext(null),T=function(){var e=r.useContext(K);if(!e)throw new Error("useIpKit must be used within an IpKitProvider");return e};function E(e){var t=e.apiClient,r=e.path,n=e.apiKey,i=e.body,o=e.additionalHeaders,s={params:{header:p({"X-Api-Key":n},o)}},a={body:i||{}};return t.POST(r,p(p({},s),a))}function R(e){var t=e.collectionAddresses,r=e.apiClient,n=e.options,i=e.apiKey;return E({apiClient:r,path:"/collections",body:p(p({orderBy:"updatedAt",orderDirection:"desc"},n),{where:p(p({},null==n?void 0:n.where),t?{collectionAddresses:t}:{})}),apiKey:i})}function O(e){return function(e){var t=e.apiClient,r=e.path,n=e.apiKey,i=e.pathParams,o=e.additionalHeaders,s={params:{path:i,header:p({"X-Api-Key":n},o)}};return t.GET(r,s)}({apiClient:e.apiClient,path:"/disputes/{disputeId}",pathParams:{disputeId:e.disputeId},apiKey:e.apiKey})}function P(e){var t=e.apiClient,r=e.initiator,n=e.targetIpId,i=e.options,o=e.apiKey;return E({apiClient:t,path:"/disputes",body:p(p({orderBy:"blockNumber",orderDirection:"desc"},i),{where:p(p(p({},null==i?void 0:i.where),r?{initiator:r}:{}),n?{targetIpId:n}:{})}),apiKey:o})}function S(e){var t=e.apiClient,r=e.ipId,n=e.parentIpId,i=e.options,o=e.apiKey;return E({apiClient:t,path:"/assets/edges",body:p(p({orderBy:"blockNumber",orderDirection:"desc"},i),{where:p(p(p({},null==i?void 0:i.where),r?{childIpId:r}:{}),n?{parentIpId:n}:{})}),apiKey:o})}function N(e){var t=e.apiClient,r=e.ownerAddress,n=e.tokenContract,i=e.includeLicenses,o=e.moderated,s=e.ipIds,a=e.options,u=e.apiKey;return E({apiClient:t,path:"/assets",body:p(p({orderBy:"blockNumber",orderDirection:"desc",includeLicenses:null!=i&&i,moderated:null!=o&&o},a),{where:p(p(p(p({},null==a?void 0:a.where),s?{ipIds:s}:{}),r?{ownerAddress:r}:{}),n?{tokenContract:n}:{})}),apiKey:u})}function U(e){var t=e.apiClient,r=e.ownerAddress,n=e.licensorIpId,i=e.options,o=e.apiKey;return E({apiClient:t,path:"/licenses/tokens",body:p(p({orderBy:"blockNumber",orderDirection:"desc"},i),{where:p(p(p({},null==i?void 0:i.where),(null==r?void 0:r.length)?{ownerAddress:r}:{}),(null==n?void 0:n.length)?{licensorIpId:n}:{})}),apiKey:o})}function _(e){var t=e.apiClient,r=e.query,n=e.mediaType,i=e.options,o=e.apiKey;return E({apiClient:t,path:"/search",body:p(p({query:r},n?{mediaType:n}:{}),i),apiKey:o})}function j(e){var t=e.apiClient,r=e.txHashes,n=e.ipIds,i=e.initiators,o=e.eventTypes,s=e.options,a=e.apiKey;return E({apiClient:t,path:"/transactions",body:p(p({orderBy:"blockNumber",orderDirection:"desc"},s),{where:p(p(p(p(p({},null==s?void 0:s.where),r?{txHashes:r}:{}),n?{ipIds:n}:{}),i?{initiators:i}:{}),o?{eventTypes:o}:{})}),apiKey:a})}exports.PIL_FLAVOR=void 0,(C=exports.PIL_FLAVOR||(exports.PIL_FLAVOR={})).NON_COMMERCIAL_SOCIAL_REMIXING="Non-Commercial Social Remixing",C.COMMERCIAL_USE="Commercial Use",C.COMMERCIAL_REMIX="Commercial Remix",C.CUSTOM="Custom",C.OPEN_USE="Open Use",exports.CHAINID_TO_CHAINNAME={1315:"story-aeneid",1514:"story"},exports.CHAINS=u,exports.IpKitProvider=function(e){var t=e.apiKey,n=e.appId,i=e.children,o=e.isTestnet,s=r.useMemo((function(){return u[o?exports.IPKIT_SUPPORTED_CHAIN.AENEID_TESTNET:exports.IPKIT_SUPPORTED_CHAIN.STORY_MAINNET]}),[o]),a=r.useMemo((function(){return o?exports.API_URL.STAGING:exports.API_URL.PRODUCTION}),[o]),p=r.useMemo((function(){return A(a)}),[a]);return r.createElement(K.Provider,{value:{apiBaseUrl:a,apiClient:p,apiKey:t,appId:n,chain:s}},i)},exports.STORY_AENEID=s,exports.STORY_MAINNET=a,exports.WRAPPED_IP=o,exports.createApiClient=A,exports.getCollections=R,exports.getDispute=O,exports.getDisputes=P,exports.getIpAssetEdges=S,exports.getIpAssets=N,exports.getLicenseTokens=U,exports.getSearch=_,exports.getTransactions=j,exports.prodClient=q,exports.stagingClient=g,exports.useCollection=function(e){var t=this,r=e.collectionAddress,i=e.queryOptions,o=T(),s=o.apiKey,a=o.apiClient;return n.useQuery(p({queryKey:["getCollection",r],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,n,i;return c(this,(function(o){switch(o.label){case 0:return[4,R({collectionAddresses:[r],apiKey:s,apiClient:a})];case 1:if(e=o.sent(),t=e.data,n=e.error)throw n;return[2,(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i[0])||null]}}))}))},enabled:!!(null==r?void 0:r.length)},i))},exports.useCollections=function(e){var t=this,r=void 0===e?{}:e,i=r.collectionAddresses,o=r.options,s=r.queryOptions,a=T(),u=a.apiKey,d=a.apiClient;return n.useQuery(p({queryKey:["getCollections",i,o],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,r;return c(this,(function(n){switch(n.label){case 0:return[4,R({collectionAddresses:i,options:o,apiKey:u,apiClient:d})];case 1:if(e=n.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},s))},exports.useDispute=function(e){var t=this,r=e.disputeId,i=e.queryOptions,o=T(),s=o.apiKey,a=o.apiClient;return n.useQuery(p({queryKey:["getDispute",r],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,n;return c(this,(function(i){switch(i.label){case 0:return[4,O({disputeId:r,apiKey:s,apiClient:a})];case 1:if(e=i.sent(),t=e.data,n=e.error)throw n;return[2,(null==t?void 0:t.data)||null]}}))}))},enabled:!!(null==r?void 0:r.length)},i))},exports.useDisputes=function(e){var t=this,r=void 0===e?{}:e,i=r.initiator,o=r.targetIpId,s=r.options,a=r.queryOptions,u=T(),d=u.apiKey,y=u.apiClient;return n.useQuery(p({queryKey:["getDisputes",s,i,o],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,r;return c(this,(function(n){switch(n.label){case 0:return[4,P({initiator:i,targetIpId:o,options:s,apiKey:d,apiClient:y})];case 1:if(e=n.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},a))},exports.useIpAsset=function(e){var t=this,r=e.ipId,i=e.includeLicenses,o=e.queryOptions,s=T(),a=s.apiKey,u=s.apiClient;return n.useQuery(p({queryKey:["getIpAsset",r,i],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,n,o;return c(this,(function(s){switch(s.label){case 0:return[4,N({ipIds:[r],includeLicenses:i,apiKey:a,apiClient:u})];case 1:if(e=s.sent(),t=e.data,n=e.error)throw n;return[2,(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o[0])||null]}}))}))},enabled:!!(null==r?void 0:r.length)},o))},exports.useIpAssetChildren=function(e){var t=this,r=void 0===e?{}:e,i=r.ipId,o=r.options,s=r.queryOptions,a=T(),u=a.apiKey,d=a.apiClient;return n.useQuery(p({queryKey:["getIpAssetEdges",void 0,i,o],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,r;return c(this,(function(n){switch(n.label){case 0:return[4,S({parentIpId:i,options:o,apiKey:u,apiClient:d})];case 1:if(e=n.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},s))},exports.useIpAssetEdges=function(e){var t=this,r=void 0===e?{}:e,i=r.ipId,o=r.parentIpId,s=r.options,a=r.queryOptions,u=T(),d=u.apiKey,y=u.apiClient;return n.useQuery(p({queryKey:["getIpAssetEdges",i,o,s],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,r;return c(this,(function(n){switch(n.label){case 0:return[4,S({ipId:i,parentIpId:o,options:s,apiKey:d,apiClient:y})];case 1:if(e=n.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},a))},exports.useIpAssetLicenses=function(e){var t=this,r=e.ipId,i=e.queryOptions,o=T(),s=o.apiKey,a=o.apiClient;return n.useQuery(p({queryKey:["getIpAsset",r,!0],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,n,i;return c(this,(function(o){switch(o.label){case 0:return[4,N({ipIds:[r],includeLicenses:!0,apiKey:s,apiClient:a})];case 1:if(e=o.sent(),t=e.data,n=e.error)throw n;return[2,(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i[0].licenses)||null]}}))}))},enabled:!!(null==r?void 0:r.length)},i))},exports.useIpAssetParents=function(e){var t=this,r=void 0===e?{}:e,i=r.ipId,o=r.options,s=r.queryOptions,a=T(),u=a.apiKey,d=a.apiClient;return n.useQuery(p({queryKey:["getIpAssetEdges",i,void 0,o],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,r;return c(this,(function(n){switch(n.label){case 0:return[4,S({ipId:i,options:o,apiKey:u,apiClient:d})];case 1:if(e=n.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},s))},exports.useIpAssets=function(e){var t=this,r=void 0===e?{}:e,i=r.ipIds,o=r.tokenContract,s=r.includeLicenses,a=r.moderated,u=r.options,d=r.queryOptions,y=T(),f=y.apiKey,h=y.apiClient;return n.useQuery(p({queryKey:["getIpAssets",i,o,s,a,u],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,r;return c(this,(function(n){switch(n.label){case 0:return[4,N({ipIds:i,tokenContract:o,includeLicenses:s,moderated:a,options:u,apiKey:f,apiClient:h})];case 1:if(e=n.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},d))},exports.useIpAssetsByOwner=function(e){var t=this,r=void 0===e?{}:e,i=r.ownerAddress,o=r.includeLicenses,s=r.moderated,a=r.options,u=r.queryOptions,d=T(),y=d.apiKey,f=d.apiClient;return n.useQuery(p({queryKey:["getIpAssets",i,o,s,a],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,r;return c(this,(function(n){switch(n.label){case 0:return[4,N({ownerAddress:i,includeLicenses:o,moderated:s,options:a,apiKey:y,apiClient:f})];case 1:if(e=n.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},u))},exports.useIpKit=T,exports.useLicenseTokens=function(e){var t=this,r=e.ownerAddress,i=e.licensorIpId,o=e.options,s=e.queryOptions,a=T(),u=a.apiKey,d=a.apiClient;return n.useQuery(p({queryKey:["getLicenseTokens",r,i,o],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,n;return c(this,(function(s){switch(s.label){case 0:return[4,U({ownerAddress:r,licensorIpId:i,options:o,apiKey:u,apiClient:d})];case 1:if(e=s.sent(),t=e.data,n=e.error)throw n;return[2,t]}}))}))}},s))},exports.useSearch=function(e){var t=this,r=e.query,i=e.mediaType,o=e.queryOptions,s=T(),a=s.apiKey,u=s.apiClient;return n.useQuery(p({queryKey:["getSearch",r,i],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,n;return c(this,(function(o){switch(o.label){case 0:return[4,_({query:r,mediaType:i,apiKey:a,apiClient:u})];case 1:if(e=o.sent(),t=e.data,n=e.error)throw n;return[2,t]}}))}))},enabled:!!(null==r?void 0:r.length)},o))},exports.useTransaction=function(e){var t=this,r=e.txHash,i=e.queryOptions,o=T(),s=o.apiKey,a=o.apiClient;return n.useQuery(p({queryKey:["getTransactions",r],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,n,i;return c(this,(function(o){switch(o.label){case 0:return[4,j({txHashes:[r],apiKey:s,apiClient:a})];case 1:if(e=o.sent(),t=e.data,n=e.error)throw n;return[2,(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i[0])||null]}}))}))},enabled:!!(null==r?void 0:r.length)},i))},exports.useTransactions=function(e){var t=this,r=void 0===e?{}:e,i=r.txHashes,o=r.ipIds,s=r.initiators,a=r.eventTypes,u=r.options,d=r.queryOptions,y=T(),f=y.apiKey,h=y.apiClient;return n.useQuery(p({queryKey:["getTransactions",i,o,s,a,u],queryFn:function(){return l(t,void 0,void 0,(function(){var e,t,r;return c(this,(function(n){switch(n.label){case 0:return[4,j({txHashes:i,ipIds:o,initiators:s,eventTypes:a,options:u,apiKey:f,apiClient:h})];case 1:if(e=n.sent(),t=e.data,r=e.error)throw r;return[2,t]}}))}))}},d))};
|
|
2
2
|
//# sourceMappingURL=storyprotocol-storykit.cjs.js.map
|