to the Indian tribes and tribal organizations with a plan approved under subpart 1 of part B of title IV of the Social Security Act, based on each tribe or tribal organization’s share of the total tribal child population among all such tribes and tribal organizations. (b) Funding certainty for States with expiring demonstration projects (1) In general Out of any money in the Treasury of the United States not otherwise appropriated, there are appropriated to the Secretary, for payment to each State that was operating a demonstration project approved under section 1130 of the Social Security Act on September 30, 2019, for each fiscal year specified in paragraph (2) of this subsection, an amount equal to the amount (if any) by which— (A) (i) the applicable percentage for the fiscal year so specified of the maximum capped allocation due to the State or sub-State jurisdiction for fiscal year 2019 for foster care maintenance, administration, or training costs, under the demonstration project, as specified in section 4.3 of the State waiver terms and conditions document capped allocation payment table in effect on August 31, 2019