Ajout projet webAduc
@@ -0,0 +1,42 @@
|
||||
FROM alpine:3.12
|
||||
LABEL author="Serge NOEL <serge.noel@easylinux.fr>" \
|
||||
name="Samba AD DC - Alpine" \
|
||||
description="Provides a Docker image for Samba 4 DC on Alpine Linux."
|
||||
|
||||
# Install
|
||||
RUN apk add --no-cache samba-dc \
|
||||
# Remove default config data, if any
|
||||
&& rm -rf /etc/samba \
|
||||
&& rm -rf /var/lib/samba \
|
||||
&& rm -rf /var/log/samba \
|
||||
# Create needed symbolic links
|
||||
&& ln -s /samba/etc /etc/samba \
|
||||
&& ln -s /samba/lib /var/lib/samba \
|
||||
&& ln -s /samba/log /var/log/samba
|
||||
|
||||
# Ports
|
||||
EXPOSE 37/udp \
|
||||
53 \
|
||||
88 \
|
||||
123/udp \
|
||||
135/tcp \
|
||||
137/udp \
|
||||
138/udp \
|
||||
139 \
|
||||
389 \
|
||||
445 \
|
||||
464 \
|
||||
636/tcp \
|
||||
49152-65535/tcp \
|
||||
3268/tcp \
|
||||
3269/tcp
|
||||
|
||||
# Volume config
|
||||
VOLUME ["/samba"]
|
||||
|
||||
# Entrypoint
|
||||
COPY ./entrypoint.sh /
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["samba"]
|
||||
|
||||
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,59 @@
|
||||
# Samba4 AD-DC docker container
|
||||
|
||||
This docker container runs Samba4 as an Active Directory Domain Controller.
|
||||
|
||||
The first time you start the container, samba-tool will be invoked to set it up using the supplied [environment variables](#environment-variables).
|
||||
After set is complete, the container will continue starting to get the DC up and running.
|
||||
|
||||
The container saves all necessary files within a volume mounted at '/samba'.
|
||||
See the following examples on how to start/setup the DC. It works best with host networking. With host networking, you'll need to ensure you allow the requisite firewall ports through at the host-level, too.
|
||||
|
||||
## Examples
|
||||
|
||||
### New domain
|
||||
|
||||
```bash
|
||||
docker run -it \
|
||||
-e SAMBA_DC_REALM="samdom.example.com" \
|
||||
-e SAMBA_DC_ADMIN_PASSWD="Password1!" \
|
||||
-e SAMBA_DC_ACTION="provision" \
|
||||
-e SAMBA_DC_DNS_FORWARDER="8.8.8.8 8.8.4.4" \
|
||||
-e SAMBA_DC_DOMAIN="SAMDOM_EXAMPLE" \
|
||||
-v ${PWD}/samba_provision:/samba \
|
||||
--net host --privileged \
|
||||
-h dc1.samdom.example.com -P \
|
||||
--restart=unless-stopped \
|
||||
--name dc1 \
|
||||
easylinux/samba-ad-dc
|
||||
```
|
||||
|
||||
### Join an existing domain
|
||||
|
||||
```bash
|
||||
docker run -it \
|
||||
-e SAMBA_DC_REALM=samdom.example.com" \
|
||||
-e SAMBA_DC_ADMIN_PASSWD="Password1!" \
|
||||
-e SAMBA_DC_ACTION="join" \
|
||||
-e SAMBA_DC_DNS_FORWARDER="8.8.8.8 8.8.4.4" \
|
||||
-e SAMBA_DC_DOMAIN="SAMDOM_EXAMPLE" \
|
||||
-e SAMBA_DC_MASTER="192.168.1.2" \
|
||||
-v ${PWD}/samba_join:/samba \
|
||||
--net host --privileged \
|
||||
-h dc2.samdom.example.com -P \
|
||||
--restart=unless-stopped \
|
||||
--name dc2 \
|
||||
easylinux/samba-ad-dc
|
||||
```
|
||||
|
||||
## Environment variables
|
||||
|
||||
The following environment variables are all used as part of the DC setup process.
|
||||
If the DC has been setup, none of htese variables have any effect on the container.
|
||||
|
||||
- `SAMBA_DC_REALM` (*required*) The realm (FQDN) for the domain. (e.q. `samdom.example.com`).
|
||||
- `SAMBA_DC_ACTION` (*required*) The action to take for setup. Must either be `provision` or `join`.
|
||||
- `SAMBA_DC_MASTER` (*required for joining*) The master DC to join. Should be an IP address.
|
||||
- `SAMBA_DC_ADMIN_PASSWD` (*required for joining*) The Administrator password for the domain. Will randomly generate if not specified, but *must* be correct to join an existing domain.
|
||||
- `SAMBA_DC_DNS_FORWARDER` (*optional*) Space separated list of DNS servers to which recursive queries should be forwarded.
|
||||
- `SAMBA_OPTIONS` (*optional*) Additional options to samba-tool. See man page for available options.
|
||||
- `SAMBA_DC_DOMAIN` (*optional*) Short name for the domain to create/join. Set to leftmost part of `SAMBA_DC_REALM` if unspecified.
|
||||
@@ -0,0 +1,82 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Required environment variables
|
||||
# SAMBA_DC_REALM - Samba Realm
|
||||
# SAMBA_DC_ACTION - Action to take (provision or join)
|
||||
# SAMBA_DC_MASTER - Only required or used during domain join. IP Address of existing DC to join.
|
||||
# SAMBA_DC_ADMIN_PASSWD - Administrator password (only used to provision or join domain). If not specified, will randomly generate. Must be correct to join.
|
||||
|
||||
# Optional environment variables
|
||||
# SAMBA_DC_DNS_FORWARDER - IP address to forward DNS requests to (accepts space separated list)
|
||||
# SAMBA_OPTIONS - Raw options to be passed to samba-tool during provision/join
|
||||
# SAMBA_DC_DOMAIN - Samba AD Domain shortname. Set to leftmost part of SAMBA_DC_REALM if unspecified.
|
||||
|
||||
set -e
|
||||
|
||||
COMMAND=ash
|
||||
|
||||
# Add $COMMAND if needed
|
||||
if [ "${1:0:1}" = "-" ]
|
||||
then
|
||||
set -- $COMMAND "$@"
|
||||
fi
|
||||
|
||||
info () {
|
||||
echo "[INFO] $@"
|
||||
}
|
||||
|
||||
if [ ! -f /samba/etc/smb.conf ]; then
|
||||
|
||||
: "${SAMBA_DC_REALM:?SAMBA_DC_REALM must be set}"
|
||||
: "${SAMBA_DC_ACTION:?SAMBA_DC_ACTION must be set}"
|
||||
|
||||
SAMBA_DC_ADMIN_PASSWD=${SAMBA_DC_ADMIN_PASSWD:-`(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c20; echo) 2>/dev/null`}
|
||||
info "Samba Administrator password set to: ${SAMBA_DC_ADMIN_PASSWD}"
|
||||
|
||||
SAMBA_OPTIONS=${SAMBA_OPTIONS:-}
|
||||
|
||||
SAMBA_DC_DOMAIN=${SAMBA_DC_DOMAIN:-${SAMBA_DC_REALM%%.*}}
|
||||
info "Samba Domain shortname set to: ${SAMBA_DC_DOMAIN}"
|
||||
mkdir -p /samba/etc /samba/lib /samba/log
|
||||
case "${SAMBA_DC_ACTION}" in
|
||||
"join")
|
||||
: "${SAMBA_DC_MASTER:?SAMBA_DC_MASTER must be set to join a domain}"
|
||||
info "${SAMBA_DC_DOMAIN} - Begin Domain Joining"
|
||||
samba-tool domain join "${SAMBA_DC_REALM}" "DC" \
|
||||
--server="${SAMBA_DC_MASTER}" \
|
||||
--dns-backend="SAMBA_INTERNAL" \
|
||||
--username="Administrator" \
|
||||
--password="${SAMBA_DC_ADMIN_PASSWD}" \
|
||||
--workgroup="${SAMBA_DC_DOMAIN}" \
|
||||
$SAMBA_OPTIONS \
|
||||
--option="bind interfaces only"="yes" \
|
||||
--option="dns forwarder"="${SAMBA_DC_DNS_FORWARDER}" \
|
||||
--option="idmap_ldb:use rfc2307"="yes"
|
||||
info "${SAMBA_DC_DOMAIN} - Domain Joining Successful"
|
||||
;;
|
||||
"provision")
|
||||
info "${SAMBA_DC_DOMAIN} - Begin Domain Provisioning"
|
||||
samba-tool domain provision --domain="${SAMBA_DC_DOMAIN}" \
|
||||
--adminpass="${SAMBA_DC_ADMIN_PASSWD}" \
|
||||
--server-role=dc \
|
||||
--realm="${SAMBA_DC_REALM}" \
|
||||
--dns-backend="SAMBA_INTERNAL" \
|
||||
--use-rfc2307 \
|
||||
$SAMBA_OPTIONS \
|
||||
--option="bind interfaces only"=yes \
|
||||
--option="dns forwarder"="${SAMBA_DC_DNS_FORWARDER}"
|
||||
info "${SAMBA_DC_DOMAIN} - Domain Provisioning Successful"
|
||||
;;
|
||||
*)
|
||||
: "${SAMBA_ERROR_OUT:?SAMBA_DC_ACTION must be either 'provision' or 'join'}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ "$1" = 'samba' ]
|
||||
then
|
||||
exec /usr/sbin/samba -i
|
||||
fi
|
||||
|
||||
# If we get here, the user wants to run their own command. Let them.
|
||||
exec "$@"
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
@@ -1,2 +1,11 @@
|
||||
# Easycloud
|
||||
|
||||
## Introduction
|
||||
|
||||
## Fonctionnalités
|
||||
|
||||
* Dhcp
|
||||
* iPxe
|
||||
* AD/Ldap
|
||||
* webAduc
|
||||
* Stockage des datas dans AD
|
||||
@@ -0,0 +1,2 @@
|
||||
www/vendor/*
|
||||
www/templates_c/*
|
||||
@@ -0,0 +1,12 @@
|
||||
FROM alpine:3.12
|
||||
|
||||
RUN apk add php7-apache2 php7-ldap php7-session php7-json
|
||||
RUN sed -i "s|/var/www/localhost/htdocs|/var/www/html|g" /etc/apache2/httpd.conf
|
||||
# RUN rm /var/log/apache2/access.log /var/log/apache2/error.log
|
||||
RUN ln -s /dev/stdout /var/log/apache2/access.log
|
||||
RUN ln -s /dev/stderr /var/log/apache2/error.log
|
||||
WORKDIR /var/www/html
|
||||
|
||||
VOLUME /var/www/html
|
||||
EXPOSE 80
|
||||
CMD ["/usr/sbin/httpd","-D","FOREGROUND"]
|
||||
@@ -0,0 +1,811 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="robots" content="index, follow, all">
|
||||
<meta name="Author" content="SensioLabs">
|
||||
<meta name="Language" content="en">
|
||||
<meta name="Copyright" content="Sensio">
|
||||
<meta name="Publisher" content="Sensio">
|
||||
<meta name="Description" content="Twig - The flexible, fast, and secure template engine for PHP">
|
||||
<meta name="Keywords" content="twig, templating, template, engine, template engine, template language, php">
|
||||
|
||||
<title>Twig for Developers - Documentation - Twig - The flexible, fast, and secure PHP template engine</title>
|
||||
|
||||
<link href="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/reset-min.css" rel="stylesheet" type="text/css">
|
||||
<link href="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/base.css" rel="stylesheet" type="text/css">
|
||||
<link href="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/colors.css" rel="stylesheet" type="text/css">
|
||||
<link href="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/code.css" rel="stylesheet" type="text/css">
|
||||
<link href="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/pygments.css" rel="stylesheet" type="text/css">
|
||||
|
||||
|
||||
<link href="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/sln.css" rel="stylesheet" type="text/css" media="all">
|
||||
|
||||
<script async="true" type="text/javascript" src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/event.js" data-owner="criteo-tag"></script><script type="text/javascript" async="" src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/ld.js"></script><script type="text/javascript" async="" src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/dc.js"></script><script src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/sln.js" id="sln_bar"></script><script type="text/javascript" src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/jquery-1.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(w, d, s) {
|
||||
function go() {
|
||||
var js, fjs = d.getElementsByTagName(s)[0], load = function(url, id) {
|
||||
if (d.getElementById(id)) {return;}
|
||||
js = d.createElement(s); js.src = url; js.id = id;
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
};
|
||||
load('https://connect.sensiolabs.com/sln.js?customize_url=/js/sln_customize.js', 'sln_bar');
|
||||
}
|
||||
if (w.addEventListener) { w.addEventListener("load", go, false); }
|
||||
else if (w.attachEvent) { w.attachEvent("onload",go); }
|
||||
} (window, document, 'script'));
|
||||
</script>
|
||||
|
||||
<!--[if IE 6]>
|
||||
<script type="text/javascript" src="/js/DD_belatedPNG_0.0.7a-min.js"></script>
|
||||
<script type="text/javascript">
|
||||
DD_belatedPNG.fix('.png_fix');
|
||||
</script>
|
||||
<![endif]-->
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10931939-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script');
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
ga.setAttribute('async', 'true');
|
||||
document.documentElement.firstChild.appendChild(ga);
|
||||
})();
|
||||
</script><script src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/ga.js" async="true"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="sln"><div class="sln-bar"><div class="sln-bar-inner"><div class="sln-network"><a href="#" class="sln-hidden-phone">SensioLabs<span>World</span></a><a href="#" class="sln-visible-phone">SL<span>W</span></a></div> <div class="sln-ad"><a href="https://sensiolabs.com/en/twig/certification.html" data-ga="twig_certification" class="sln-visible-phone"><img src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/da02766c-18d7-4302-aede-0547d35f0ad8.png">Twig Certification</a><a href="https://sensiolabs.com/en/twig/certification.html" data-ga="twig_certification" class="sln-visible-tablet"><img src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/da02766c-18d7-4302-aede-0547d35f0ad8.png">Twig Certification now available</a><a href="https://sensiolabs.com/en/twig/certification.html" data-ga="twig_certification" class="sln-visible-desktop"><img src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/da02766c-18d7-4302-aede-0547d35f0ad8.png">Twig Certification now available in 4,000 exam centers around the world</a></div>
|
||||
</div>
|
||||
<div class="sln-dropdown-network sln-dropdown sln-hidden"><div class="sln-container"><div class="sln-row"><div class="sln-span6"><div class="sln-row"><div class="sln-span3"><img src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/sensiolabs.png" alt="SensioLabs"><p>Since
|
||||
1998, SensioLabs has been promoting the Open-Source software movement
|
||||
by providing quality and performant web application development
|
||||
products, trainings, and consulting. SensioLabs also supports multiple
|
||||
important Open-Source projects. <br><a data-ga="sln_learn_more" href="http://sensiolabs.com/en">Learn more</a></p><div><a data-ga="sln_sl_international" href="http://sensiolabs.com/en">International</a></div><ul class="sln-websites"><li>Local:</li><li class="first"><a data-ga="sln_sl_FR" href="http://sensiolabs.com/fr">France</a></li><li><a data-ga="sln_sl_DE" href="http://sensiolabs.de/">Germany</a></li></ul></div><div class="sln-span3 sln-ads"><h2>In the Spotlight</h2><div><a data-ga="sln_insight_thumb" href="https://insight.sensiolabs.com/"><img src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/sensiolabsinsight.png" alt="SensioLabsInsight"></a></div><div><a data-ga="sln_blackfire_thumb" href="https://blackfire.io/"><img src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/blackfire.png" alt="Blackfire"></a></div></div></div></div><div class="sln-span6 sln-products-listing sln-right-box"><div class="sln-row"><div class="sln-span3"><h2>Open Source</h2><ul><li><a data-ga="sln_sf" href="http://symfony.com/">Symfony - Web framework</a></li><li><a data-ga="sln_twig" href="http://twig.sensiolabs.org/">Twig - Templating</a></li><li><a data-ga="sln_silex" href="http://silex.sensiolabs.org/">Silex - Micro-framework</a></li><li><a data-ga="sln_swift" href="http://www.swiftmailer.org/">Swift Mailer - E-Mailing</a></li></ul></div><div class="sln-span3"><h2>Products</h2><ul><li><a data-ga="sln_insight" href="https://insight.sensiolabs.com/">Insight: PHP Quality</a></li><li><a data-ga="sln_profiler" href="https://blackfire.io/">Blackfire: Web App performance</a></li><li><a data-ga="sln_sensiocloud" href="https://sensio.cloud/">SensioCloud: PaaS for Symfony</a></li><li><a data-ga="sln_security_checker" href="https://security.sensiolabs.org/">Security checker</a></li></ul></div></div><div class="sln-row"><div class="sln-span3"><h2>Solutions & Services</h2><ul><li><a data-ga="sln_training" href="https://training.sensiolabs.com/">Training</a></li><li><a data-ga="sln_certification" href="https://sensiolabs.com/certification">Certification</a></li><li><a data-ga="sln_services" href="https://sensiolabs.com/solutions">Technical Solutions</a></li><li><a data-ga="sln_university" href="https://sensiolabs.com/en/university/index.html">SensioLabs University</a></li><li><a data-ga="sln_experts" href="http://expert.sensiolabs.com/">Experts</a></li></ul></div><div class="sln-span3"><h2>Community</h2><ul><li><a data-ga="sln_connect" href="https://connect.sensiolabs.com/">Community</a></li><li><a data-ga="sln_live" href="http://live.symfony.com/">Conferences</a></li><li><a data-ga="sln_youtube" href="https://www.youtube.com/user/SensioLabs">Videos</a></li><li><a data-ga="sln_partners" href="https://network.sensiolabs.com/en/">Partners</a></li><li><a data-ga="sln_job_board" href="http://jobs.sensiolabs.com/">Job Board</a></li></ul></div></div></div><div class="sln-right-box sln-our-blogs"><div class="sln-row "><div class="sln-span5"><h2>Our Blogs</h2>
|
||||
<a href="http://symfony.com/blog/">Symfony</a>,
|
||||
<a href="http://blog.sensiolabs.com/">SensioLabs</a>,
|
||||
<a href="http://blog.insight.sensiolabs.com/">Insight</a>,
|
||||
and <a href="http://blog.blackfire.io/">Blackfire</a>.
|
||||
</div></div></div></div></div></div>
|
||||
|
||||
</div></div>
|
||||
<div class="hd">
|
||||
<div class="illustration png_fix">
|
||||
<div class="content">
|
||||
<div class="sensio_product">
|
||||
<img class="png_fix" src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/sensio-labs-product.svg" alt="a SensioLabs Product" height="18">
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<div class="logo_header"><a href="https://twig.sensiolabs.org/">Twig</a></div>
|
||||
<h1 class="title_header">
|
||||
The flexible, fast, and secure<br>template engine for PHP
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="menu">
|
||||
<ul>
|
||||
<li><a href="https://twig.sensiolabs.org/">ABOUT</a></li>
|
||||
<li><a class="active" href="https://twig.sensiolabs.org/doc/2.x/">DOCUMENTATION</a></li>
|
||||
<li><a href="https://twig.sensiolabs.org/development">DEVELOPMENT</a></li>
|
||||
<li><a href="https://twig.sensiolabs.org/contributors">CONTRIBUTORS</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bd">
|
||||
<div class="content">
|
||||
<div class="alert">
|
||||
|
||||
You are reading the documentation for Twig 2.x.
|
||||
|
||||
Switch to the documentation for Twig
|
||||
<a href="https://twig.sensiolabs.org/doc/1.x/">1.x</a>.
|
||||
</div>
|
||||
|
||||
|
||||
<div class="infobar clearfix">
|
||||
<div id="doc-toc" class="infobar-box">
|
||||
<h3>Table of Contents</h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Twig for Developers</a><ul>
|
||||
<li><a class="reference internal" href="#basics">Basics</a></li>
|
||||
<li><a class="reference internal" href="#rendering-templates">Rendering Templates</a></li>
|
||||
<li><a class="reference internal" href="#environment-options">Environment Options</a></li>
|
||||
<li><a class="reference internal" href="#loaders">Loaders</a><ul>
|
||||
<li><a class="reference internal" href="#compilation-cache">Compilation Cache</a></li>
|
||||
<li><a class="reference internal" href="#built-in-loaders">Built-in Loaders</a><ul>
|
||||
<li><a class="reference internal" href="#twig-loader-filesystem"><code class="notranslate">Twig_Loader_Filesystem</code></a></li>
|
||||
<li><a class="reference internal" href="#twig-loader-array"><code class="notranslate">Twig_Loader_Array</code></a></li>
|
||||
<li><a class="reference internal" href="#twig-loader-chain"><code class="notranslate">Twig_Loader_Chain</code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#create-your-own-loader">Create your own Loader</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#using-extensions">Using Extensions</a></li>
|
||||
<li><a class="reference internal" href="#built-in-extensions">Built-in Extensions</a><ul>
|
||||
<li><a class="reference internal" href="#core-extension">Core Extension</a></li>
|
||||
<li><a class="reference internal" href="#escaper-extension">Escaper Extension</a></li>
|
||||
<li><a class="reference internal" href="#sandbox-extension">Sandbox Extension</a></li>
|
||||
<li><a class="reference internal" href="#profiler-extension">Profiler Extension</a></li>
|
||||
<li><a class="reference internal" href="#optimizer-extension">Optimizer Extension</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#exceptions">Exceptions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="infobar-box">
|
||||
<h3>Questions & Feedback</h3>
|
||||
<div class="feedback">
|
||||
<p>
|
||||
<strong>Found a typo or an error?</strong><br>
|
||||
Want to improve this document? <a href="https://github.com/twigphp/Twig/edit/2.x/doc/api.rst">Edit</a> it.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Need support or have a technical question?</strong><br>
|
||||
Ask support on <a href="https://stackoverflow.com/">Stack Overflow</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h3>License</h3>
|
||||
<div id="license">
|
||||
Twig <span xmlns:dc="https://purl.org/dc/elements/1.1/" href="https://purl.org/dc/dcmitype/MovingImage" rel="dc:type">documentation</span> is licensed under the
|
||||
new BSD <a rel="license" href="https://twig.sensiolabs.org/license">license</a>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="body-web">
|
||||
<div class="section" id="twig-for-developers">
|
||||
<h1>Twig for Developers<a class="headerlink" href="#twig-for-developers" title="Permalink to this headline">¶</a></h1>
|
||||
<p>This chapter describes the API to Twig and not the template language. It will
|
||||
be most useful as reference to those implementing the template interface to
|
||||
the application and not those who are creating Twig templates.</p>
|
||||
<div class="section" id="basics">
|
||||
<h2>Basics<a class="headerlink" href="#basics" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Twig uses a central object called the <strong>environment</strong> (of class
|
||||
<code class="notranslate">Twig_Environment</code>). Instances of this class are used to store the
|
||||
configuration and extensions, and are used to load templates from the file
|
||||
system or other locations.</p>
|
||||
<p>Most applications will create one <code class="notranslate">Twig_Environment</code> object on application
|
||||
initialization and use that to load templates. In some cases it's however
|
||||
useful to have multiple environments side by side, if different configurations
|
||||
are in use.</p>
|
||||
<p>The simplest way to configure Twig to load templates for your application
|
||||
looks roughly like this:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">require_once</span> <span class="s1">'/path/to/vendor/autoload.php'</span><span class="p">;</span>
|
||||
|
||||
<span class="nv">$loader</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Loader_Filesystem</span><span class="p">(</span><span class="s1">'/path/to/templates'</span><span class="p">);</span>
|
||||
<span class="nv">$twig</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Environment</span><span class="p">(</span><span class="nv">$loader</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span>
|
||||
<span class="s1">'cache'</span> <span class="o">=></span> <span class="s1">'/path/to/compilation_cache'</span><span class="p">,</span>
|
||||
<span class="p">));</span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
<p>This will create a template environment with the default settings and a loader
|
||||
that looks up the templates in the <code class="notranslate">/path/to/templates/</code> folder. Different
|
||||
loaders are available and you can also write your own if you want to load
|
||||
templates from a database or other resources.</p>
|
||||
<div class="admonition-wrapper">
|
||||
<div class="note"></div><div class="admonition admonition-note"><p class="first admonition-title">Note</p>
|
||||
<p class="last">Notice that the second argument of the environment is an array of options.
|
||||
The <code class="notranslate">cache</code> option is a compilation cache directory, where Twig caches
|
||||
the compiled templates to avoid the parsing phase for sub-sequent
|
||||
requests. It is very different from the cache you might want to add for
|
||||
the evaluated templates. For such a need, you can use any available PHP
|
||||
cache library.</p>
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="section" id="rendering-templates">
|
||||
<h2>Rendering Templates<a class="headerlink" href="#rendering-templates" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To load a template from a Twig environment, call the <code class="notranslate">load()</code> method which
|
||||
returns a <code class="notranslate">Twig_TemplateWrapper</code> instance:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$template</span> <span class="o">=</span> <span class="nv">$twig</span><span class="o">-></span><span class="na">load</span><span class="p">(</span><span class="s1">'index.html'</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>To render the template with some variables, call the <code class="notranslate">render()</code> method:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nv">$template</span><span class="o">-></span><span class="na">render</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="s1">'the'</span> <span class="o">=></span> <span class="s1">'variables'</span><span class="p">,</span> <span class="s1">'go'</span> <span class="o">=></span> <span class="s1">'here'</span><span class="p">));</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<div class="admonition-wrapper">
|
||||
<div class="note"></div><div class="admonition admonition-note"><p class="first admonition-title">Note</p>
|
||||
<p class="last">The <code class="notranslate">display()</code> method is a shortcut to output the template directly.</p>
|
||||
</div></div>
|
||||
<p>You can also load and render the template in one fell swoop:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nv">$twig</span><span class="o">-></span><span class="na">render</span><span class="p">(</span><span class="s1">'index.html'</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s1">'the'</span> <span class="o">=></span> <span class="s1">'variables'</span><span class="p">,</span> <span class="s1">'go'</span> <span class="o">=></span> <span class="s1">'here'</span><span class="p">));</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>If a template defines blocks, they can be rendered individually via the
|
||||
<code class="notranslate">renderBlock()</code> call:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nv">$template</span><span class="o">-></span><span class="na">renderBlock</span><span class="p">(</span><span class="s1">'block_name'</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s1">'the'</span> <span class="o">=></span> <span class="s1">'variables'</span><span class="p">,</span> <span class="s1">'go'</span> <span class="o">=></span> <span class="s1">'here'</span><span class="p">));</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="section" id="environment-options">
|
||||
<span id="id1"></span><h2>Environment Options<a class="headerlink" href="#environment-options" title="Permalink to this headline">¶</a></h2>
|
||||
<p>When creating a new <code class="notranslate">Twig_Environment</code> instance, you can pass an array of
|
||||
options as the constructor second argument:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$twig</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Environment</span><span class="p">(</span><span class="nv">$loader</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s1">'debug'</span> <span class="o">=></span> <span class="k">true</span><span class="p">));</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>The following options are available:</p>
|
||||
<ul>
|
||||
<li><p class="first"><code class="notranslate">debug</code> <em>boolean</em></p>
|
||||
<p>When set to <code class="notranslate">true</code>, the generated templates have a
|
||||
<code class="notranslate">__toString()</code> method that you can use to display the generated nodes
|
||||
(default to <code class="notranslate">false</code>).</p>
|
||||
</li>
|
||||
<li><p class="first"><code class="notranslate">charset</code> <em>string</em> (defaults to <code class="notranslate">utf-8</code>)</p>
|
||||
<p>The charset used by the templates.</p>
|
||||
</li>
|
||||
<li><p class="first"><code class="notranslate">base_template_class</code> <em>string</em> (defaults to <code class="notranslate">Twig_Template</code>)</p>
|
||||
<p>The base template class to use for generated
|
||||
templates.</p>
|
||||
</li>
|
||||
<li><p class="first"><code class="notranslate">cache</code> <em>string</em> or <code class="notranslate">false</code></p>
|
||||
<p>An absolute path where to store the compiled templates, or
|
||||
<code class="notranslate">false</code> to disable caching (which is the default).</p>
|
||||
</li>
|
||||
<li><p class="first"><code class="notranslate">auto_reload</code> <em>boolean</em></p>
|
||||
<p>When developing with Twig, it's useful to recompile the
|
||||
template whenever the source code changes. If you don't provide a value for
|
||||
the <code class="notranslate">auto_reload</code> option, it will be determined automatically based on the
|
||||
<code class="notranslate">debug</code> value.</p>
|
||||
</li>
|
||||
<li><p class="first"><code class="notranslate">strict_variables</code> <em>boolean</em></p>
|
||||
<p>If set to <code class="notranslate">false</code>, Twig will silently ignore invalid
|
||||
variables (variables and or attributes/methods that do not exist) and
|
||||
replace them with a <code class="notranslate">null</code> value. When set to <code class="notranslate">true</code>, Twig throws an
|
||||
exception instead (default to <code class="notranslate">false</code>).</p>
|
||||
</li>
|
||||
<li><p class="first"><code class="notranslate">autoescape</code> <em>string</em></p>
|
||||
<p>Sets the default auto-escaping strategy (<code class="notranslate">name</code>, <code class="notranslate">html</code>, <code class="notranslate">js</code>, <code class="notranslate">css</code>,
|
||||
<code class="notranslate">url</code>, <code class="notranslate">html_attr</code>, or a PHP callback that takes the template "filename"
|
||||
and returns the escaping strategy to use -- the callback cannot be a function
|
||||
name to avoid collision with built-in escaping strategies); set it to
|
||||
<code class="notranslate">false</code> to disable auto-escaping. The <code class="notranslate">name</code> escaping strategy determines
|
||||
the escaping strategy to use for a template based on the template filename
|
||||
extension (this strategy does not incur any overhead at runtime as
|
||||
auto-escaping is done at compilation time.)</p>
|
||||
</li>
|
||||
<li><p class="first"><code class="notranslate">optimizations</code> <em>integer</em></p>
|
||||
<p>A flag that indicates which optimizations to apply
|
||||
(default to <code class="notranslate">-1</code> -- all optimizations are enabled; set it to <code class="notranslate">0</code> to
|
||||
disable).</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="loaders">
|
||||
<h2>Loaders<a class="headerlink" href="#loaders" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Loaders are responsible for loading templates from a resource such as the file
|
||||
system.</p>
|
||||
<div class="section" id="compilation-cache">
|
||||
<h3>Compilation Cache<a class="headerlink" href="#compilation-cache" title="Permalink to this headline">¶</a></h3>
|
||||
<p>All template loaders can cache the compiled templates on the filesystem for
|
||||
future reuse. It speeds up Twig a lot as templates are only compiled once; and
|
||||
the performance boost is even larger if you use a PHP accelerator such as APC.
|
||||
See the <code class="notranslate">cache</code> and <code class="notranslate">auto_reload</code> options of <code class="notranslate">Twig_Environment</code> above
|
||||
for more information.</p>
|
||||
</div>
|
||||
<div class="section" id="built-in-loaders">
|
||||
<h3>Built-in Loaders<a class="headerlink" href="#built-in-loaders" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Here is a list of the built-in loaders Twig provides:</p>
|
||||
<div class="section" id="twig-loader-filesystem">
|
||||
<h4><code class="notranslate">Twig_Loader_Filesystem</code><a class="headerlink" href="#twig-loader-filesystem" title="Permalink to this headline">¶</a></h4>
|
||||
<p><code class="notranslate">Twig_Loader_Filesystem</code> loads templates from the file system. This loader
|
||||
can find templates in folders on the file system and is the preferred way to
|
||||
load them:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$loader</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Loader_Filesystem</span><span class="p">(</span><span class="nv">$templateDir</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>It can also look for templates in an array of directories:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$loader</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Loader_Filesystem</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="nv">$templateDir1</span><span class="p">,</span> <span class="nv">$templateDir2</span><span class="p">));</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>With such a configuration, Twig will first look for templates in
|
||||
<code class="notranslate">$templateDir1</code> and if they do not exist, it will fallback to look for them
|
||||
in the <code class="notranslate">$templateDir2</code>.</p>
|
||||
<p>You can add or prepend paths via the <code class="notranslate">addPath()</code> and <code class="notranslate">prependPath()</code>
|
||||
methods:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$loader</span><span class="o">-></span><span class="na">addPath</span><span class="p">(</span><span class="nv">$templateDir3</span><span class="p">);</span>
|
||||
<span class="nv">$loader</span><span class="o">-></span><span class="na">prependPath</span><span class="p">(</span><span class="nv">$templateDir4</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>The filesystem loader also supports namespaced templates. This allows to group
|
||||
your templates under different namespaces which have their own template paths.</p>
|
||||
<p>When using the <code class="notranslate">setPaths()</code>, <code class="notranslate">addPath()</code>, and <code class="notranslate">prependPath()</code> methods,
|
||||
specify the namespace as the second argument (when not specified, these
|
||||
methods act on the "main" namespace):</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$loader</span><span class="o">-></span><span class="na">addPath</span><span class="p">(</span><span class="nv">$templateDir</span><span class="p">,</span> <span class="s1">'admin'</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>Namespaced templates can be accessed via the special
|
||||
<code class="notranslate">@namespace_name/template_path</code> notation:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$twig</span><span class="o">-></span><span class="na">render</span><span class="p">(</span><span class="s1">'@admin/index.html'</span><span class="p">,</span> <span class="k">array</span><span class="p">());</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p><code class="notranslate">Twig_Loader_Filesystem</code> support absolute and relative paths. Using relative
|
||||
paths is preferred as it makes the cache keys independent of the project root
|
||||
directory (for instance, it allows warming the cache from a build server where
|
||||
the directory might be different from the one used on production servers):</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$loader</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Loader_Filesystem</span><span class="p">(</span><span class="s1">'templates'</span><span class="p">,</span> <span class="nb">getcwd</span><span class="p">()</span><span class="o">.</span><span class="s1">'/..'</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<div class="admonition-wrapper">
|
||||
<div class="note"></div><div class="admonition admonition-note"><p class="first admonition-title">Note</p>
|
||||
<p class="last">When not passing the root path as a second argument, Twig uses <code class="notranslate">getcwd()</code>
|
||||
for relative paths.</p>
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="section" id="twig-loader-array">
|
||||
<h4><code class="notranslate">Twig_Loader_Array</code><a class="headerlink" href="#twig-loader-array" title="Permalink to this headline">¶</a></h4>
|
||||
<p><code class="notranslate">Twig_Loader_Array</code> loads a template from a PHP array. It's passed an array
|
||||
of strings bound to template names:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nv">$loader</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Loader_Array</span><span class="p">(</span><span class="k">array</span><span class="p">(</span>
|
||||
<span class="s1">'index.html'</span> <span class="o">=></span> <span class="s1">'Hello {{ name }}!'</span><span class="p">,</span>
|
||||
<span class="p">));</span>
|
||||
<span class="nv">$twig</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Environment</span><span class="p">(</span><span class="nv">$loader</span><span class="p">);</span>
|
||||
|
||||
<span class="k">echo</span> <span class="nv">$twig</span><span class="o">-></span><span class="na">render</span><span class="p">(</span><span class="s1">'index.html'</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s1">'name'</span> <span class="o">=></span> <span class="s1">'Fabien'</span><span class="p">));</span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
<p>This loader is very useful for unit testing. It can also be used for small
|
||||
projects where storing all templates in a single PHP file might make sense.</p>
|
||||
<div class="admonition-wrapper">
|
||||
<div class="tip"></div><div class="admonition admonition-tip"><p class="first admonition-title">Tip</p>
|
||||
<p class="last">When using the <code class="notranslate">Array</code> loader with a cache mechanism, you
|
||||
should know that a new cache key is generated each time a template content
|
||||
"changes" (the cache key being the source code of the template). If you
|
||||
don't want to see your cache grows out of control, you need to take care
|
||||
of clearing the old cache file by yourself.</p>
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="section" id="twig-loader-chain">
|
||||
<h4><code class="notranslate">Twig_Loader_Chain</code><a class="headerlink" href="#twig-loader-chain" title="Permalink to this headline">¶</a></h4>
|
||||
<p><code class="notranslate">Twig_Loader_Chain</code> delegates the loading of templates to other loaders:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nv">$loader1</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Loader_Array</span><span class="p">(</span><span class="k">array</span><span class="p">(</span>
|
||||
<span class="s1">'base.html'</span> <span class="o">=></span> <span class="s1">'{% block content %}{% endblock %}'</span><span class="p">,</span>
|
||||
<span class="p">));</span>
|
||||
<span class="nv">$loader2</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Loader_Array</span><span class="p">(</span><span class="k">array</span><span class="p">(</span>
|
||||
<span class="s1">'index.html'</span> <span class="o">=></span> <span class="s1">'{% extends "base.html" %}{% block content %}Hello {{ name }}{% endblock %}'</span><span class="p">,</span>
|
||||
<span class="s1">'base.html'</span> <span class="o">=></span> <span class="s1">'Will never be loaded'</span><span class="p">,</span>
|
||||
<span class="p">));</span>
|
||||
|
||||
<span class="nv">$loader</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Loader_Chain</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="nv">$loader1</span><span class="p">,</span> <span class="nv">$loader2</span><span class="p">));</span>
|
||||
|
||||
<span class="nv">$twig</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Environment</span><span class="p">(</span><span class="nv">$loader</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
<p>When looking for a template, Twig will try each loader in turn and it will
|
||||
return as soon as the template is found. When rendering the <code class="notranslate">index.html</code>
|
||||
template from the above example, Twig will load it with <code class="notranslate">$loader2</code> but the
|
||||
<code class="notranslate">base.html</code> template will be loaded from <code class="notranslate">$loader1</code>.</p>
|
||||
<p><code class="notranslate">Twig_Loader_Chain</code> accepts any loader that implements
|
||||
<code class="notranslate">Twig_LoaderInterface</code>.</p>
|
||||
<div class="admonition-wrapper">
|
||||
<div class="note"></div><div class="admonition admonition-note"><p class="first admonition-title">Note</p>
|
||||
<p class="last">You can also add loaders via the <code class="notranslate">addLoader()</code> method.</p>
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="create-your-own-loader">
|
||||
<h3>Create your own Loader<a class="headerlink" href="#create-your-own-loader" title="Permalink to this headline">¶</a></h3>
|
||||
<p>All loaders implement the <code class="notranslate">Twig_LoaderInterface</code>:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">interface</span> <span class="nx">Twig_LoaderInterface</span>
|
||||
<span class="p">{</span>
|
||||
<span class="sd">/**</span>
|
||||
<span class="sd"> * Returns the source context for a given template logical name.</span>
|
||||
<span class="sd"> *</span>
|
||||
<span class="sd"> * @param string $name The template logical name</span>
|
||||
<span class="sd"> *</span>
|
||||
<span class="sd"> * @return Twig_Source</span>
|
||||
<span class="sd"> *</span>
|
||||
<span class="sd"> * @throws Twig_Error_Loader When $name is not found</span>
|
||||
<span class="sd"> */</span>
|
||||
<span class="k">public</span> <span class="k">function</span> <span class="nf">getSourceContext</span><span class="p">(</span><span class="nv">$name</span><span class="p">);</span>
|
||||
|
||||
<span class="sd">/**</span>
|
||||
<span class="sd"> * Gets the cache key to use for the cache for a given template name.</span>
|
||||
<span class="sd"> *</span>
|
||||
<span class="sd"> * @param string $name The name of the template to load</span>
|
||||
<span class="sd"> *</span>
|
||||
<span class="sd"> * @return string The cache key</span>
|
||||
<span class="sd"> *</span>
|
||||
<span class="sd"> * @throws Twig_Error_Loader When $name is not found</span>
|
||||
<span class="sd"> */</span>
|
||||
<span class="k">public</span> <span class="k">function</span> <span class="nf">getCacheKey</span><span class="p">(</span><span class="nv">$name</span><span class="p">);</span>
|
||||
|
||||
<span class="sd">/**</span>
|
||||
<span class="sd"> * Returns true if the template is still fresh.</span>
|
||||
<span class="sd"> *</span>
|
||||
<span class="sd"> * @param string $name The template name</span>
|
||||
<span class="sd"> * @param timestamp $time The last modification time of the cached template</span>
|
||||
<span class="sd"> *</span>
|
||||
<span class="sd"> * @return bool true if the template is fresh, false otherwise</span>
|
||||
<span class="sd"> *</span>
|
||||
<span class="sd"> * @throws Twig_Error_Loader When $name is not found</span>
|
||||
<span class="sd"> */</span>
|
||||
<span class="k">public</span> <span class="k">function</span> <span class="nf">isFresh</span><span class="p">(</span><span class="nv">$name</span><span class="p">,</span> <span class="nv">$time</span><span class="p">);</span>
|
||||
|
||||
<span class="sd">/**</span>
|
||||
<span class="sd"> * Check if we have the source code of a template, given its name.</span>
|
||||
<span class="sd"> *</span>
|
||||
<span class="sd"> * @param string $name The name of the template to check if we can load</span>
|
||||
<span class="sd"> *</span>
|
||||
<span class="sd"> * @return bool If the template source code is handled by this loader or not</span>
|
||||
<span class="sd"> */</span>
|
||||
<span class="k">public</span> <span class="k">function</span> <span class="nf">exists</span><span class="p">(</span><span class="nv">$name</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
<p>The <code class="notranslate">isFresh()</code> method must return <code class="notranslate">true</code> if the current cached template
|
||||
is still fresh, given the last modification time, or <code class="notranslate">false</code> otherwise.</p>
|
||||
<p>The <code class="notranslate">getSourceContext()</code> method must return an instance of <code class="notranslate">Twig_Source</code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="using-extensions">
|
||||
<h2>Using Extensions<a class="headerlink" href="#using-extensions" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Twig extensions are packages that add new features to Twig. Using an
|
||||
extension is as simple as using the <code class="notranslate">addExtension()</code> method:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$twig</span><span class="o">-></span><span class="na">addExtension</span><span class="p">(</span><span class="k">new</span> <span class="nx">Twig_Extension_Sandbox</span><span class="p">());</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>Twig comes bundled with the following extensions:</p>
|
||||
<ul class="simple">
|
||||
<li><em>Twig_Extension_Core</em>: Defines all the core features of Twig.</li>
|
||||
<li><em>Twig_Extension_Escaper</em>: Adds automatic output-escaping and the possibility
|
||||
to escape/unescape blocks of code.</li>
|
||||
<li><em>Twig_Extension_Sandbox</em>: Adds a sandbox mode to the default Twig
|
||||
environment, making it safe to evaluate untrusted code.</li>
|
||||
<li><em>Twig_Extension_Profiler</em>: Enabled the built-in Twig profiler.</li>
|
||||
<li><em>Twig_Extension_Optimizer</em>: Optimizes the node tree before compilation.</li>
|
||||
</ul>
|
||||
<p>The core, escaper, and optimizer extensions do not need to be added to the
|
||||
Twig environment, as they are registered by default.</p>
|
||||
</div>
|
||||
<div class="section" id="built-in-extensions">
|
||||
<h2>Built-in Extensions<a class="headerlink" href="#built-in-extensions" title="Permalink to this headline">¶</a></h2>
|
||||
<p>This section describes the features added by the built-in extensions.</p>
|
||||
<div class="admonition-wrapper">
|
||||
<div class="tip"></div><div class="admonition admonition-tip"><p class="first admonition-title">Tip</p>
|
||||
<p class="last">Read the chapter about extending Twig to learn how to create your own
|
||||
extensions.</p>
|
||||
</div></div>
|
||||
<div class="section" id="core-extension">
|
||||
<h3>Core Extension<a class="headerlink" href="#core-extension" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <code class="notranslate">core</code> extension defines all the core features of Twig:</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="https://twig.sensiolabs.org/doc/2.x/tags/index.html"><span class="doc">Tags</span></a>;</li>
|
||||
<li><a class="reference internal" href="https://twig.sensiolabs.org/doc/2.x/filters/index.html"><span class="doc">Filters</span></a>;</li>
|
||||
<li><a class="reference internal" href="https://twig.sensiolabs.org/doc/2.x/functions/index.html"><span class="doc">Functions</span></a>;</li>
|
||||
<li><a class="reference internal" href="https://twig.sensiolabs.org/doc/2.x/tests/index.html"><span class="doc">Tests</span></a>.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="escaper-extension">
|
||||
<h3>Escaper Extension<a class="headerlink" href="#escaper-extension" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <code class="notranslate">escaper</code> extension adds automatic output escaping to Twig. It defines a
|
||||
tag, <code class="notranslate">autoescape</code>, and a filter, <code class="notranslate">raw</code>.</p>
|
||||
<p>When creating the escaper extension, you can switch on or off the global
|
||||
output escaping strategy:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$escaper</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Extension_Escaper</span><span class="p">(</span><span class="s1">'html'</span><span class="p">);</span>
|
||||
<span class="nv">$twig</span><span class="o">-></span><span class="na">addExtension</span><span class="p">(</span><span class="nv">$escaper</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>If set to <code class="notranslate">html</code>, all variables in templates are escaped (using the <code class="notranslate">html</code>
|
||||
escaping strategy), except those using the <code class="notranslate">raw</code> filter:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-jinja"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{{</span> <span class="nv">article.to_html</span><span class="o">|</span><span class="nf">raw</span> <span class="cp">}}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
<p>You can also change the escaping mode locally by using the <code class="notranslate">autoescape</code> tag:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-jinja"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">autoescape</span> <span class="s1">'html'</span> <span class="cp">%}</span><span class="x"></span>
|
||||
<span class="x"> </span><span class="cp">{{</span> <span class="nv">var</span> <span class="cp">}}</span><span class="x"></span>
|
||||
<span class="x"> </span><span class="cp">{{</span> <span class="nv">var</span><span class="o">|</span><span class="nf">raw</span> <span class="cp">}}</span><span class="x"> </span><span class="c">{# var won't be escaped #}</span><span class="x"></span>
|
||||
<span class="x"> </span><span class="cp">{{</span> <span class="nv">var</span><span class="o">|</span><span class="nf">escape</span> <span class="cp">}}</span><span class="x"> </span><span class="c">{# var won't be double-escaped #}</span><span class="x"></span>
|
||||
<span class="cp">{%</span> <span class="k">endautoescape</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
<div class="admonition-wrapper">
|
||||
<div class="warning"></div><div class="admonition admonition-warning"><p class="first admonition-title">Warning</p>
|
||||
<p class="last">The <code class="notranslate">autoescape</code> tag has no effect on included files.</p>
|
||||
</div></div>
|
||||
<p>The escaping rules are implemented as follows:</p>
|
||||
<ul>
|
||||
<li><p class="first">Literals (integers, booleans, arrays, ...) used in the template directly as
|
||||
variables or filter arguments are never automatically escaped:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-jinja"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{{</span> <span class="s2">"Twig<br />"</span> <span class="cp">}}</span><span class="x"> </span><span class="c">{# won't be escaped #}</span><span class="x"></span>
|
||||
|
||||
<span class="cp">{%</span> <span class="k">set</span> <span class="nv">text</span> <span class="o">=</span> <span class="s2">"Twig<br />"</span> <span class="cp">%}</span><span class="x"></span>
|
||||
<span class="cp">{{</span> <span class="nv">text</span> <span class="cp">}}</span><span class="x"> </span><span class="c">{# will be escaped #}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
</li>
|
||||
<li><p class="first">Expressions which the result is always a literal or a variable marked safe
|
||||
are never automatically escaped:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-jinja"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10</pre></div></td><td class="code"><div class="highlight"><pre><span></span>{{ foo ? "Twig<br />" : "<br />Twig" }} {# won't be escaped #}
|
||||
|
||||
{% set text = "Twig<br />" %}
|
||||
{{ foo ? text : "<br />Twig" }} {# will be escaped #}
|
||||
|
||||
{% set text = "Twig<br />" %}
|
||||
{{ foo ? text|raw : "<br />Twig" }} {# won't be escaped #}
|
||||
|
||||
{% set text = "Twig<br />" %}
|
||||
{{ foo ? text|escape : "<br />Twig" }} {# the result of the expression won't be escaped #}
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
</li>
|
||||
<li><p class="first">Escaping is applied before printing, after any other filter is applied:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-jinja"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{{</span> <span class="nv">var</span><span class="o">|</span><span class="nf">upper</span> <span class="cp">}}</span><span class="x"> </span><span class="c">{# is equivalent to {{ var|upper|escape }} #}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
</li>
|
||||
<li><p class="first">The <cite>raw</cite> filter should only be used at the end of the filter chain:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-jinja"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{{</span> <span class="nv">var</span><span class="o">|</span><span class="nf">raw</span><span class="o">|</span><span class="nf">upper</span> <span class="cp">}}</span><span class="x"> </span><span class="c">{# will be escaped #}</span><span class="x"></span>
|
||||
|
||||
<span class="cp">{{</span> <span class="nv">var</span><span class="o">|</span><span class="nf">upper</span><span class="o">|</span><span class="nf">raw</span> <span class="cp">}}</span><span class="x"> </span><span class="c">{# won't be escaped #}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
</li>
|
||||
<li><p class="first">Automatic escaping is not applied if the last filter in the chain is marked
|
||||
safe for the current context (e.g. <code class="notranslate">html</code> or <code class="notranslate">js</code>). <code class="notranslate">escape</code> and
|
||||
<code class="notranslate">escape('html')</code> are marked safe for HTML, <code class="notranslate">escape('js')</code> is marked
|
||||
safe for JavaScript, <code class="notranslate">raw</code> is marked safe for everything.</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-jinja"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">autoescape</span> <span class="s1">'js'</span> <span class="cp">%}</span><span class="x"></span>
|
||||
<span class="x"> </span><span class="cp">{{</span> <span class="nv">var</span><span class="o">|</span><span class="nf">escape</span><span class="o">(</span><span class="s1">'html'</span><span class="o">)</span> <span class="cp">}}</span><span class="x"> </span><span class="c">{# will be escaped for HTML and JavaScript #}</span><span class="x"></span>
|
||||
<span class="x"> </span><span class="cp">{{</span> <span class="nv">var</span> <span class="cp">}}</span><span class="x"> </span><span class="c">{# will be escaped for JavaScript #}</span><span class="x"></span>
|
||||
<span class="x"> </span><span class="cp">{{</span> <span class="nv">var</span><span class="o">|</span><span class="nf">escape</span><span class="o">(</span><span class="s1">'js'</span><span class="o">)</span> <span class="cp">}}</span><span class="x"> </span><span class="c">{# won't be double-escaped #}</span><span class="x"></span>
|
||||
<span class="cp">{%</span> <span class="k">endautoescape</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="admonition-wrapper">
|
||||
<div class="note"></div><div class="admonition admonition-note"><p class="first admonition-title">Note</p>
|
||||
<p class="last">Note that autoescaping has some limitations as escaping is applied on
|
||||
expressions after evaluation. For instance, when working with
|
||||
concatenation, <code class="notranslate">{{ foo|raw ~ bar }}</code> won't give the expected result as
|
||||
escaping is applied on the result of the concatenation, not on the
|
||||
individual variables (so, the <code class="notranslate">raw</code> filter won't have any effect here).</p>
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="section" id="sandbox-extension">
|
||||
<h3>Sandbox Extension<a class="headerlink" href="#sandbox-extension" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <code class="notranslate">sandbox</code> extension can be used to evaluate untrusted code. Access to
|
||||
unsafe attributes and methods is prohibited. The sandbox security is managed
|
||||
by a policy instance. By default, Twig comes with one policy class:
|
||||
<code class="notranslate">Twig_Sandbox_SecurityPolicy</code>. This class allows you to white-list some
|
||||
tags, filters, properties, and methods:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nv">$tags</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span><span class="s1">'if'</span><span class="p">);</span>
|
||||
<span class="nv">$filters</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span><span class="s1">'upper'</span><span class="p">);</span>
|
||||
<span class="nv">$methods</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
|
||||
<span class="s1">'Article'</span> <span class="o">=></span> <span class="k">array</span><span class="p">(</span><span class="s1">'getTitle'</span><span class="p">,</span> <span class="s1">'getBody'</span><span class="p">),</span>
|
||||
<span class="p">);</span>
|
||||
<span class="nv">$properties</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
|
||||
<span class="s1">'Article'</span> <span class="o">=></span> <span class="k">array</span><span class="p">(</span><span class="s1">'title'</span><span class="p">,</span> <span class="s1">'body'</span><span class="p">),</span>
|
||||
<span class="p">);</span>
|
||||
<span class="nv">$functions</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span><span class="s1">'range'</span><span class="p">);</span>
|
||||
<span class="nv">$policy</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Sandbox_SecurityPolicy</span><span class="p">(</span><span class="nv">$tags</span><span class="p">,</span> <span class="nv">$filters</span><span class="p">,</span> <span class="nv">$methods</span><span class="p">,</span> <span class="nv">$properties</span><span class="p">,</span> <span class="nv">$functions</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
<p>With the previous configuration, the security policy will only allow usage of
|
||||
the <code class="notranslate">if</code> tag, and the <code class="notranslate">upper</code> filter. Moreover, the templates will only be
|
||||
able to call the <code class="notranslate">getTitle()</code> and <code class="notranslate">getBody()</code> methods on <code class="notranslate">Article</code>
|
||||
objects, and the <code class="notranslate">title</code> and <code class="notranslate">body</code> public properties. Everything else
|
||||
won't be allowed and will generate a <code class="notranslate">Twig_Sandbox_SecurityError</code> exception.</p>
|
||||
<p>The policy object is the first argument of the sandbox constructor:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$sandbox</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Extension_Sandbox</span><span class="p">(</span><span class="nv">$policy</span><span class="p">);</span>
|
||||
<span class="nv">$twig</span><span class="o">-></span><span class="na">addExtension</span><span class="p">(</span><span class="nv">$sandbox</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>By default, the sandbox mode is disabled and should be enabled when including
|
||||
untrusted template code by using the <code class="notranslate">sandbox</code> tag:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-jinja"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">sandbox</span> <span class="cp">%}</span><span class="x"></span>
|
||||
<span class="x"> </span><span class="cp">{%</span> <span class="k">include</span> <span class="s1">'user.html'</span> <span class="cp">%}</span><span class="x"></span>
|
||||
<span class="cp">{%</span> <span class="k">endsandbox</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
<p>You can sandbox all templates by passing <code class="notranslate">true</code> as the second argument of
|
||||
the extension constructor:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$sandbox</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Extension_Sandbox</span><span class="p">(</span><span class="nv">$policy</span><span class="p">,</span> <span class="k">true</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="section" id="profiler-extension">
|
||||
<h3>Profiler Extension<a class="headerlink" href="#profiler-extension" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <code class="notranslate">profiler</code> extension enables a profiler for Twig templates; it should
|
||||
only be used on your development machines as it adds some overhead:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nv">$profile</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Profiler_Profile</span><span class="p">();</span>
|
||||
<span class="nv">$twig</span><span class="o">-></span><span class="na">addExtension</span><span class="p">(</span><span class="k">new</span> <span class="nx">Twig_Extension_Profiler</span><span class="p">(</span><span class="nv">$profile</span><span class="p">));</span>
|
||||
|
||||
<span class="nv">$dumper</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Profiler_Dumper_Text</span><span class="p">();</span>
|
||||
<span class="k">echo</span> <span class="nv">$dumper</span><span class="o">-></span><span class="na">dump</span><span class="p">(</span><span class="nv">$profile</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
<p>A profile contains information about time and memory consumption for template,
|
||||
block, and macro executions.</p>
|
||||
<p>You can also dump the data in a <a class="reference external" href="https://blackfire.io/">Blackfire.io</a>
|
||||
compatible format:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$dumper</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Profiler_Dumper_Blackfire</span><span class="p">();</span>
|
||||
<span class="nb">file_put_contents</span><span class="p">(</span><span class="s1">'/path/to/profile.prof'</span><span class="p">,</span> <span class="nv">$dumper</span><span class="o">-></span><span class="na">dump</span><span class="p">(</span><span class="nv">$profile</span><span class="p">));</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>Upload the profile to visualize it (create a <a class="reference external" href="https://blackfire.io/signup">free account</a> first):</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-sh"><table class="highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>blackfire --slot<span class="o">=</span><span class="m">7</span> upload /path/to/profile.prof
|
||||
</pre></div>
|
||||
</td></tr></tbody></table></div></div>
|
||||
</div>
|
||||
<div class="section" id="optimizer-extension">
|
||||
<h3>Optimizer Extension<a class="headerlink" href="#optimizer-extension" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <code class="notranslate">optimizer</code> extension optimizes the node tree before compilation:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$twig</span><span class="o">-></span><span class="na">addExtension</span><span class="p">(</span><span class="k">new</span> <span class="nx">Twig_Extension_Optimizer</span><span class="p">());</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>By default, all optimizations are turned on. You can select the ones you want
|
||||
to enable by passing them to the constructor:</p>
|
||||
<div class="literal-block notranslate"><div class="highlight-php"><div class="highlight"><pre><span></span><span class="nv">$optimizer</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Twig_Extension_Optimizer</span><span class="p">(</span><span class="nx">Twig_NodeVisitor_Optimizer</span><span class="o">::</span><span class="na">OPTIMIZE_FOR</span><span class="p">);</span>
|
||||
|
||||
<span class="nv">$twig</span><span class="o">-></span><span class="na">addExtension</span><span class="p">(</span><span class="nv">$optimizer</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div></div>
|
||||
<p>Twig supports the following optimizations:</p>
|
||||
<ul class="simple">
|
||||
<li><code class="notranslate">Twig_NodeVisitor_Optimizer::OPTIMIZE_ALL</code>, enables all optimizations
|
||||
(this is the default value).</li>
|
||||
<li><code class="notranslate">Twig_NodeVisitor_Optimizer::OPTIMIZE_NONE</code>, disables all optimizations.
|
||||
This reduces the compilation time, but it can increase the execution time
|
||||
and the consumed memory.</li>
|
||||
<li><code class="notranslate">Twig_NodeVisitor_Optimizer::OPTIMIZE_FOR</code>, optimizes the <code class="notranslate">for</code> tag by
|
||||
removing the <code class="notranslate">loop</code> variable creation whenever possible.</li>
|
||||
<li><code class="notranslate">Twig_NodeVisitor_Optimizer::OPTIMIZE_RAW_FILTER</code>, removes the <code class="notranslate">raw</code>
|
||||
filter whenever possible.</li>
|
||||
<li><code class="notranslate">Twig_NodeVisitor_Optimizer::OPTIMIZE_VAR_ACCESS</code>, simplifies the creation
|
||||
and access of variables in the compiled templates whenever possible.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="exceptions">
|
||||
<h2>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Twig can throw exceptions:</p>
|
||||
<ul class="simple">
|
||||
<li><code class="notranslate">Twig_Error</code>: The base exception for all errors.</li>
|
||||
<li><code class="notranslate">Twig_Error_Syntax</code>: Thrown to tell the user that there is a problem with
|
||||
the template syntax.</li>
|
||||
<li><code class="notranslate">Twig_Error_Runtime</code>: Thrown when an error occurs at runtime (when a filter
|
||||
does not exist for instance).</li>
|
||||
<li><code class="notranslate">Twig_Error_Loader</code>: Thrown when an error occurs during template loading.</li>
|
||||
<li><code class="notranslate">Twig_Sandbox_SecurityError</code>: Thrown when an unallowed tag, filter, or
|
||||
method is called in a sandboxed template.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="navigation">
|
||||
<a accesskey="P" title="Twig for Template Designers" href="https://twig.sensiolabs.org/doc/2.x/templates.html">
|
||||
« Twig for Template Designers
|
||||
</a>
|
||||
<span class="separator">|</span> <a accesskey="N" title="Extending Twig" href="https://twig.sensiolabs.org/doc/2.x/advanced.html">
|
||||
Extending Twig »
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ft">
|
||||
<div class="content">
|
||||
Website powered by <a href="https://symfony.com/">Symfony</a> and Twig, deployed on <a href="https://sensio.cloud/"><img class="sc" src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/sensiocloud.svg"></a>
|
||||
<br>
|
||||
The Twig <a href="https://twig.sensiolabs.org/images/twig-logo.png">logo</a> is © 2010-2017 <a href="https://sensiolabs.com/" class="sensiolabs">Sensio<span class="brand">Labs</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="criteo-tags-div" style="display: none;"><iframe style="display: none;" src="Twig%20for%20Developers%20-%20Documentation%20-%20Twig%20-%20The%20flexible,%20fast,%20and%20secure%20PHP%20template%20engine_fichiers/dis.htm" width="0" height="0"></iframe></div></body></html>
|
||||
@@ -0,0 +1,446 @@
|
||||
html, body
|
||||
{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #d9dadb;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
font: 1em Georgia, "Times New Roman", serif;
|
||||
color: #626262;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4
|
||||
{
|
||||
font: 1em Georgia, "Times New Roman", serif;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
color: #21A6A4;
|
||||
}
|
||||
|
||||
a:visited
|
||||
{
|
||||
color: #004D7D;
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
content: "\0020";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
overflow: hidden;
|
||||
}
|
||||
.clearfix {display: inline-block;}
|
||||
* html .clearfix {height: 1%;}
|
||||
.clearfix {display: block;}
|
||||
|
||||
.content
|
||||
{
|
||||
width: 947px;
|
||||
margin: 0 auto;
|
||||
padding-left: 49px;
|
||||
}
|
||||
|
||||
.sensio_product
|
||||
{
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 30px;
|
||||
}
|
||||
|
||||
.hd, .bd, .ft
|
||||
{
|
||||
max-width: 1200px;
|
||||
min-width: 996px;
|
||||
width: 100%;
|
||||
_width: expression(document.body.clientWidth >= 1200 ? "1200px": document.body.clientWidth <= 996 ? "996px" :"100%");
|
||||
margin: auto;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.hd
|
||||
{
|
||||
background: #fff url("../images/background.png") repeat-x;
|
||||
}
|
||||
|
||||
.hd .illustration, .hd
|
||||
{
|
||||
height:390px;
|
||||
}
|
||||
|
||||
.hd .content
|
||||
{
|
||||
padding-top: 110px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.hd .logo_header
|
||||
{
|
||||
float: left;
|
||||
padding: 0px 25px 0 0;
|
||||
height: 91px;
|
||||
font-size: 76px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hd .logo_header a
|
||||
{
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.hd .title_header
|
||||
{
|
||||
font-family: Arial, sans-serif;
|
||||
float: left;
|
||||
height: 70px;
|
||||
padding: 14px 0 0 27px;
|
||||
border-left: 4px solid #8fe6e5;
|
||||
color: #006f9f;
|
||||
font-size: 28px;
|
||||
line-height: 1em;
|
||||
_line-height: 0.85em;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.hd .title_header_home
|
||||
{
|
||||
border-left: 4px solid #c4c3c3;
|
||||
}
|
||||
|
||||
.hd .title_header_home span
|
||||
{
|
||||
color: #d6cecf;
|
||||
}
|
||||
|
||||
.hd .illustration
|
||||
{
|
||||
background: transparent url(../images/logo.png) no-repeat center 2px;
|
||||
}
|
||||
|
||||
.menu
|
||||
{
|
||||
padding-top: 95px;
|
||||
width: 940px;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
.menu li
|
||||
{
|
||||
color: #ffffff;
|
||||
font-size: 1.125em;
|
||||
display: inline;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.menu a
|
||||
{
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.menu a:hover
|
||||
{
|
||||
color: #ffffff;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.menu a.active
|
||||
{
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.bd .content
|
||||
{
|
||||
padding-top: 20px;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.bd .content li
|
||||
{
|
||||
list-style: disc;
|
||||
margin-left: 20px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.bd h1
|
||||
{
|
||||
padding: 20px 0 15px 0;
|
||||
color: #21a6a4;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.bd h3
|
||||
{
|
||||
padding: 10px 0 5px 0;
|
||||
color: #21a6a4;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.page_title
|
||||
{
|
||||
font-family: Georgia, "Times New Roman", serif;
|
||||
font-size: 1.79em;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.intro
|
||||
{
|
||||
padding-top: 25px;
|
||||
width: 625px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.links_intro
|
||||
{
|
||||
padding: 20px 0 0 676px;
|
||||
}
|
||||
|
||||
.bd .content .links_intro li
|
||||
{
|
||||
padding: 15px 0;
|
||||
border-radius: 8px;
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.bd .content .links_intro li a, .bd .content .links_intro li a:hover {
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
font-size: 23px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
font-family: Arial;
|
||||
}
|
||||
|
||||
.bd .content .links_intro li a img {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.intro p
|
||||
{
|
||||
color: #595959;
|
||||
font-family: Georgia, "Times New Roman", serif;
|
||||
}
|
||||
|
||||
.box_content
|
||||
{
|
||||
padding: 0 10px;
|
||||
width: 939px;
|
||||
}
|
||||
|
||||
.important
|
||||
{
|
||||
margin: 20px 0;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #bcbcbc;
|
||||
border-bottom: 1px solid #bcbcbc;
|
||||
}
|
||||
|
||||
.box_content div
|
||||
{
|
||||
width: 260px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.box_content div.middle
|
||||
{
|
||||
padding: 0 69px;
|
||||
}
|
||||
|
||||
.box_content h3
|
||||
{
|
||||
color: #21a6a4;
|
||||
font-weight: bold;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.important h3
|
||||
{
|
||||
color: #db4528;
|
||||
font-size: 1.27em;
|
||||
}
|
||||
|
||||
.box_content p
|
||||
{
|
||||
margin: 10px 0 30px;
|
||||
}
|
||||
|
||||
.box_content p.last
|
||||
{
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.bd .author
|
||||
{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h2
|
||||
{
|
||||
font: 1em Georgia, "Times New Roman", serif;
|
||||
color: #444;
|
||||
margin-bottom: 5px;
|
||||
padding: 15px 0 10px 0;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
.ft {
|
||||
font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif;
|
||||
font-size: 15px;
|
||||
color: #ddd;
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.ft a {
|
||||
text-decoration: none;
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.ft .sc {
|
||||
width: 100px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.ft .content
|
||||
{
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
font-size: 0.793em;
|
||||
}
|
||||
|
||||
em
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
strong
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.latest
|
||||
{
|
||||
margin-top: 5px;
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
font-family: Georgia;
|
||||
color: #fff;
|
||||
margin-left: 38px;
|
||||
}
|
||||
|
||||
.latest a {
|
||||
font-size: 14px !important;
|
||||
font-family: Georgia !important;
|
||||
}
|
||||
|
||||
.contributors
|
||||
{
|
||||
margin-left: 0;
|
||||
margin-bottom: 0;
|
||||
margin-top: 30px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.bd .content .contributors li
|
||||
{
|
||||
float: left;
|
||||
margin-right: 50px;
|
||||
margin-left: 0;
|
||||
width: 250px;
|
||||
height: 60px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.contributors small
|
||||
{
|
||||
font-size: 0.7em;
|
||||
color: #313131;
|
||||
}
|
||||
|
||||
.contributors .gravatar
|
||||
{
|
||||
float: left;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
|
||||
.builtin-reference
|
||||
{
|
||||
min-width: 120px;
|
||||
float: left;
|
||||
padding-right: 54px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.bd .content .builtin-reference li
|
||||
{
|
||||
margin-left: 0;
|
||||
list-style: none;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.reference-column
|
||||
{
|
||||
float: left;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.offline-docs
|
||||
{
|
||||
float: right;
|
||||
padding: 20px;
|
||||
margin-top: 10px;
|
||||
width: 200px;
|
||||
-moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.bd .content .offline-docs ul
|
||||
{
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bd .content .offline-docs li
|
||||
{
|
||||
margin: 10px;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.rotate-90 {
|
||||
-ms-transform: rotate(90deg);
|
||||
-webkit-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.alert {
|
||||
background-color: #d9edf7;
|
||||
border-radius: 4px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
a.sensiolabs {
|
||||
font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif;
|
||||
color: #fff;
|
||||
letter-spacing: -1px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sensiolabs .brand {
|
||||
color: #92db33;
|
||||
}
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,496 @@
|
||||
img
|
||||
{
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
ul.error_list
|
||||
{
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
color: #f22;
|
||||
}
|
||||
|
||||
ul.error_list li
|
||||
{
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
pre
|
||||
{
|
||||
margin: 0;
|
||||
background-color: #000;
|
||||
overflow: auto;
|
||||
line-height: 1.3em;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
background-color: #232125;
|
||||
padding: 0.7em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
pre code
|
||||
{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
pre.command-line
|
||||
{
|
||||
background-color: #333;
|
||||
color: #eee;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
pre.command-line code
|
||||
{
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
blockquote
|
||||
{
|
||||
padding: 2px 20px 5px 45px;
|
||||
margin: 15px 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
div.admonition-wrapper
|
||||
{
|
||||
margin: 20px 0;
|
||||
padding: 15px;
|
||||
padding-right: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.body-web div.admonition-wrapper
|
||||
{
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
div.admonition
|
||||
{
|
||||
background-color: #F5F5F5;
|
||||
padding: 35px 35px 13px 50px;
|
||||
}
|
||||
|
||||
div.note
|
||||
{
|
||||
background: url(../images/admonition/note.gif) no-repeat 0 0;
|
||||
height: 51px; left: 0; position: absolute; top: 0; width: 51px;
|
||||
}
|
||||
|
||||
div.caution
|
||||
{
|
||||
background: url(../images/admonition/caution.gif) no-repeat 0 0;
|
||||
height: 51px; left: 0; position: absolute; top: 0; width: 51px;
|
||||
}
|
||||
|
||||
div.warning
|
||||
{
|
||||
background: url(../images/admonition/warning.gif) no-repeat 0 0;
|
||||
height: 51px; left: 0; position: absolute; top: 0; width: 51px;
|
||||
}
|
||||
|
||||
div.tip
|
||||
{
|
||||
background: url(../images/admonition/tip.gif) no-repeat 0 0;
|
||||
height: 51px; left: 0; position: absolute; top: 0; width: 51px;
|
||||
}
|
||||
|
||||
div.sidebar
|
||||
{
|
||||
background: url(../images/admonition/sidebar.gif) no-repeat 0 0;
|
||||
height: 51px; left: 0; position: absolute; top: 0; width: 51px;
|
||||
}
|
||||
|
||||
div.seealso
|
||||
{
|
||||
background: url(../images/admonition/seealso.png) no-repeat 0 0;
|
||||
height: 51px; left: 0; position: absolute; top: 0; width: 51px;
|
||||
}
|
||||
|
||||
div.admonition-wrapper p.admonition-title
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
p.sidebar-title
|
||||
{
|
||||
margin-top: 10px;
|
||||
color:#313131;
|
||||
padding-bottom:20px;
|
||||
font-style: italic;
|
||||
font-family: my-sans-serif, Georgia, "Times New Roman", Times, serif;
|
||||
font-size:20px;
|
||||
}
|
||||
|
||||
.sidebar h2
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
blockquote.quote
|
||||
{
|
||||
background: #D7CABA;
|
||||
}
|
||||
|
||||
.navigation
|
||||
{
|
||||
font-family: my-sans-serif, Arial, sans-serif;
|
||||
padding: 15px 0;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.navigation a
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.navigation a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.navigation .separator
|
||||
{
|
||||
padding: 0 10px;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.feedback p
|
||||
{
|
||||
font-family: my-sans-serif, Arial, sans-serif;
|
||||
color: #858585;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.feedback p a, #license a
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.infobar-box
|
||||
{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
background-color: #f1f1f1;
|
||||
border: 1px solid #e3e3e3;
|
||||
-moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;
|
||||
font-family: my-sans-serif, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.infobar-box h2
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pages
|
||||
{
|
||||
padding: 10px 0 0 0;
|
||||
}
|
||||
|
||||
.pages ul.inline
|
||||
{
|
||||
display: inline;
|
||||
padding: 5px 0 0 0;
|
||||
}
|
||||
|
||||
.pages .inline li
|
||||
{
|
||||
display: inline;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.infobar-box a
|
||||
{
|
||||
text-decoration: none;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.infobar-box a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#doc-toc li
|
||||
{
|
||||
padding: 2px;
|
||||
list-style: square;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
#doc-toc li.current
|
||||
{
|
||||
font-weight: bold;
|
||||
background-color: #e3e3e3;
|
||||
}
|
||||
|
||||
#doc-toc ul.inline
|
||||
{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
#doc-toc .inline li
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#doc-toc li.separator
|
||||
{
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
#license
|
||||
{
|
||||
line-height: 1.3em;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
#license img
|
||||
{
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
table.docutils
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
table.docutils th
|
||||
{
|
||||
font-weight:bold;
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
table.docutils td, table.docutils th
|
||||
{
|
||||
padding: 4px 6px;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
a.headerlink
|
||||
{
|
||||
padding: 2px;
|
||||
color: #ddd;
|
||||
text-decoration: none;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
a.reference em, a.internal em
|
||||
{
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
#guides ul ul, #contributing ul ul
|
||||
{
|
||||
display: inline;
|
||||
padding: 5px 0 0 0;
|
||||
}
|
||||
|
||||
#guides ul ul li, #contributing ul ul li
|
||||
{
|
||||
display: inline;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.sidebarbox
|
||||
{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
background-color: #f1f1f1;
|
||||
border: 1px solid #e3e3e3;
|
||||
-moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;
|
||||
font-family: my-sans-serif, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.sidebarbox h2
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebarbox h3
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
div.breadcrumb h3
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bd .content div.breadcrumb ul
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.bd .content div.breadcrumb li
|
||||
{
|
||||
display: inline;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 0.9em;
|
||||
}
|
||||
|
||||
.bd .content div.breadcrumb li a
|
||||
{
|
||||
color: #777;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.bd .content div.breadcrumb li a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.p-Indicator
|
||||
{
|
||||
color: #FF8400;
|
||||
}
|
||||
|
||||
div.genindex-jumpbox
|
||||
{
|
||||
font-size: 85%;
|
||||
border: 0;
|
||||
margin: 1em 0 1em 0;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
div.genindex-jumpbox
|
||||
{
|
||||
color: #999;
|
||||
}
|
||||
|
||||
div.genindex-jumpbox strong
|
||||
{
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
div.genindex-jumpbox a
|
||||
{
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
h2#A, h2#B, h2#C, h2#D, h2#E, h2#F, h2#G, h2#H, h2#I, h2#J, h2#K, h2#L, h2#M, h2#N, h2#O,
|
||||
h2#P, h2#Q, h2#R, h2#S, h2#T, h2#U, h2#V, h2#W, h2#X, h2#Y, h2#Z
|
||||
{
|
||||
background-color: #eee;
|
||||
border-bottom: 1px solid #aaa;
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
margin: 20px 0;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.indextable a, div.genindex-jumpbox a
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.indextable a:hover, div.genindex-jumpbox a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.infobar
|
||||
{
|
||||
background-color:#FFFFFF;
|
||||
float:right;
|
||||
font-size:0.9em;
|
||||
margin:15px;
|
||||
position:relative;
|
||||
width:300px;
|
||||
z-index:999;
|
||||
}
|
||||
|
||||
/* for code block with line numbers */
|
||||
table .highlight
|
||||
{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.versionadded
|
||||
{
|
||||
background-color: #def;
|
||||
padding: 10px;
|
||||
margin-bottom: 12px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.versionmodified
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.configuration-block em
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
div.configuration-block li
|
||||
{
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
div.configuration-block em
|
||||
{
|
||||
font-style: normal;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.literal-block
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
overflow: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.highlighttable
|
||||
{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td.linenos
|
||||
{
|
||||
border: 1px solid #ddd;
|
||||
border-right: 0;
|
||||
width: 35px;
|
||||
min-width: 35px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
td.code
|
||||
{
|
||||
border: 1px solid #232125;
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.highlighttable pre
|
||||
{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.linenodiv pre
|
||||
{
|
||||
background-color: #ececec;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.navigation {
|
||||
font-family: Arial,sans-serif;
|
||||
padding: 15px;
|
||||
padding-bottom: 0;
|
||||
font-size: .9em;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
.hd
|
||||
{
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.hd .title_header
|
||||
{
|
||||
border-left-color: #e0e9a1;
|
||||
}
|
||||
|
||||
.intro h2, .box_content h3, .bd h1, a, .bd h3, .bd h2, .bd .content .intro_more li strong
|
||||
{
|
||||
color: #006f9f;
|
||||
}
|
||||
|
||||
.important h3
|
||||
{
|
||||
color: #bacf29;
|
||||
}
|
||||
|
||||
#symfony-api #class-description, #symfony-api #method-details h3
|
||||
{
|
||||
color: #bacf29 !important;
|
||||
}
|
||||
|
||||
.links_intro .learn_more
|
||||
{
|
||||
background-color: #bacf29;
|
||||
}
|
||||
|
||||
.links_intro .certification
|
||||
{
|
||||
background-color: #71b236;
|
||||
}
|
||||
|
||||
.links_intro .install_now
|
||||
{
|
||||
background-color: #006f9f;
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,76 @@
|
||||
(function(){var E;function Aa(a,b){switch(b){case 0:return""+a;case 1:return 1*a;case 2:return!!a;case 3:return 1E3*a}return a}function Ba(a){return"function"==typeof a}function Ca(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")}function F(a,b){return void 0==a||"-"==a&&!b||""==a}function Da(a){if(!a||""==a)return"";for(;a&&-1<" \n\r\t".indexOf(a.charAt(0));)a=a.substring(1);for(;a&&-1<" \n\r\t".indexOf(a.charAt(a.length-1));)a=a.substring(0,a.length-1);return a}
|
||||
function Ea(){return Math.round(2147483647*Math.random())}function Fa(){}function G(a,b){if(encodeURIComponent instanceof Function)return b?encodeURI(a):encodeURIComponent(a);H(68);return escape(a)}function I(a){a=a.split("+").join(" ");if(decodeURIComponent instanceof Function)try{return decodeURIComponent(a)}catch(b){H(17)}else H(68);return unescape(a)}var Ga=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)};
|
||||
function Ia(a,b){if(a){var c=J.createElement("script");c.type="text/javascript";c.async=!0;c.src=a;c.id=b;var d=J.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d);return c}}function K(a){return a&&0<a.length?a[0]:""}function L(a){var b=a?a.length:0;return 0<b?a[b-1]:""}var Bd=function(){this.prefix="ga.";this.values={}};Bd.prototype.set=function(a,b){this.values[this.prefix+a]=b};Bd.prototype.get=function(a){return this.values[this.prefix+a]};
|
||||
Bd.prototype.contains=function(a){return void 0!==this.get(a)};function Ka(a){0==a.indexOf("www.")&&(a=a.substring(4));return a.toLowerCase()}
|
||||
function La(a,b){var c,d={url:a,protocol:"http",host:"",path:"",R:new Bd,anchor:""};if(!a)return d;c=a.indexOf("://");0<=c&&(d.protocol=a.substring(0,c),a=a.substring(c+3));c=a.search("/|\\?|#");if(0<=c)d.host=a.substring(0,c).toLowerCase(),a=a.substring(c);else return d.host=a.toLowerCase(),d;c=a.indexOf("#");0<=c&&(d.anchor=a.substring(c+1),a=a.substring(0,c));c=a.indexOf("?");0<=c&&(Na(d.R,a.substring(c+1)),a=a.substring(0,c));d.anchor&&b&&Na(d.R,d.anchor);a&&"/"==a.charAt(0)&&(a=a.substring(1));
|
||||
d.path=a;return d}
|
||||
function Oa(a,b){function c(a){var b=(a.hostname||"").split(":")[0].toLowerCase(),c=(a.protocol||"").toLowerCase(),c=1*a.port||("http:"==c?80:"https:"==c?443:"");a=a.pathname||"";0==a.indexOf("/")||(a="/"+a);return[b,""+c,a]}var d=b||J.createElement("a");d.href=J.location.href;var e=(d.protocol||"").toLowerCase(),f=c(d),Be=d.search||"",n=e+"//"+f[0]+(f[1]?":"+f[1]:"");0==a.indexOf("//")?a=e+a:0==a.indexOf("/")?a=n+a:a&&0!=a.indexOf("?")?0>a.split("/")[0].indexOf(":")&&(a=n+f[2].substring(0,f[2].lastIndexOf("/"))+
|
||||
"/"+a):a=n+f[2]+(a||Be);d.href=a;e=c(d);return{protocol:(d.protocol||"").toLowerCase(),host:e[0],port:e[1],path:e[2],Oa:d.search||"",url:a||""}}function Na(a,b){function c(b,c){a.contains(b)||a.set(b,[]);a.get(b).push(c)}for(var d=Da(b).split("&"),e=0;e<d.length;e++)if(d[e]){var f=d[e].indexOf("=");0>f?c(d[e],"1"):c(d[e].substring(0,f),d[e].substring(f+1))}}
|
||||
function Pa(a,b){if(F(a)||"["==a.charAt(0)&&"]"==a.charAt(a.length-1))return"-";var c=J.domain;return a.indexOf(c+(b&&"/"!=b?b:""))==(0==a.indexOf("http://")?7:0==a.indexOf("https://")?8:0)?"0":a};var Qa=0;function Ra(a,b,c){1<=Qa||1<=100*Math.random()||ld()||(a=["utmt=error","utmerr="+a,"utmwv=5.6.7dc","utmn="+Ea(),"utmsp=1"],b&&a.push("api="+b),c&&a.push("msg="+G(c.substring(0,100))),M.w&&a.push("aip=1"),Sa(a.join("&")),Qa++)};var Ta=0,Ua={};function N(a){return Va("x"+Ta++,a)}function Va(a,b){Ua[a]=!!b;return a}
|
||||
var Wa=N(),Xa=Va("anonymizeIp"),Ya=N(),$a=N(),ab=N(),bb=N(),O=N(),P=N(),cb=N(),db=N(),eb=N(),fb=N(),gb=N(),hb=N(),ib=N(),jb=N(),kb=N(),lb=N(),nb=N(),ob=N(),pb=N(),qb=N(),rb=N(),sb=N(),tb=N(),ub=N(),vb=N(),wb=N(),xb=N(),yb=N(),zb=N(),Ab=N(),Bb=N(),Cb=N(),Db=N(),Eb=N(),Fb=N(!0),Gb=Va("currencyCode"),Hb=Va("page"),Ib=Va("title"),Jb=N(),Kb=N(),Lb=N(),Mb=N(),Nb=N(),Ob=N(),Pb=N(),Qb=N(),Rb=N(),Q=N(!0),Sb=N(!0),Tb=N(!0),Ub=N(!0),Vb=N(!0),Wb=N(!0),Zb=N(!0),$b=N(!0),ac=N(!0),bc=N(!0),cc=N(!0),R=N(!0),dc=N(!0),
|
||||
ec=N(!0),fc=N(!0),gc=N(!0),hc=N(!0),ic=N(!0),jc=N(!0),S=N(!0),kc=N(!0),lc=N(!0),mc=N(!0),nc=N(!0),oc=N(!0),pc=N(!0),qc=N(!0),rc=Va("campaignParams"),sc=N(),tc=Va("hitCallback"),uc=N();N();var vc=N(),wc=N(),xc=N(),yc=N(),zc=N(),Ac=N(),Bc=N(),Cc=N(),Dc=N(),Ec=N(),Fc=N(),Gc=N(),Hc=N(),Ic=N();N();var Mc=N(),Nc=N(),jf=N(),Yb=N(),kf=N(),lf=Va("utmtCookieName"),mf=Va("displayFeatures"),Oc=N(),Ie=Va("gtmid"),Ne=Va("uaName"),Oe=Va("uaDomain"),Pe=Va("uaPath"),Je=Va("linkid");var Qe=function(){function a(a,c,d){T(gf.prototype,a,c,d)}a("_createTracker",gf.prototype.hb,55);a("_getTracker",gf.prototype.oa,0);a("_getTrackerByName",gf.prototype.u,51);a("_getTrackers",gf.prototype.pa,130);a("_anonymizeIp",gf.prototype.aa,16);a("_forceSSL",gf.prototype.la,125);a("_getPlugin",Pc,120)},Re=function(){function a(a,c,d){T(U.prototype,a,c,d)}Qc("_getName",$a,58);Qc("_getAccount",Wa,64);Qc("_visitCode",Q,54);Qc("_getClientInfo",ib,53,1);Qc("_getDetectTitle",lb,56,1);Qc("_getDetectFlash",
|
||||
jb,65,1);Qc("_getLocalGifPath",wb,57);Qc("_getServiceMode",xb,59);V("_setClientInfo",ib,66,2);V("_setAccount",Wa,3);V("_setNamespace",Ya,48);V("_setAllowLinker",fb,11,2);V("_setDetectFlash",jb,61,2);V("_setDetectTitle",lb,62,2);V("_setLocalGifPath",wb,46,0);V("_setLocalServerMode",xb,92,void 0,0);V("_setRemoteServerMode",xb,63,void 0,1);V("_setLocalRemoteServerMode",xb,47,void 0,2);V("_setSampleRate",vb,45,1);V("_setCampaignTrack",kb,36,2);V("_setAllowAnchor",gb,7,2);V("_setCampNameKey",ob,41);V("_setCampContentKey",
|
||||
tb,38);V("_setCampIdKey",nb,39);V("_setCampMediumKey",rb,40);V("_setCampNOKey",ub,42);V("_setCampSourceKey",qb,43);V("_setCampTermKey",sb,44);V("_setCampCIdKey",pb,37);V("_setCookiePath",P,9,0);V("_setMaxCustomVariables",yb,0,1);V("_setVisitorCookieTimeout",cb,28,1);V("_setSessionCookieTimeout",db,26,1);V("_setCampaignCookieTimeout",eb,29,1);V("_setReferrerOverride",Jb,49);V("_setSiteSpeedSampleRate",Dc,132);a("_trackPageview",U.prototype.Fa,1);a("_trackEvent",U.prototype.F,4);a("_trackPageLoadTime",
|
||||
U.prototype.Ea,100);a("_trackSocial",U.prototype.Ga,104);a("_trackTrans",U.prototype.Ia,18);a("_sendXEvent",U.prototype.ib,78);a("_createEventTracker",U.prototype.ia,74);a("_getVersion",U.prototype.qa,60);a("_setDomainName",U.prototype.B,6);a("_setAllowHash",U.prototype.va,8);a("_getLinkerUrl",U.prototype.na,52);a("_link",U.prototype.link,101);a("_linkByPost",U.prototype.ua,102);a("_setTrans",U.prototype.za,20);a("_addTrans",U.prototype.$,21);a("_addItem",U.prototype.Y,19);a("_clearTrans",U.prototype.ea,
|
||||
105);a("_setTransactionDelim",U.prototype.Aa,82);a("_setCustomVar",U.prototype.wa,10);a("_deleteCustomVar",U.prototype.ka,35);a("_getVisitorCustomVar",U.prototype.ra,50);a("_setXKey",U.prototype.Ca,83);a("_setXValue",U.prototype.Da,84);a("_getXKey",U.prototype.sa,76);a("_getXValue",U.prototype.ta,77);a("_clearXKey",U.prototype.fa,72);a("_clearXValue",U.prototype.ga,73);a("_createXObj",U.prototype.ja,75);a("_addIgnoredOrganic",U.prototype.W,15);a("_clearIgnoredOrganic",U.prototype.ba,97);a("_addIgnoredRef",
|
||||
U.prototype.X,31);a("_clearIgnoredRef",U.prototype.ca,32);a("_addOrganic",U.prototype.Z,14);a("_clearOrganic",U.prototype.da,70);a("_cookiePathCopy",U.prototype.ha,30);a("_get",U.prototype.ma,106);a("_set",U.prototype.xa,107);a("_addEventListener",U.prototype.addEventListener,108);a("_removeEventListener",U.prototype.removeEventListener,109);a("_addDevId",U.prototype.V);a("_getPlugin",Pc,122);a("_setPageGroup",U.prototype.ya,126);a("_trackTiming",U.prototype.Ha,124);a("_initData",U.prototype.initData,
|
||||
2);a("_setVar",U.prototype.Ba,22);V("_setSessionTimeout",db,27,3);V("_setCookieTimeout",eb,25,3);V("_setCookiePersistence",cb,24,1);a("_setAutoTrackOutbound",Fa,79);a("_setTrackOutboundSubdomains",Fa,81);a("_setHrefExamineLimit",Fa,80)};function Pc(a){var b=this.plugins_;if(b)return b.get(a)}
|
||||
var T=function(a,b,c,d){a[b]=function(){try{return void 0!=d&&H(d),c.apply(this,arguments)}catch(a){throw Ra("exc",b,a&&a.name),a;}}},Qc=function(a,b,c,d){U.prototype[a]=function(){try{return H(c),Aa(this.a.get(b),d)}catch(e){throw Ra("exc",a,e&&e.name),e;}}},V=function(a,b,c,d,e){U.prototype[a]=function(f){try{H(c),void 0==e?this.a.set(b,Aa(f,d)):this.a.set(b,e)}catch(Be){throw Ra("exc",a,Be&&Be.name),Be;}}},Se=function(a,b){return{type:b,target:a,stopPropagation:function(){throw"aborted";}}};var Rc=new RegExp(/(^|\.)doubleclick\.net$/i),Sc=function(a,b){return Rc.test(J.location.hostname)?!0:"/"!==b?!1:0!=a.indexOf("www.google.")&&0!=a.indexOf(".google.")&&0!=a.indexOf("google.")||-1<a.indexOf("google.org")?!1:!0},Tc=function(a){var b=a.get(bb),c=a.c(P,"/");Sc(b,c)&&a.stopPropagation()};var Zc=function(){var a={},b={},c=new Uc;this.g=function(a,b){c.add(a,b)};var d=new Uc;this.v=function(a,b){d.add(a,b)};var e=!1,f=!1,Be=!0;this.T=function(){e=!0};this.j=function(a){this.load();this.set(sc,a,!0);a=new Vc(this);e=!1;d.cb(this);e=!0;b={};this.gb();a.Ja()};this.load=function(){e&&(e=!1,this.Ka(),Wc(this),f||(f=!0,c.cb(this),Xc(this),Wc(this)),e=!0)};this.gb=function(){e&&(f?(e=!1,Xc(this),e=!0):this.load())};this.get=function(c){Ua[c]&&this.load();return void 0!==b[c]?b[c]:a[c]};this.set=
|
||||
function(c,d,e){Ua[c]&&this.load();e?b[c]=d:a[c]=d;Ua[c]&&this.gb()};this.Za=function(b){a[b]=this.b(b,0)+1};this.b=function(a,b){var c=this.get(a);return void 0==c||""===c?b:1*c};this.c=function(a,b){var c=this.get(a);return void 0==c?b:c+""};this.Ka=function(){if(Be){var b=this.c(bb,""),c=this.c(P,"/");Sc(b,c)||(a[O]=a[hb]&&""!=b?Yc(b):1,Be=!1)}}};Zc.prototype.stopPropagation=function(){throw"aborted";};
|
||||
var Vc=function(a){var b=this;this.fb=0;var c=a.get(tc);this.Ua=function(){0<b.fb&&c&&(b.fb--,b.fb||c())};this.Ja=function(){!b.fb&&c&&setTimeout(c,10)};a.set(uc,b,!0)};function $c(a,b){b=b||[];for(var c=0;c<b.length;c++){var d=b[c];if(""+a==d||0==d.indexOf(a+"."))return d}return"-"}
|
||||
var bd=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(6!==b.length||ad(b[0],c))return!1;c=1*b[1];var d=1*b[2],e=1*b[3],f=1*b[4];b=1*b[5];if(!(0<=c&&0<d&&0<e&&0<f&&0<=b))return!1;a.set(Q,c);a.set(Vb,d);a.set(Wb,e);a.set(Zb,f);a.set($b,b);return!0},cd=function(a){var b=a.get(Q),c=a.get(Vb),d=a.get(Wb),e=a.get(Zb),f=a.b($b,1);return[a.b(O,1),void 0!=b?b:"-",c||"-",d||"-",e||"-",f].join(".")},dd=function(a){return[a.b(O,1),a.b(cc,0),a.b(R,1),a.b(dc,0)].join(".")},ed=function(a,b,c){c=c?"":a.c(O,
|
||||
"1");var d=b.split(".");if(4!==d.length||ad(d[0],c))d=null;a.set(cc,d?1*d[1]:0);a.set(R,d?1*d[2]:10);a.set(dc,d?1*d[3]:a.get(ab));return null!=d||!ad(b,c)},fd=function(a,b){var c=G(a.c(Tb,"")),d=[],e=a.get(Fb);if(!b&&e){for(var f=0;f<e.length;f++){var Be=e[f];Be&&1==Be.scope&&d.push(f+"="+G(Be.name)+"="+G(Be.value)+"=1")}0<d.length&&(c+="|"+d.join("^"))}return c?a.b(O,1)+"."+c:null},gd=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(2>b.length||ad(b[0],c))return!1;b=b.slice(1).join(".").split("|");
|
||||
0<b.length&&a.set(Tb,I(b[0]));if(1>=b.length)return!0;b=b[1].split(-1==b[1].indexOf(",")?"^":",");for(c=0;c<b.length;c++){var d=b[c].split("=");if(4==d.length){var e={};e.name=I(d[1]);e.value=I(d[2]);e.scope=1;a.get(Fb)[d[0]]=e}}return!0},hd=function(a,b){var c=Te(a,b);return c?[a.b(O,1),a.b(ec,0),a.b(fc,1),a.b(gc,1),c].join("."):""},Te=function(a){function b(b,e){if(!F(a.get(b))){var f=a.c(b,""),f=f.split(" ").join("%20"),f=f.split("+").join("%20");c.push(e+"="+f)}}var c=[];b(ic,"utmcid");b(nc,"utmcsr");
|
||||
b(S,"utmgclid");b(kc,"utmgclsrc");b(lc,"utmdclid");b(mc,"utmdsid");b(jc,"utmccn");b(oc,"utmcmd");b(pc,"utmctr");b(qc,"utmcct");return c.join("|")},id=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(5>b.length||ad(b[0],c))return a.set(ec,void 0),a.set(fc,void 0),a.set(gc,void 0),a.set(ic,void 0),a.set(jc,void 0),a.set(nc,void 0),a.set(oc,void 0),a.set(pc,void 0),a.set(qc,void 0),a.set(S,void 0),a.set(kc,void 0),a.set(lc,void 0),a.set(mc,void 0),!1;a.set(ec,1*b[1]);a.set(fc,1*b[2]);a.set(gc,1*b[3]);
|
||||
Ue(a,b.slice(4).join("."));return!0},Ue=function(a,b){function c(a){return(a=b.match(a+"=(.*?)(?:\\|utm|$)"))&&2==a.length?a[1]:void 0}function d(b,c){c?(c=e?I(c):c.split("%20").join(" "),a.set(b,c)):a.set(b,void 0)}-1==b.indexOf("=")&&(b=I(b));var e="2"==c("utmcvr");d(ic,c("utmcid"));d(jc,c("utmccn"));d(nc,c("utmcsr"));d(oc,c("utmcmd"));d(pc,c("utmctr"));d(qc,c("utmcct"));d(S,c("utmgclid"));d(kc,c("utmgclsrc"));d(lc,c("utmdclid"));d(mc,c("utmdsid"))},ad=function(a,b){return b?a!=b:!/^\d+$/.test(a)};var Uc=function(){this.filters=[]};Uc.prototype.add=function(a,b){this.filters.push({name:a,s:b})};Uc.prototype.cb=function(a){try{for(var b=0;b<this.filters.length;b++)this.filters[b].s.call(W,a)}catch(c){}};function jd(a){100!=a.get(vb)&&a.get(Q)%1E4>=100*a.get(vb)&&a.stopPropagation()}function kd(a){ld(a.get(Wa))&&a.stopPropagation()}function md(a){"file:"==J.location.protocol&&a.stopPropagation()}function Ge(a){He()&&a.stopPropagation()}
|
||||
function nd(a){a.get(Ib)||a.set(Ib,J.title,!0);a.get(Hb)||a.set(Hb,J.location.pathname+J.location.search,!0)}function hf(a){a.get(Wa)&&"UA-XXXXX-X"!=a.get(Wa)||a.stopPropagation()};var od=new function(){var a=[];this.set=function(b){a[b]=!0};this.encode=function(){for(var b=[],c=0;c<a.length;c++)a[c]&&(b[Math.floor(c/6)]^=1<<c%6);for(c=0;c<b.length;c++)b[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(b[c]||0);return b.join("")+"~"}};function H(a){od.set(a)};var W=window,J=document,ld=function(a){var b=W._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===W["ga-disable-"+a])return!0;try{var c=W.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(d){}return!1},He=function(){return W.navigator&&"preview"==W.navigator.loadPurpose},Ve=function(a,b){setTimeout(a,b)},pd=function(a){var b=[],c=J.cookie.split(";");a=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var d=0;d<c.length;d++){var e=c[d].match(a);e&&b.push(e[1])}return b},X=function(a,b,c,d,e,f){e=
|
||||
ld(e)?!1:Sc(d,c)?!1:He()?!1:!0;e&&((b=Lc(b))&&2E3<b.length&&(b=b.substring(0,2E3),H(69)),a=a+"="+b+"; path="+c+"; ",f&&(a+="expires="+(new Date((new Date).getTime()+f)).toGMTString()+"; "),d&&(a+="domain="+d+";"),J.cookie=a)},Lc=function(a){if(!a)return a;var b=a.indexOf(";");-1!=b&&(a=a.substring(0,b),H(141));if(!(0<=W.navigator.userAgent.indexOf("Firefox")))return a;a=a.replace(/\n|\r/g," ");for(var b=0,c=a.length;b<c;++b){var d=a.charCodeAt(b)&255;if(10==d||13==d)a=a.substring(0,b)+"?"+a.substring(b+
|
||||
1)}return a};var qd,rd,sd=function(){if(!qd){var a={},b=W.navigator,c=W.screen;a.jb=c?c.width+"x"+c.height:"-";a.P=c?c.colorDepth+"-bit":"-";a.language=(b&&(b.language||b.browserLanguage)||"-").toLowerCase();a.javaEnabled=b&&b.javaEnabled()?1:0;a.characterSet=J.characterSet||J.charset||"-";try{var d;var e=J.documentElement,f=J.body,Be=f&&f.clientWidth&&f.clientHeight,b=[];e&&e.clientWidth&&e.clientHeight&&("CSS1Compat"===J.compatMode||!Be)?b=[e.clientWidth,e.clientHeight]:Be&&(b=[f.clientWidth,f.clientHeight]);
|
||||
d=0>=b[0]||0>=b[1]?"":b.join("x");a.Wa=d}catch(n){H(135)}qd=a}},td=function(){sd();for(var a=qd,b=W.navigator,a=b.appName+b.version+a.language+b.platform+b.userAgent+a.javaEnabled+a.jb+a.P+(J.cookie?J.cookie:"")+(J.referrer?J.referrer:""),b=a.length,c=W.history.length;0<c;)a+=c--^b++;return Yc(a)},ud=function(a){sd();var b=qd;a.set(Lb,b.jb);a.set(Mb,b.P);a.set(Pb,b.language);a.set(Qb,b.characterSet);a.set(Nb,b.javaEnabled);a.set(Rb,b.Wa);if(a.get(ib)&&a.get(jb)){if(!(b=rd)){var c,d,e;d="ShockwaveFlash";
|
||||
if((b=(b=W.navigator)?b.plugins:void 0)&&0<b.length)for(c=0;c<b.length&&!e;c++)d=b[c],-1<d.name.indexOf("Shockwave Flash")&&(e=d.description.split("Shockwave Flash ")[1]);else{d=d+"."+d;try{c=new ActiveXObject(d+".7"),e=c.GetVariable("$version")}catch(f){}if(!e)try{c=new ActiveXObject(d+".6"),e="WIN 6,0,21,0",c.AllowScriptAccess="always",e=c.GetVariable("$version")}catch(Be){}if(!e)try{c=new ActiveXObject(d),e=c.GetVariable("$version")}catch(n){}e&&(e=e.split(" ")[1].split(","),e=e[0]+"."+e[1]+" r"+
|
||||
e[2])}b=e?e:"-"}rd=b;a.set(Ob,rd)}else a.set(Ob,"-")};var vd=function(a){if(Ba(a))this.s=a;else{var b=a[0],c=b.lastIndexOf(":"),d=b.lastIndexOf(".");this.h=this.i=this.l="";-1==c&&-1==d?this.h=b:-1==c&&-1!=d?(this.i=b.substring(0,d),this.h=b.substring(d+1)):-1!=c&&-1==d?(this.l=b.substring(0,c),this.h=b.substring(c+1)):c>d?(this.i=b.substring(0,d),this.l=b.substring(d+1,c),this.h=b.substring(c+1)):(this.i=b.substring(0,d),this.h=b.substring(d+1));this.Xa=a.slice(1);this.Ma=!this.l&&"_require"==this.h;this.J=!this.i&&!this.l&&"_provide"==this.h}},Y=function(){T(Y.prototype,
|
||||
"push",Y.prototype.push,5);T(Y.prototype,"_getPlugin",Pc,121);T(Y.prototype,"_createAsyncTracker",Y.prototype.Sa,33);T(Y.prototype,"_getAsyncTracker",Y.prototype.Ta,34);this.I=new Bd;this.eb=[]};E=Y.prototype;E.Na=function(a,b,c){var d=this.I.get(a);if(!Ba(d))return!1;b.plugins_=b.plugins_||new Bd;b.plugins_.set(a,new d(b,c||{}));return!0};E.push=function(a){var b=Z.Va.apply(this,arguments),b=Z.eb.concat(b);for(Z.eb=[];0<b.length&&!Z.O(b[0])&&!(b.shift(),0<Z.eb.length););Z.eb=Z.eb.concat(b);return 0};
|
||||
E.Va=function(a){for(var b=[],c=0;c<arguments.length;c++)try{var d=new vd(arguments[c]);d.J?this.O(d):b.push(d)}catch(e){}return b};
|
||||
E.O=function(a){try{if(a.s)a.s.apply(W);else if(a.J)this.I.set(a.Xa[0],a.Xa[1]);else{var b="_gat"==a.i?M:"_gaq"==a.i?Z:M.u(a.i);if(a.Ma){if(!this.Na(a.Xa[0],b,a.Xa[2])){if(!a.Pa){var c=Oa(""+a.Xa[1]);var d=c.protocol,e=J.location.protocol;var f;if(f="https:"==d||d==e?!0:"http:"!=d?!1:"http:"==e)a:{var Be=Oa(J.location.href);if(!(c.Oa||0<=c.url.indexOf("?")||0<=c.path.indexOf("://")||c.host==Be.host&&c.port==Be.port))for(var n="http:"==c.protocol?80:443,Ja=M.S,b=0;b<Ja.length;b++)if(c.host==Ja[b][0]&&
|
||||
(c.port||n)==(Ja[b][1]||n)&&0==c.path.indexOf(Ja[b][2])){f=!0;break a}f=!1}f&&!ld()&&(a.Pa=Ia(c.url))}return!0}}else a.l&&(b=b.plugins_.get(a.l)),b[a.h].apply(b,a.Xa)}}catch(t){}};E.Sa=function(a,b){return M.hb(a,b||"")};E.Ta=function(a){return M.u(a)};var yd=function(){function a(a,b,c,d){void 0==f[a]&&(f[a]={});void 0==f[a][b]&&(f[a][b]=[]);f[a][b][c]=d}function b(a,b,c){if(void 0!=f[a]&&void 0!=f[a][b])return f[a][b][c]}function c(a,b){if(void 0!=f[a]&&void 0!=f[a][b]){f[a][b]=void 0;var c=!0,d;for(d=0;d<Be.length;d++)if(void 0!=f[a][Be[d]]){c=!1;break}c&&(f[a]=void 0)}}function d(a){var b="",c=!1,d,e;for(d=0;d<Be.length;d++)if(e=a[Be[d]],void 0!=e){c&&(b+=Be[d]);for(var c=[],f=void 0,Ad=void 0,Ad=0;Ad<e.length;Ad++)if(void 0!=e[Ad]){f="";1!=
|
||||
Ad&&void 0==e[Ad-1]&&(f+=Ad.toString()+"!");for(var fa=e[Ad],Ke="",Le=void 0,Me=void 0,ga=void 0,Le=0;Le<fa.length;Le++)Me=fa.charAt(Le),ga=n[Me],Ke+=void 0!=ga?ga:Me;f+=Ke;c.push(f)}b+="("+c.join("*")+")";c=!1}else c=!0;return b}var e=this,f=[],Be=["k","v"],n={"'":"'0",")":"'1","*":"'2","!":"'3"};e.Ra=function(a){return void 0!=f[a]};e.A=function(){for(var a="",b=0;b<f.length;b++)void 0!=f[b]&&(a+=b.toString()+d(f[b]));return a};e.Qa=function(a){if(void 0==a)return e.A();for(var b=a.A(),c=0;c<f.length;c++)void 0==
|
||||
f[c]||a.Ra(c)||(b+=c.toString()+d(f[c]));return b};e.f=function(b,c,d){if(!wd(d))return!1;a(b,"k",c,d);return!0};e.o=function(b,c,d){if(!xd(d))return!1;a(b,"v",c,d.toString());return!0};e.getKey=function(a,c){return b(a,"k",c)};e.N=function(a,c){return b(a,"v",c)};e.L=function(a){c(a,"k")};e.M=function(a){c(a,"v")};T(e,"_setKey",e.f,89);T(e,"_setValue",e.o,90);T(e,"_getKey",e.getKey,87);T(e,"_getValue",e.N,88);T(e,"_clearKey",e.L,85);T(e,"_clearValue",e.M,86)};
|
||||
function wd(a){return"string"==typeof a}function xd(a){return!("number"==typeof a||void 0!=Number&&a instanceof Number)||Math.round(a)!=a||isNaN(a)||Infinity==a?!1:!0};var zd=function(a){var b=W.gaGlobal;a&&!b&&(W.gaGlobal=b={});return b},Cd=function(){var a=zd(!0).hid;null==a&&(a=Ea(),zd(!0).hid=a);return a},Dd=function(a){a.set(Kb,Cd());var b=zd();if(b&&b.dh==a.get(O)){var c=b.sid;c&&(a.get(ac)?H(112):H(132),a.set(Zb,c),a.get(Sb)&&a.set(Wb,c));b=b.vid;a.get(Sb)&&b&&(b=b.split("."),a.set(Q,1*b[0]),a.set(Vb,1*b[1]))}};var Ed,Fd=function(a,b,c,d){var e=a.c(bb,""),f=a.c(P,"/");d=void 0!=d?d:a.b(cb,0);a=a.c(Wa,"");X(b,c,f,e,a,d)},Xc=function(a){var b=a.c(bb,"");a.b(O,1);var c=a.c(P,"/"),d=a.c(Wa,"");X("__utma",cd(a),c,b,d,a.get(cb));X("__utmb",dd(a),c,b,d,a.get(db));X("__utmc",""+a.b(O,1),c,b,d);var e=hd(a,!0);e?X("__utmz",e,c,b,d,a.get(eb)):X("__utmz","",c,b,"",-1);(e=fd(a,!1))?X("__utmv",e,c,b,d,a.get(cb)):X("__utmv","",c,b,"",-1)},Wc=function(a){var b=a.b(O,1);if(!bd(a,$c(b,pd("__utma"))))return a.set(Ub,!0),!1;
|
||||
var c=!ed(a,$c(b,pd("__utmb")));a.set(bc,c);id(a,$c(b,pd("__utmz")));gd(a,$c(b,pd("__utmv")));Ed=!c;return!0},Gd=function(a){Ed||0<pd("__utmb").length||(X("__utmd","1",a.c(P,"/"),a.c(bb,""),a.c(Wa,""),1E4),0==pd("__utmd").length&&a.stopPropagation())};var h=0,Jd=function(a){void 0==a.get(Q)?Hd(a):a.get(Ub)&&!a.get(Mc)?Hd(a):a.get(bc)&&Id(a)},Kd=function(a){a.get(hc)&&!a.get(ac)&&(Id(a),a.set(fc,a.get($b)))},Hd=function(a){h++;1<h&&H(137);var b=a.get(ab);a.set(Sb,!0);a.set(Q,Ea()^td(a)&2147483647);a.set(Tb,"");a.set(Vb,b);a.set(Wb,b);a.set(Zb,b);a.set($b,1);a.set(ac,!0);a.set(cc,0);a.set(R,10);a.set(dc,b);a.set(Fb,[]);a.set(Ub,!1);a.set(bc,!1)},Id=function(a){h++;1<h&&H(137);a.set(Wb,a.get(Zb));a.set(Zb,a.get(ab));a.Za($b);a.set(ac,!0);a.set(cc,
|
||||
0);a.set(R,10);a.set(dc,a.get(ab));a.set(bc,!1)};var Ld="daum:q eniro:search_word naver:query pchome:q images.google:q google:q yahoo:p yahoo:q msn:q bing:q aol:query aol:q lycos:q lycos:query ask:q cnn:query virgilio:qs baidu:wd baidu:word alice:qs yandex:text najdi:q seznam:q rakuten:qt biglobe:q goo.ne:MT search.smt.docomo:MT onet:qt onet:q kvasir:q terra:query rambler:query conduit:q babylon:q search-results:q avg:q comcast:q incredimail:q startsiden:q go.mail.ru:q centrum.cz:q 360.cn:q sogou:query tut.by:query globo:q ukr:q so.com:q haosou.com:q auone:q".split(" "),
|
||||
Sd=function(a){if(a.get(kb)&&!a.get(Mc)){var b;b=!F(a.get(ic))||!F(a.get(nc))||!F(a.get(S))||!F(a.get(lc));for(var c={},d=0;d<Md.length;d++){var e=Md[d];c[e]=a.get(e)}(d=a.get(rc))?(H(149),e=new Bd,Na(e,d),d=e):d=La(J.location.href,a.get(gb)).R;if("1"!=L(d.get(a.get(ub)))||!b)if(d=We(a,d)||Qd(a),d||b||!a.get(ac)||(Pd(a,void 0,"(direct)",void 0,void 0,void 0,"(direct)","(none)",void 0,void 0),d=!0),d&&(a.set(hc,Rd(a,c)),b="(direct)"==a.get(nc)&&"(direct)"==a.get(jc)&&"(none)"==a.get(oc),a.get(hc)||
|
||||
a.get(ac)&&!b))a.set(ec,a.get(ab)),a.set(fc,a.get($b)),a.Za(gc)}},We=function(a,b){function c(c,d){d=d||"-";var e=L(b.get(a.get(c)));return e&&"-"!=e?I(e):d}var d=L(b.get(a.get(nb)))||"-",e=L(b.get(a.get(qb)))||"-",f=L(b.get(a.get(pb)))||"-",Be=L(b.get("gclsrc"))||"-",n=L(b.get("dclid"))||"-",Ja=c(ob,"(not set)"),t=c(rb,"(not set)"),Za=c(sb),Ma=c(tb);if(F(d)&&F(f)&&F(n)&&F(e))return!1;var mb=!F(f)&&!F(Be),mb=F(e)&&(!F(n)||mb),Xb=F(Za);if(mb||Xb){var Ad=Nd(a),Ad=La(Ad,!0);(Ad=Od(a,Ad))&&!F(Ad[1]&&
|
||||
!Ad[2])&&(mb&&(e=Ad[0]),Xb&&(Za=Ad[1]))}Pd(a,d,e,f,Be,n,Ja,t,Za,Ma);return!0},Qd=function(a){var b=Nd(a),c=La(b,!0);(b=!(void 0!=b&&null!=b&&""!=b&&"0"!=b&&"-"!=b&&0<=b.indexOf("://")))||(b=c&&-1<c.host.indexOf("google")&&c.R.contains("q")&&"cse"==c.path);if(b)return!1;if((b=Od(a,c))&&!b[2])return Pd(a,void 0,b[0],void 0,void 0,void 0,"(organic)","organic",b[1],void 0),!0;if(b||!a.get(ac))return!1;a:{for(var b=a.get(Bb),d=Ka(c.host),e=0;e<b.length;++e)if(-1<d.indexOf(b[e])){a=!1;break a}Pd(a,void 0,
|
||||
d,void 0,void 0,void 0,"(referral)","referral",void 0,"/"+c.path);a=!0}return a},Od=function(a,b){for(var c=a.get(zb),d=0;d<c.length;++d){var e=c[d].split(":");if(-1<b.host.indexOf(e[0].toLowerCase())){var f=b.R.get(e[1]);if(f&&(f=K(f),!f&&-1<b.host.indexOf("google.")&&(f="(not provided)"),!e[3]||-1<b.url.indexOf(e[3]))){f||H(151);a:{for(var c=f,d=a.get(Ab),c=I(c).toLowerCase(),Be=0;Be<d.length;++Be)if(c==d[Be]){c=!0;break a}c=!1}return[e[2]||e[0],f,c]}}}return null},Pd=function(a,b,c,d,e,f,Be,n,
|
||||
Ja,t){a.set(ic,b);a.set(nc,c);a.set(S,d);a.set(kc,e);a.set(lc,f);a.set(jc,Be);a.set(oc,n);a.set(pc,Ja);a.set(qc,t)},Md=[jc,ic,S,lc,nc,oc,pc,qc],Rd=function(a,b){function c(a){a=(""+a).split("+").join("%20");return a=a.split(" ").join("%20")}function d(c){var d=""+(a.get(c)||"");c=""+(b[c]||"");return 0<d.length&&d==c}if(d(S)||d(lc))return H(131),!1;for(var e=0;e<Md.length;e++){var f=Md[e],Be=b[f]||"-",f=a.get(f)||"-";if(c(Be)!=c(f))return!0}return!1},Td=new RegExp(/^https?:\/\/(www\.)?google(\.com?)?(\.[a-z]{2}t?)?\/?$/i),
|
||||
cf=/^https?:\/\/(r\.)?search\.yahoo\.com?(\.jp)?\/?[^?]*$/i,of=/^https?:\/\/(www\.)?bing\.com\/?$/i,Nd=function(a){a=Pa(a.get(Jb),a.get(P));try{if(Td.test(a))return H(136),a+"?q=";if(cf.test(a))return H(150),a+"?p=(not provided)";if(of.test(a))return a+"?q=(not provided)"}catch(b){H(145)}return a};var Ud,Vd,Wd=function(a){Ud=a.c(S,"");Vd=a.c(kc,"")},Xd=function(a){var b=a.c(S,""),c=a.c(kc,"");b!=Ud&&(-1<c.indexOf("ds")?a.set(mc,void 0):!F(Ud)&&-1<Vd.indexOf("ds")&&a.set(mc,Ud))};var Zd=function(a){Yd(a,J.location.href)?(a.set(Mc,!0),H(12)):a.set(Mc,!1)},Yd=function(a,b){if(!a.get(fb))return!1;var c=La(b,a.get(gb)),d=K(c.R.get("__utma")),e=K(c.R.get("__utmb")),f=K(c.R.get("__utmc")),Be=K(c.R.get("__utmx")),n=K(c.R.get("__utmz")),Ja=K(c.R.get("__utmv")),c=K(c.R.get("__utmk"));if(Yc(""+d+e+f+Be+n+Ja)!=c){d=I(d);e=I(e);f=I(f);Be=I(Be);f=$d(d+e+f+Be,n,Ja,c);if(!f)return!1;n=f[0];Ja=f[1]}if(!bd(a,d,!0))return!1;ed(a,e,!0);id(a,n,!0);gd(a,Ja,!0);ae(a,Be,!0);return!0},ce=function(a,
|
||||
b,c){var d;d=cd(a)||"-";var e=dd(a)||"-",f=""+a.b(O,1)||"-",Be=be(a)||"-",n=hd(a,!1)||"-";a=fd(a,!1)||"-";var Ja=Yc(""+d+e+f+Be+n+a),t=[];t.push("__utma="+d);t.push("__utmb="+e);t.push("__utmc="+f);t.push("__utmx="+Be);t.push("__utmz="+n);t.push("__utmv="+a);t.push("__utmk="+Ja);d=t.join("&");if(!d)return b;e=b.indexOf("#");if(c)return 0>e?b+"#"+d:b+"&"+d;c="";f=b.indexOf("?");0<e&&(c=b.substring(e),b=b.substring(0,e));return 0>f?b+"?"+d+c:b+"&"+d+c},$d=function(a,b,c,d){for(var e=0;3>e;e++){for(var f=
|
||||
0;3>f;f++){if(d==Yc(a+b+c))return H(127),[b,c];var Be=b.replace(/ /g,"%20"),n=c.replace(/ /g,"%20");if(d==Yc(a+Be+n))return H(128),[Be,n];Be=Be.replace(/\+/g,"%20");n=n.replace(/\+/g,"%20");if(d==Yc(a+Be+n))return H(129),[Be,n];try{var Ja=b.match("utmctr=(.*?)(?:\\|utm|$)");if(Ja&&2==Ja.length&&(Be=b.replace(Ja[1],G(I(Ja[1]))),d==Yc(a+Be+c)))return H(139),[Be,c]}catch(t){}b=I(b)}c=I(c)}};var de="|",fe=function(a,b,c,d,e,f,Be,n,Ja){var t=ee(a,b);t||(t={},a.get(Cb).push(t));t.id_=b;t.affiliation_=c;t.total_=d;t.tax_=e;t.shipping_=f;t.city_=Be;t.state_=n;t.country_=Ja;t.items_=t.items_||[];return t},ge=function(a,b,c,d,e,f,Be){a=ee(a,b)||fe(a,b,"",0,0,0,"","","");var n;a:{if(a&&a.items_){n=a.items_;for(var Ja=0;Ja<n.length;Ja++)if(n[Ja].sku_==c){n=n[Ja];break a}}n=null}Ja=n||{};Ja.transId_=b;Ja.sku_=c;Ja.name_=d;Ja.category_=e;Ja.price_=f;Ja.quantity_=Be;n||a.items_.push(Ja);return Ja},
|
||||
ee=function(a,b){for(var c=a.get(Cb),d=0;d<c.length;d++)if(c[d].id_==b)return c[d];return null};var he,ie=function(a){if(!he){var b;b=J.location.hash;var c=W.name,d=/^#?gaso=([^&]*)/;if(c=(b=(b=b&&b.match(d)||c&&c.match(d))?b[1]:K(pd("GASO")))&&b.match(/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))Fd(a,"GASO",""+b,0),M._gasoDomain=a.get(bb),M._gasoCPath=a.get(P),a=c[1],Ia("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(a?"prefix="+a+"&":"")+Ea(),"_gasojs");he=!0}};var ae=function(a,b,c){c&&(b=I(b));c=a.b(O,1);b=b.split(".");2>b.length||!/^\d+$/.test(b[0])||(b[0]=""+c,Fd(a,"__utmx",b.join("."),void 0))},be=function(a,b){var c=$c(a.get(O),pd("__utmx"));"-"==c&&(c="");return b?G(c):c},Xe=function(a){try{var b=La(J.location.href,!1),c=decodeURIComponent(L(b.R.get("utm_referrer")))||"";c&&a.set(Jb,c);var d=decodeURIComponent(K(b.R.get("utm_expid")))||"";d&&(d=d.split(".")[0],a.set(Oc,""+d))}catch(e){H(146)}},k=function(a){var b=W.gaData&&W.gaData.expId;b&&a.set(Oc,
|
||||
""+b)};var ke=function(a,b){var c=Math.min(a.b(Dc,0),100);if(a.b(Q,0)%100>=c)return!1;c=Ye()||Ze();if(void 0==c)return!1;var d=c[0];if(void 0==d||Infinity==d||isNaN(d))return!1;0<d?$e(c)?b(je(c)):b(je(c.slice(0,1))):Ga(W,"load",function(){ke(a,b)},!1);return!0},me=function(a,b,c,d){var e=new yd;e.f(14,90,b.substring(0,500));e.f(14,91,a.substring(0,150));e.f(14,92,""+le(c));void 0!=d&&e.f(14,93,d.substring(0,500));e.o(14,90,c);return e},$e=function(a){for(var b=1;b<a.length;b++)if(isNaN(a[b])||Infinity==
|
||||
a[b]||0>a[b])return!1;return!0},le=function(a){return isNaN(a)||0>a?0:5E3>a?10*Math.floor(a/10):5E4>a?100*Math.floor(a/100):41E5>a?1E3*Math.floor(a/1E3):41E5},je=function(a){for(var b=new yd,c=0;c<a.length;c++)b.f(14,c+1,""+le(a[c])),b.o(14,c+1,a[c]);return b},Ye=function(){var a=W.performance||W.webkitPerformance;if(a=a&&a.timing){var b=a.navigationStart;if(0==b)H(133);else return[a.loadEventStart-b,a.domainLookupEnd-a.domainLookupStart,a.connectEnd-a.connectStart,a.responseStart-a.requestStart,
|
||||
a.responseEnd-a.responseStart,a.fetchStart-b,a.domInteractive-b,a.domContentLoadedEventStart-b]}},Ze=function(){if(W.top==W){var a=W.external,b=a&&a.onloadT;a&&!a.isValidLoadTime&&(b=void 0);2147483648<b&&(b=void 0);0<b&&a.setPageReadyTime();return void 0==b?void 0:[b]}};var bf=function(a){if(a.get(Sb))try{var b;a:{var c=pd(a.get(Ne)||"_ga");if(c&&!(1>c.length)){for(var d=[],e=0;e<c.length;e++){var f;var Be=c[e].split("."),n=Be.shift();if(("GA1"==n||"1"==n)&&1<Be.length){var Ja=Be.shift().split("-");1==Ja.length&&(Ja[1]="1");Ja[0]*=1;Ja[1]*=1;f={Ya:Ja,$a:Be.join(".")}}else f=void 0;f&&d.push(f)}if(1==d.length){b=d[0].$a;break a}if(0!=d.length){var t=a.get(Oe)||a.get(bb),d=af(d,(0==t.indexOf(".")?t.substr(1):t).split(".").length,0);if(1==d.length){b=d[0].$a;break a}var Za=
|
||||
a.get(Pe)||a.get(P);(c=Za)?(1<c.length&&"/"==c.charAt(c.length-1)&&(c=c.substr(0,c.length-1)),0!=c.indexOf("/")&&(c="/"+c),Za=c):Za="/";d=af(d,"/"==Za?1:Za.split("/").length,1);b=d[0].$a;break a}}b=void 0}if(b){var Ma=(""+b).split(".");2==Ma.length&&/[0-9.]/.test(Ma)&&(H(114),a.set(Q,Ma[0]),a.set(Vb,Ma[1]),a.set(Sb,!1))}}catch(mb){H(115)}},af=function(a,b,c){for(var d=[],e=[],f=128,Be=0;Be<a.length;Be++){var n=a[Be];n.Ya[c]==b?d.push(n):n.Ya[c]==f?e.push(n):n.Ya[c]<f&&(e=[n],f=n.Ya[c])}return 0<d.length?
|
||||
d:e};var nf=/^gtm\d+$/,Jc=function(a){var b;b=!!a.b(mf,1);b&&(H(140),"page"!=a.get(sc)?a.set(kf,"",!0):(b=a.c(lf,""),b||(b=(b=a.c($a,""))&&"~0"!=b?nf.test(b)?"__utmt_"+G(a.c(Wa,"")):"__utmt_"+G(b):"__utmt"),0<pd(b).length?a.set(kf,"",!0):(X(b,"1",a.c(P,"/"),a.c(bb,""),a.c(Wa,""),6E5),0<pd(b).length&&(a.set(kf,Ea(),!0),a.set(jf,3,!0),a.set(Yb,Kc()+"/r/__utm.gif?",!0)))))};var U=function(a,b,c){function d(a){return function(b){if((b=b.get(Nc)[a])&&b.length)for(var c=Se(e,a),d=0;d<b.length;d++)b[d].call(e,c)}}var e=this;this.a=new Zc;this.get=function(a){return this.a.get(a)};this.set=function(a,b,c){this.a.set(a,b,c)};this.set(Wa,b||"UA-XXXXX-X");this.set($a,a||"");this.set(Ya,c||"");this.set(ab,Math.round((new Date).getTime()/1E3));this.set(P,"/");this.set(cb,63072E6);this.set(eb,15768E6);this.set(db,18E5);this.set(fb,!1);this.set(yb,50);this.set(gb,!1);this.set(hb,
|
||||
!0);this.set(ib,!0);this.set(jb,!0);this.set(kb,!0);this.set(lb,!0);this.set(ob,"utm_campaign");this.set(nb,"utm_id");this.set(pb,"gclid");this.set(qb,"utm_source");this.set(rb,"utm_medium");this.set(sb,"utm_term");this.set(tb,"utm_content");this.set(ub,"utm_nooverride");this.set(vb,100);this.set(Dc,1);this.set(Ec,!1);this.set(wb,"/__utm.gif");this.set(xb,1);this.set(Cb,[]);this.set(Fb,[]);this.set(zb,Ld.slice(0));this.set(Ab,[]);this.set(Bb,[]);this.B("auto");this.set(Jb,J.referrer);Xe(this.a);this.set(Nc,
|
||||
{hit:[],load:[]});this.a.g("0",Zd);this.a.g("1",Wd);this.a.g("2",Jd);this.a.g("3",bf);this.a.g("4",Sd);this.a.g("5",Xd);this.a.g("6",Kd);this.a.g("7",d("load"));this.a.g("8",ie);this.a.v("A",kd);this.a.v("B",md);this.a.v("C",Ge);this.a.v("D",Jd);this.a.v("E",jd);this.a.v("F",Tc);this.a.v("G",ne);this.a.v("H",hf);this.a.v("I",Gd);this.a.v("J",nd);this.a.v("K",ud);this.a.v("L",Dd);this.a.v("M",k);this.a.v("N",Jc);this.a.v("O",d("hit"));this.a.v("P",oe);this.a.v("Q",pe);0===this.get(ab)&&H(111);this.a.T();
|
||||
this.H=void 0};E=U.prototype;E.m=function(){var a=this.get(Db);a||(a=new yd,this.set(Db,a));return a};E.La=function(a){for(var b in a){var c=a[b];a.hasOwnProperty(b)&&this.set(b,c,!0)}};E.K=function(a){if(this.get(Ec))return!1;var b=this,c=ke(this.a,function(c){b.set(Hb,a,!0);b.ib(c)});this.set(Ec,c);return c};E.Fa=function(a){a&&Ca(a)?(H(13),this.set(Hb,a,!0)):"object"===typeof a&&null!==a&&this.La(a);this.H=a=this.get(Hb);this.a.j("page");this.K(a)};
|
||||
E.F=function(a,b,c,d,e){if(""==a||!wd(a)||""==b||!wd(b)||void 0!=c&&!wd(c)||void 0!=d&&!xd(d))return!1;this.set(wc,a,!0);this.set(xc,b,!0);this.set(yc,c,!0);this.set(zc,d,!0);this.set(vc,!!e,!0);this.a.j("event");return!0};E.Ha=function(a,b,c,d,e){var f=this.a.b(Dc,0);1*e===e&&(f=e);if(this.a.b(Q,0)%100>=f)return!1;c=1*(""+c);if(""==a||!wd(a)||""==b||!wd(b)||!xd(c)||isNaN(c)||0>c||0>f||100<f||void 0!=d&&(""==d||!wd(d)))return!1;this.ib(me(a,b,c,d));return!0};
|
||||
E.Ga=function(a,b,c,d){if(!a||!b)return!1;this.set(Ac,a,!0);this.set(Bc,b,!0);this.set(Cc,c||J.location.href,!0);d&&this.set(Hb,d,!0);this.a.j("social");return!0};E.Ea=function(){this.set(Dc,10);this.K(this.H)};E.Ia=function(){this.a.j("trans")};E.ib=function(a){this.set(Eb,a,!0);this.a.j("event")};E.ia=function(a){this.initData();var b=this;return{_trackEvent:function(c,d,e){H(91);b.F(a,c,d,e)}}};E.ma=function(a){return this.get(a)};
|
||||
E.xa=function(a,b){if(a)if(Ca(a))this.set(a,b);else if("object"==typeof a)for(var c in a)a.hasOwnProperty(c)&&this.set(c,a[c])};E.addEventListener=function(a,b){var c=this.get(Nc)[a];c&&c.push(b)};E.removeEventListener=function(a,b){for(var c=this.get(Nc)[a],d=0;c&&d<c.length;d++)if(c[d]==b){c.splice(d,1);break}};E.qa=function(){return"5.6.7dc"};E.B=function(a){this.get(hb);a="auto"==a?Ka(J.domain):a&&"-"!=a&&"none"!=a?a.toLowerCase():"";this.set(bb,a)};E.va=function(a){this.set(hb,!!a)};
|
||||
E.na=function(a,b){return ce(this.a,a,b)};E.link=function(a,b){if(this.a.get(fb)&&a){var c=ce(this.a,a,b);J.location.href=c}};E.ua=function(a,b){this.a.get(fb)&&a&&a.action&&(a.action=ce(this.a,a.action,b))};
|
||||
E.za=function(){this.initData();var a=this.a,b=J.getElementById?J.getElementById("utmtrans"):J.utmform&&J.utmform.utmtrans?J.utmform.utmtrans:null;if(b&&b.value){a.set(Cb,[]);for(var b=b.value.split("UTM:"),c=0;c<b.length;c++){b[c]=Da(b[c]);for(var d=b[c].split(de),e=0;e<d.length;e++)d[e]=Da(d[e]);"T"==d[0]?fe(a,d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8]):"I"==d[0]&&ge(a,d[1],d[2],d[3],d[4],d[5],d[6])}}};E.$=function(a,b,c,d,e,f,Be,n){return fe(this.a,a,b,c,d,e,f,Be,n)};
|
||||
E.Y=function(a,b,c,d,e,f){return ge(this.a,a,b,c,d,e,f)};E.Aa=function(a){de=a||"|"};E.ea=function(){this.set(Cb,[])};E.wa=function(a,b,c,d){var e=this.a;if(0>=a||a>e.get(yb))a=!1;else if(!b||!c||128<b.length+c.length)a=!1;else{1!=d&&2!=d&&(d=3);var f={};f.name=b;f.value=c;f.scope=d;e.get(Fb)[a]=f;a=!0}a&&this.a.gb();return a};E.ka=function(a){this.a.get(Fb)[a]=void 0;this.a.gb()};E.ra=function(a){return(a=this.a.get(Fb)[a])&&1==a.scope?a.value:void 0};
|
||||
E.Ca=function(a,b,c){12==a&&1==b?this.set(Je,c):this.m().f(a,b,c)};E.Da=function(a,b,c){this.m().o(a,b,c)};E.sa=function(a,b){return this.m().getKey(a,b)};E.ta=function(a,b){return this.m().N(a,b)};E.fa=function(a){this.m().L(a)};E.ga=function(a){this.m().M(a)};E.ja=function(){return new yd};E.W=function(a){a&&this.get(Ab).push(a.toLowerCase())};E.ba=function(){this.set(Ab,[])};E.X=function(a){a&&this.get(Bb).push(a.toLowerCase())};E.ca=function(){this.set(Bb,[])};
|
||||
E.Z=function(a,b,c,d,e){if(a&&b){a=[a,b.toLowerCase()].join(":");if(d||e)a=[a,d,e].join(":");d=this.get(zb);d.splice(c?0:d.length,0,a)}};E.da=function(){this.set(zb,[])};E.ha=function(a){this.a.load();var b=this.get(P),c=be(this.a);this.set(P,a);this.a.gb();ae(this.a,c);this.set(P,b)};E.ya=function(a,b){if(0<a&&5>=a&&Ca(b)&&""!=b){var c=this.get(Fc)||[];c[a]=b;this.set(Fc,c)}};E.V=function(a){a=""+a;if(a.match(/^[A-Za-z0-9]{1,5}$/)){var b=this.get(Ic)||[];b.push(a);this.set(Ic,b)}};E.initData=function(){this.a.load()};
|
||||
E.Ba=function(a){a&&""!=a&&(this.set(Tb,a),this.a.j("var"))};var ne=function(a){"trans"!==a.get(sc)&&500<=a.b(cc,0)&&a.stopPropagation();if("event"===a.get(sc)){var b=(new Date).getTime(),c=a.b(dc,0),d=a.b(Zb,0),c=Math.floor((b-(c!=d?c:1E3*c))/1E3*1);0<c&&(a.set(dc,b),a.set(R,Math.min(10,a.b(R,0)+c)));0>=a.b(R,0)&&a.stopPropagation()}},pe=function(a){"event"===a.get(sc)&&a.set(R,Math.max(0,a.b(R,10)-1))};var qe=function(){var a=[];this.add=function(b,c,d){d&&(c=G(""+c));a.push(b+"="+c)};this.toString=function(){return a.join("&")}},re=function(a,b){(b||2!=a.get(xb))&&a.Za(cc)},se=function(a,b){b.add("utmwv","5.6.7dc");b.add("utms",a.get(cc));b.add("utmn",Ea());var c=J.location.hostname;F(c)||b.add("utmhn",c,!0);c=a.get(vb);100!=c&&b.add("utmsp",c,!0)},te=function(a,b){b.add("utmht",(new Date).getTime());b.add("utmac",Da(a.get(Wa)));a.get(Oc)&&b.add("utmxkey",a.get(Oc),!0);a.get(vc)&&b.add("utmni",
|
||||
1);a.get(Ie)&&b.add("utmgtm",a.get(Ie),!0);var c=a.get(Ic);c&&0<c.length&&b.add("utmdid",c.join("."));ef(a,b);!1!==a.get(Xa)&&(a.get(Xa)||M.w)&&b.add("aip",1);void 0!==a.get(kf)&&b.add("utmjid",a.c(kf,""),!0);a.b(jf,0)&&b.add("utmredir",a.b(jf,0),!0);M.bb||(M.bb=a.get(Wa));(1<M.ab()||M.bb!=a.get(Wa))&&b.add("utmmt",1);b.add("utmu",od.encode())},ue=function(a,b){for(var c=a.get(Fc)||[],d=[],e=1;e<c.length;e++)c[e]&&d.push(e+":"+G(c[e].replace(/%/g,"%25").replace(/:/g,"%3A").replace(/,/g,"%2C")));d.length&&
|
||||
b.add("utmpg",d.join(","))},ef=function(a,b){function c(a,b){b&&d.push(a+"="+b+";")}var d=[];c("__utma",cd(a));c("__utmz",hd(a,!1));c("__utmv",fd(a,!0));c("__utmx",be(a));b.add("utmcc",d.join("+"),!0)},ve=function(a,b){a.get(ib)&&(b.add("utmcs",a.get(Qb),!0),b.add("utmsr",a.get(Lb)),a.get(Rb)&&b.add("utmvp",a.get(Rb)),b.add("utmsc",a.get(Mb)),b.add("utmul",a.get(Pb)),b.add("utmje",a.get(Nb)),b.add("utmfl",a.get(Ob),!0))},we=function(a,b){a.get(lb)&&a.get(Ib)&&b.add("utmdt",a.get(Ib),!0);b.add("utmhid",
|
||||
a.get(Kb));b.add("utmr",Pa(a.get(Jb),a.get(P)),!0);b.add("utmp",G(a.get(Hb),!0),!0)},xe=function(a,b){for(var c=a.get(Db),d=a.get(Eb),e=a.get(Fb)||[],f=0;f<e.length;f++){var Be=e[f];Be&&(c||(c=new yd),c.f(8,f,Be.name),c.f(9,f,Be.value),3!=Be.scope&&c.f(11,f,""+Be.scope))}F(a.get(wc))||F(a.get(xc),!0)||(c||(c=new yd),c.f(5,1,a.get(wc)),c.f(5,2,a.get(xc)),e=a.get(yc),void 0!=e&&c.f(5,3,e),e=a.get(zc),void 0!=e&&c.o(5,1,e));F(a.get(Je))||(c||(c=new yd),c.f(12,1,a.get(Je)));c?b.add("utme",c.Qa(d),!0):
|
||||
d&&b.add("utme",d.A(),!0)},ye=function(a,b,c){var d=new qe;re(a,c);se(a,d);d.add("utmt","tran");d.add("utmtid",b.id_,!0);d.add("utmtst",b.affiliation_,!0);d.add("utmtto",b.total_,!0);d.add("utmttx",b.tax_,!0);d.add("utmtsp",b.shipping_,!0);d.add("utmtci",b.city_,!0);d.add("utmtrg",b.state_,!0);d.add("utmtco",b.country_,!0);xe(a,d);ve(a,d);we(a,d);(b=a.get(Gb))&&d.add("utmcu",b,!0);c||(ue(a,d),te(a,d));return d.toString()},ze=function(a,b,c){var d=new qe;re(a,c);se(a,d);d.add("utmt","item");d.add("utmtid",
|
||||
b.transId_,!0);d.add("utmipc",b.sku_,!0);d.add("utmipn",b.name_,!0);d.add("utmiva",b.category_,!0);d.add("utmipr",b.price_,!0);d.add("utmiqt",b.quantity_,!0);xe(a,d);ve(a,d);we(a,d);(b=a.get(Gb))&&d.add("utmcu",b,!0);c||(ue(a,d),te(a,d));return d.toString()},Ae=function(a,b){var c=a.get(sc);if("page"==c)c=new qe,re(a,b),se(a,c),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)),c=[c.toString()];else if("event"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","event"),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)),
|
||||
c=[c.toString()];else if("var"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","var"),!b&&te(a,c),c=[c.toString()];else if("trans"==c)for(var c=[],d=a.get(Cb),e=0;e<d.length;++e){c.push(ye(a,d[e],b));for(var f=d[e].items_,Be=0;Be<f.length;++Be)c.push(ze(a,f[Be],b))}else"social"==c?b?c=[]:(c=new qe,re(a,b),se(a,c),c.add("utmt","social"),c.add("utmsn",a.get(Ac),!0),c.add("utmsa",a.get(Bc),!0),c.add("utmsid",a.get(Cc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c.toString()]):"feedback"==c?b?c=[]:(c=new qe,
|
||||
re(a,b),se(a,c),c.add("utmt","feedback"),c.add("utmfbid",a.get(Gc),!0),c.add("utmfbpr",a.get(Hc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c.toString()]):c=[];return c},oe=function(a){var b,c=a.get(xb),d=a.get(uc),e=d&&d.Ua,f=0;if(0==c||2==c){var Be=a.get(wb)+"?";b=Ae(a,!0);for(var n=0,Ja=b.length;n<Ja;n++)Sa(b[n],e,Be,!0),f++}if(1==c||2==c)for(b=Ae(a),a=a.c(Yb,""),n=0,Ja=b.length;n<Ja;n++)try{Sa(b[n],e,a),f++}catch(t){t&&Ra(t.name,void 0,t.message)}d&&(d.fb=f)};var Kc=function(){return"https:"==J.location.protocol||M.G?"https://stats.g.doubleclick.net":"http://stats.g.doubleclick.net"},Ce=function(a){this.name="len";this.message=a+"-8192"},De=function(a){this.name="ff2post";this.message=a+"-2036"},Sa=function(a,b,c,d){b=b||Fa;if(d||2036>=a.length)ff(a,b,c);else if(8192>=a.length){if(0<=W.navigator.userAgent.indexOf("Firefox")&&![].reduce)throw new De(a.length);df(a,b)||Ee(a,b)||b()}else throw new Ce(a.length);},ff=function(a,b,c){c=c||Kc()+"/__utm.gif?";
|
||||
var d=new Image(1,1);d.src=c+a;d.onload=function(){d.onload=null;d.onerror=null;b()};d.onerror=function(){d.onload=null;d.onerror=null;b()}},df=function(a,b){var c=W.XMLHttpRequest;if(!c)return!1;var d=new c;if(!("withCredentials"in d))return!1;d.open("POST",Kc()+"/p/__utm.gif",!0);d.withCredentials=!0;d.setRequestHeader("Content-Type","text/plain");d.onreadystatechange=function(){4==d.readyState&&(b(),d=null)};d.send(a);return!0},Ee=function(a,b){if(!J.body)return Ve(function(){Ee(a,b)},100),!0;
|
||||
a=encodeURIComponent(a);try{var c=J.createElement('<iframe name="'+a+'"></iframe>')}catch(d){c=J.createElement("iframe"),c.name=a}c.height="0";c.width="0";c.style.display="none";c.style.visibility="hidden";var e=Kc()+"/u/post_iframe_dc.html";Ga(W,"beforeunload",function(){c.src="";c.parentNode&&c.parentNode.removeChild(c)});setTimeout(b,1E3);J.body.appendChild(c);c.src=e;return!0};var gf=function(){this.G=this.w=!1;0==Ea()%100&&(H(142),this.G=!0);this.C={};this.D=[];this.U=0;this.S=[["www.google-analytics.com","","/plugins/"]];this._gasoCPath=this._gasoDomain=this.bb=void 0;Qe();Re()};E=gf.prototype;E.oa=function(a,b){return this.hb(a,void 0,b)};E.hb=function(a,b,c){b&&H(23);c&&H(67);void 0==b&&(b="~"+M.U++);a=new U(b,a,c);M.C[b]=a;M.D.push(a);return a};E.u=function(a){a=a||"";return M.C[a]||M.hb(void 0,a)};E.pa=function(){return M.D.slice(0)};E.ab=function(){return M.D.length};
|
||||
E.aa=function(){this.w=!0};E.la=function(){this.G=!0};var Fe=function(a){if("prerender"==J.visibilityState)return!1;a();return!0};var M=new gf;var Ha=W._gat;Ha&&Ba(Ha._getTracker)?M=Ha:W._gat=M;var Z=new Y;(function(a){if(!Fe(a)){H(123);var b=!1,c=function(){if(!b&&Fe(a)){b=!0;var d=J,e=c;d.removeEventListener?d.removeEventListener("visibilitychange",e,!1):d.detachEvent&&d.detachEvent("onvisibilitychange",e)}};Ga(J,"visibilitychange",c)}})(function(){var a=W._gaq,b=!1;if(a&&Ba(a.push)&&(b="[object Array]"==Object.prototype.toString.call(Object(a)),!b)){Z=a;return}W._gaq=Z;b&&Z.push.apply(Z,a)});function Yc(a){var b=1,c=0,d;if(a)for(b=0,d=a.length-1;0<=d;d--)c=a.charCodeAt(d),b=(b<<6&268435455)+c+(c<<14),c=b&266338304,b=0!=c?b^c>>21:b;return b};})();
|
||||
@@ -0,0 +1,3 @@
|
||||
<!-- default response -->
|
||||
<html><head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body></body></html>
|
||||
@@ -0,0 +1,9 @@
|
||||
/*<!--*/(function() {var qss="&cb="+Math.floor(99999999999*Math.random());try{qss+="&ref="+encodeURIComponent(document.referrer)}catch(e$$12){}try{qss+="&sc_r="+encodeURIComponent(screen.width+"x"+screen.height)}catch(e$$13){}try{qss+="&sc_d="+encodeURIComponent(screen.colorDepth)}catch(e$$14){}
|
||||
var callDis=function(c,d){var a=function(){callDisInternal(c,d)};"complete"===document.readyState?setTimeout(a):window.addEventListener?window.addEventListener("load",a,!1):window.attachEvent("onload",a)},disCalled=!1,callDisInternal=function(c,d){if(!disCalled){disCalled=!0;var a="//"+d+"/dis/dis.aspx",b=document.createElement("iframe");b.width=b.height="0";b.style.display="none";b.src=(a+"?p="+c+qss).substring(0,2E3);(a=document.getElementById("criteoTagsContainer"))?a.appendChild(b):criteo_q.push({event:"appendTag",
|
||||
element:b})}};
|
||||
|
||||
callDis(14086, 'dis.eu.criteo.com');
|
||||
})();
|
||||
|
||||
|
||||
/*-->*/
|
||||
@@ -0,0 +1,77 @@
|
||||
(function(){var E;function Aa(a,b){switch(b){case 0:return""+a;case 1:return 1*a;case 2:return!!a;case 3:return 1E3*a}return a}function Ba(a){return"function"==typeof a}function Ca(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")}function F(a,b){return void 0==a||"-"==a&&!b||""==a}function Da(a){if(!a||""==a)return"";for(;a&&-1<" \n\r\t".indexOf(a.charAt(0));)a=a.substring(1);for(;a&&-1<" \n\r\t".indexOf(a.charAt(a.length-1));)a=a.substring(0,a.length-1);return a}
|
||||
function Ea(){return Math.round(2147483647*Math.random())}function Fa(){}function G(a,b){if(encodeURIComponent instanceof Function)return b?encodeURI(a):encodeURIComponent(a);H(68);return escape(a)}function I(a){a=a.split("+").join(" ");if(decodeURIComponent instanceof Function)try{return decodeURIComponent(a)}catch(b){H(17)}else H(68);return unescape(a)}var Ga=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)};
|
||||
function Ia(a,b){if(a){var c=J.createElement("script");c.type="text/javascript";c.async=!0;c.src=a;c.id=b;var d=J.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d);return c}}function K(a){return a&&0<a.length?a[0]:""}function L(a){var b=a?a.length:0;return 0<b?a[b-1]:""}var nf=function(){this.prefix="ga.";this.values={}};nf.prototype.set=function(a,b){this.values[this.prefix+a]=b};nf.prototype.get=function(a){return this.values[this.prefix+a]};
|
||||
nf.prototype.contains=function(a){return void 0!==this.get(a)};function Ka(a){0==a.indexOf("www.")&&(a=a.substring(4));return a.toLowerCase()}
|
||||
function La(a,b){var c,d={url:a,protocol:"http",host:"",path:"",R:new nf,anchor:""};if(!a)return d;c=a.indexOf("://");0<=c&&(d.protocol=a.substring(0,c),a=a.substring(c+3));c=a.search("/|\\?|#");if(0<=c)d.host=a.substring(0,c).toLowerCase(),a=a.substring(c);else return d.host=a.toLowerCase(),d;c=a.indexOf("#");0<=c&&(d.anchor=a.substring(c+1),a=a.substring(0,c));c=a.indexOf("?");0<=c&&(Na(d.R,a.substring(c+1)),a=a.substring(0,c));d.anchor&&b&&Na(d.R,d.anchor);a&&"/"==a.charAt(0)&&(a=a.substring(1));
|
||||
d.path=a;return d}
|
||||
function Oa(a,b){function c(a){var b=(a.hostname||"").split(":")[0].toLowerCase(),c=(a.protocol||"").toLowerCase(),c=1*a.port||("http:"==c?80:"https:"==c?443:"");a=a.pathname||"";0==a.indexOf("/")||(a="/"+a);return[b,""+c,a]}var d=b||J.createElement("a");d.href=J.location.href;var e=(d.protocol||"").toLowerCase(),f=c(d),Be=d.search||"",k=e+"//"+f[0]+(f[1]?":"+f[1]:"");0==a.indexOf("//")?a=e+a:0==a.indexOf("/")?a=k+a:a&&0!=a.indexOf("?")?0>a.split("/")[0].indexOf(":")&&(a=k+f[2].substring(0,f[2].lastIndexOf("/"))+
|
||||
"/"+a):a=k+f[2]+(a||Be);d.href=a;e=c(d);return{protocol:(d.protocol||"").toLowerCase(),host:e[0],port:e[1],path:e[2],Oa:d.search||"",url:a||""}}function Na(a,b){function c(b,c){a.contains(b)||a.set(b,[]);a.get(b).push(c)}for(var d=Da(b).split("&"),e=0;e<d.length;e++)if(d[e]){var f=d[e].indexOf("=");0>f?c(d[e],"1"):c(d[e].substring(0,f),d[e].substring(f+1))}}
|
||||
function Pa(a,b){if(F(a)||"["==a.charAt(0)&&"]"==a.charAt(a.length-1))return"-";var c=J.domain;return a.indexOf(c+(b&&"/"!=b?b:""))==(0==a.indexOf("http://")?7:0==a.indexOf("https://")?8:0)?"0":a};var Qa=0;function Ra(a,b,c){1<=Qa||1<=100*Math.random()||ld()||(a=["utmt=error","utmerr="+a,"utmwv=5.6.7","utmn="+Ea(),"utmsp=1"],b&&a.push("api="+b),c&&a.push("msg="+G(c.substring(0,100))),M.w&&a.push("aip=1"),Sa(a.join("&")),Qa++)};var Ta=0,Ua={};function N(a){return Va("x"+Ta++,a)}function Va(a,b){Ua[a]=!!b;return a}
|
||||
var Wa=N(),Xa=Va("anonymizeIp"),Ya=N(),$a=N(),ab=N(),bb=N(),O=N(),P=N(),cb=N(),db=N(),eb=N(),fb=N(),gb=N(),hb=N(),ib=N(),jb=N(),kb=N(),lb=N(),nb=N(),ob=N(),pb=N(),qb=N(),rb=N(),sb=N(),tb=N(),ub=N(),vb=N(),wb=N(),xb=N(),yb=N(),zb=N(),Ab=N(),Bb=N(),Cb=N(),Db=N(),Eb=N(),Fb=N(!0),Gb=Va("currencyCode"),Hb=Va("page"),Ib=Va("title"),Jb=N(),Kb=N(),Lb=N(),Mb=N(),Nb=N(),Ob=N(),Pb=N(),Qb=N(),Rb=N(),Q=N(!0),Sb=N(!0),Tb=N(!0),Ub=N(!0),Vb=N(!0),Wb=N(!0),Zb=N(!0),$b=N(!0),ac=N(!0),bc=N(!0),cc=N(!0),R=N(!0),dc=N(!0),
|
||||
ec=N(!0),fc=N(!0),gc=N(!0),hc=N(!0),ic=N(!0),jc=N(!0),S=N(!0),kc=N(!0),lc=N(!0),mc=N(!0),nc=N(!0),oc=N(!0),pc=N(!0),qc=N(!0),rc=Va("campaignParams"),sc=N(),tc=Va("hitCallback"),uc=N();N();var vc=N(),wc=N(),xc=N(),yc=N(),zc=N(),Ac=N(),Bc=N(),Cc=N(),Dc=N(),Ec=N(),Fc=N(),Gc=N(),Hc=N(),Ic=N();N();var Mc=N(),Nc=N(),Yb=N(),Jc=N(),Kc=N(),Lc=Va("utmtCookieName"),Cd=Va("displayFeatures"),Oc=N(),of=Va("gtmid"),Oe=Va("uaName"),Pe=Va("uaDomain"),Qe=Va("uaPath"),pf=Va("linkid");var Re=function(){function a(a,c,d){T(qf.prototype,a,c,d)}a("_createTracker",qf.prototype.hb,55);a("_getTracker",qf.prototype.oa,0);a("_getTrackerByName",qf.prototype.u,51);a("_getTrackers",qf.prototype.pa,130);a("_anonymizeIp",qf.prototype.aa,16);a("_forceSSL",qf.prototype.la,125);a("_getPlugin",Pc,120)},Se=function(){function a(a,c,d){T(U.prototype,a,c,d)}Qc("_getName",$a,58);Qc("_getAccount",Wa,64);Qc("_visitCode",Q,54);Qc("_getClientInfo",ib,53,1);Qc("_getDetectTitle",lb,56,1);Qc("_getDetectFlash",
|
||||
jb,65,1);Qc("_getLocalGifPath",wb,57);Qc("_getServiceMode",xb,59);V("_setClientInfo",ib,66,2);V("_setAccount",Wa,3);V("_setNamespace",Ya,48);V("_setAllowLinker",fb,11,2);V("_setDetectFlash",jb,61,2);V("_setDetectTitle",lb,62,2);V("_setLocalGifPath",wb,46,0);V("_setLocalServerMode",xb,92,void 0,0);V("_setRemoteServerMode",xb,63,void 0,1);V("_setLocalRemoteServerMode",xb,47,void 0,2);V("_setSampleRate",vb,45,1);V("_setCampaignTrack",kb,36,2);V("_setAllowAnchor",gb,7,2);V("_setCampNameKey",ob,41);V("_setCampContentKey",
|
||||
tb,38);V("_setCampIdKey",nb,39);V("_setCampMediumKey",rb,40);V("_setCampNOKey",ub,42);V("_setCampSourceKey",qb,43);V("_setCampTermKey",sb,44);V("_setCampCIdKey",pb,37);V("_setCookiePath",P,9,0);V("_setMaxCustomVariables",yb,0,1);V("_setVisitorCookieTimeout",cb,28,1);V("_setSessionCookieTimeout",db,26,1);V("_setCampaignCookieTimeout",eb,29,1);V("_setReferrerOverride",Jb,49);V("_setSiteSpeedSampleRate",Dc,132);a("_trackPageview",U.prototype.Fa,1);a("_trackEvent",U.prototype.F,4);a("_trackPageLoadTime",
|
||||
U.prototype.Ea,100);a("_trackSocial",U.prototype.Ga,104);a("_trackTrans",U.prototype.Ia,18);a("_sendXEvent",U.prototype.ib,78);a("_createEventTracker",U.prototype.ia,74);a("_getVersion",U.prototype.qa,60);a("_setDomainName",U.prototype.B,6);a("_setAllowHash",U.prototype.va,8);a("_getLinkerUrl",U.prototype.na,52);a("_link",U.prototype.link,101);a("_linkByPost",U.prototype.ua,102);a("_setTrans",U.prototype.za,20);a("_addTrans",U.prototype.$,21);a("_addItem",U.prototype.Y,19);a("_clearTrans",U.prototype.ea,
|
||||
105);a("_setTransactionDelim",U.prototype.Aa,82);a("_setCustomVar",U.prototype.wa,10);a("_deleteCustomVar",U.prototype.ka,35);a("_getVisitorCustomVar",U.prototype.ra,50);a("_setXKey",U.prototype.Ca,83);a("_setXValue",U.prototype.Da,84);a("_getXKey",U.prototype.sa,76);a("_getXValue",U.prototype.ta,77);a("_clearXKey",U.prototype.fa,72);a("_clearXValue",U.prototype.ga,73);a("_createXObj",U.prototype.ja,75);a("_addIgnoredOrganic",U.prototype.W,15);a("_clearIgnoredOrganic",U.prototype.ba,97);a("_addIgnoredRef",
|
||||
U.prototype.X,31);a("_clearIgnoredRef",U.prototype.ca,32);a("_addOrganic",U.prototype.Z,14);a("_clearOrganic",U.prototype.da,70);a("_cookiePathCopy",U.prototype.ha,30);a("_get",U.prototype.ma,106);a("_set",U.prototype.xa,107);a("_addEventListener",U.prototype.addEventListener,108);a("_removeEventListener",U.prototype.removeEventListener,109);a("_addDevId",U.prototype.V);a("_getPlugin",Pc,122);a("_setPageGroup",U.prototype.ya,126);a("_trackTiming",U.prototype.Ha,124);a("_initData",U.prototype.initData,
|
||||
2);a("_setVar",U.prototype.Ba,22);V("_setSessionTimeout",db,27,3);V("_setCookieTimeout",eb,25,3);V("_setCookiePersistence",cb,24,1);a("_setAutoTrackOutbound",Fa,79);a("_setTrackOutboundSubdomains",Fa,81);a("_setHrefExamineLimit",Fa,80)};function Pc(a){var b=this.plugins_;if(b)return b.get(a)}
|
||||
var T=function(a,b,c,d){a[b]=function(){try{return void 0!=d&&H(d),c.apply(this,arguments)}catch(a){throw Ra("exc",b,a&&a.name),a;}}},Qc=function(a,b,c,d){U.prototype[a]=function(){try{return H(c),Aa(this.a.get(b),d)}catch(e){throw Ra("exc",a,e&&e.name),e;}}},V=function(a,b,c,d,e){U.prototype[a]=function(f){try{H(c),void 0==e?this.a.set(b,Aa(f,d)):this.a.set(b,e)}catch(Be){throw Ra("exc",a,Be&&Be.name),Be;}}},Te=function(a,b){return{type:b,target:a,stopPropagation:function(){throw"aborted";}}};var Rc=new RegExp(/(^|\.)doubleclick\.net$/i),Sc=function(a,b){return Rc.test(J.location.hostname)?!0:"/"!==b?!1:0!=a.indexOf("www.google.")&&0!=a.indexOf(".google.")&&0!=a.indexOf("google.")||-1<a.indexOf("google.org")?!1:!0},Tc=function(a){var b=a.get(bb),c=a.c(P,"/");Sc(b,c)&&a.stopPropagation()};var Zc=function(){var a={},b={},c=new Uc;this.g=function(a,b){c.add(a,b)};var d=new Uc;this.v=function(a,b){d.add(a,b)};var e=!1,f=!1,Be=!0;this.T=function(){e=!0};this.j=function(a){this.load();this.set(sc,a,!0);a=new Vc(this);e=!1;d.cb(this);e=!0;b={};this.gb();a.Ja()};this.load=function(){e&&(e=!1,this.Ka(),Wc(this),f||(f=!0,c.cb(this),Xc(this),Wc(this)),e=!0)};this.gb=function(){e&&(f?(e=!1,Xc(this),e=!0):this.load())};this.get=function(c){Ua[c]&&this.load();return void 0!==b[c]?b[c]:a[c]};this.set=
|
||||
function(c,d,e){Ua[c]&&this.load();e?b[c]=d:a[c]=d;Ua[c]&&this.gb()};this.Za=function(b){a[b]=this.b(b,0)+1};this.b=function(a,b){var c=this.get(a);return void 0==c||""===c?b:1*c};this.c=function(a,b){var c=this.get(a);return void 0==c?b:c+""};this.Ka=function(){if(Be){var b=this.c(bb,""),c=this.c(P,"/");Sc(b,c)||(a[O]=a[hb]&&""!=b?Yc(b):1,Be=!1)}}};Zc.prototype.stopPropagation=function(){throw"aborted";};
|
||||
var Vc=function(a){var b=this;this.fb=0;var c=a.get(tc);this.Ua=function(){0<b.fb&&c&&(b.fb--,b.fb||c())};this.Ja=function(){!b.fb&&c&&setTimeout(c,10)};a.set(uc,b,!0)};function $c(a,b){b=b||[];for(var c=0;c<b.length;c++){var d=b[c];if(""+a==d||0==d.indexOf(a+"."))return d}return"-"}
|
||||
var bd=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(6!==b.length||ad(b[0],c))return!1;c=1*b[1];var d=1*b[2],e=1*b[3],f=1*b[4];b=1*b[5];if(!(0<=c&&0<d&&0<e&&0<f&&0<=b))return!1;a.set(Q,c);a.set(Vb,d);a.set(Wb,e);a.set(Zb,f);a.set($b,b);return!0},cd=function(a){var b=a.get(Q),c=a.get(Vb),d=a.get(Wb),e=a.get(Zb),f=a.b($b,1);return[a.b(O,1),void 0!=b?b:"-",c||"-",d||"-",e||"-",f].join(".")},dd=function(a){return[a.b(O,1),a.b(cc,0),a.b(R,1),a.b(dc,0)].join(".")},ed=function(a,b,c){c=c?"":a.c(O,
|
||||
"1");var d=b.split(".");if(4!==d.length||ad(d[0],c))d=null;a.set(cc,d?1*d[1]:0);a.set(R,d?1*d[2]:10);a.set(dc,d?1*d[3]:a.get(ab));return null!=d||!ad(b,c)},fd=function(a,b){var c=G(a.c(Tb,"")),d=[],e=a.get(Fb);if(!b&&e){for(var f=0;f<e.length;f++){var Be=e[f];Be&&1==Be.scope&&d.push(f+"="+G(Be.name)+"="+G(Be.value)+"=1")}0<d.length&&(c+="|"+d.join("^"))}return c?a.b(O,1)+"."+c:null},gd=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(2>b.length||ad(b[0],c))return!1;b=b.slice(1).join(".").split("|");
|
||||
0<b.length&&a.set(Tb,I(b[0]));if(1>=b.length)return!0;b=b[1].split(-1==b[1].indexOf(",")?"^":",");for(c=0;c<b.length;c++){var d=b[c].split("=");if(4==d.length){var e={};e.name=I(d[1]);e.value=I(d[2]);e.scope=1;a.get(Fb)[d[0]]=e}}return!0},hd=function(a,b){var c=Ue(a,b);return c?[a.b(O,1),a.b(ec,0),a.b(fc,1),a.b(gc,1),c].join("."):""},Ue=function(a){function b(b,e){if(!F(a.get(b))){var f=a.c(b,""),f=f.split(" ").join("%20"),f=f.split("+").join("%20");c.push(e+"="+f)}}var c=[];b(ic,"utmcid");b(nc,"utmcsr");
|
||||
b(S,"utmgclid");b(kc,"utmgclsrc");b(lc,"utmdclid");b(mc,"utmdsid");b(jc,"utmccn");b(oc,"utmcmd");b(pc,"utmctr");b(qc,"utmcct");return c.join("|")},id=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(5>b.length||ad(b[0],c))return a.set(ec,void 0),a.set(fc,void 0),a.set(gc,void 0),a.set(ic,void 0),a.set(jc,void 0),a.set(nc,void 0),a.set(oc,void 0),a.set(pc,void 0),a.set(qc,void 0),a.set(S,void 0),a.set(kc,void 0),a.set(lc,void 0),a.set(mc,void 0),!1;a.set(ec,1*b[1]);a.set(fc,1*b[2]);a.set(gc,1*b[3]);
|
||||
Ve(a,b.slice(4).join("."));return!0},Ve=function(a,b){function c(a){return(a=b.match(a+"=(.*?)(?:\\|utm|$)"))&&2==a.length?a[1]:void 0}function d(b,c){c?(c=e?I(c):c.split("%20").join(" "),a.set(b,c)):a.set(b,void 0)}-1==b.indexOf("=")&&(b=I(b));var e="2"==c("utmcvr");d(ic,c("utmcid"));d(jc,c("utmccn"));d(nc,c("utmcsr"));d(oc,c("utmcmd"));d(pc,c("utmctr"));d(qc,c("utmcct"));d(S,c("utmgclid"));d(kc,c("utmgclsrc"));d(lc,c("utmdclid"));d(mc,c("utmdsid"))},ad=function(a,b){return b?a!=b:!/^\d+$/.test(a)};var Uc=function(){this.filters=[]};Uc.prototype.add=function(a,b){this.filters.push({name:a,s:b})};Uc.prototype.cb=function(a){try{for(var b=0;b<this.filters.length;b++)this.filters[b].s.call(W,a)}catch(c){}};function jd(a){100!=a.get(vb)&&a.get(Q)%1E4>=100*a.get(vb)&&a.stopPropagation()}function kd(a){ld(a.get(Wa))&&a.stopPropagation()}function md(a){"file:"==J.location.protocol&&a.stopPropagation()}function Ge(a){He()&&a.stopPropagation()}
|
||||
function nd(a){a.get(Ib)||a.set(Ib,J.title,!0);a.get(Hb)||a.set(Hb,J.location.pathname+J.location.search,!0)}function lf(a){a.get(Wa)&&"UA-XXXXX-X"!=a.get(Wa)||a.stopPropagation()};var od=new function(){var a=[];this.set=function(b){a[b]=!0};this.encode=function(){for(var b=[],c=0;c<a.length;c++)a[c]&&(b[Math.floor(c/6)]^=1<<c%6);for(c=0;c<b.length;c++)b[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(b[c]||0);return b.join("")+"~"}};function H(a){od.set(a)};var W=window,J=document,ld=function(a){var b=W._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===W["ga-disable-"+a])return!0;try{var c=W.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(d){}return!1},He=function(){return W.navigator&&"preview"==W.navigator.loadPurpose},We=function(a,b){setTimeout(a,b)},pd=function(a){var b=[],c=J.cookie.split(";");a=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var d=0;d<c.length;d++){var e=c[d].match(a);e&&b.push(e[1])}return b},X=function(a,b,c,d,e,f){e=
|
||||
ld(e)?!1:Sc(d,c)?!1:He()?!1:!0;e&&((b=mf(b))&&2E3<b.length&&(b=b.substring(0,2E3),H(69)),a=a+"="+b+"; path="+c+"; ",f&&(a+="expires="+(new Date((new Date).getTime()+f)).toGMTString()+"; "),d&&(a+="domain="+d+";"),J.cookie=a)},mf=function(a){if(!a)return a;var b=a.indexOf(";");-1!=b&&(a=a.substring(0,b),H(141));if(!(0<=W.navigator.userAgent.indexOf("Firefox")))return a;a=a.replace(/\n|\r/g," ");for(var b=0,c=a.length;b<c;++b){var d=a.charCodeAt(b)&255;if(10==d||13==d)a=a.substring(0,b)+"?"+a.substring(b+
|
||||
1)}return a};var qd,rd,sd=function(){if(!qd){var a={},b=W.navigator,c=W.screen;a.jb=c?c.width+"x"+c.height:"-";a.P=c?c.colorDepth+"-bit":"-";a.language=(b&&(b.language||b.browserLanguage)||"-").toLowerCase();a.javaEnabled=b&&b.javaEnabled()?1:0;a.characterSet=J.characterSet||J.charset||"-";try{var d;var e=J.documentElement,f=J.body,Be=f&&f.clientWidth&&f.clientHeight,b=[];e&&e.clientWidth&&e.clientHeight&&("CSS1Compat"===J.compatMode||!Be)?b=[e.clientWidth,e.clientHeight]:Be&&(b=[f.clientWidth,f.clientHeight]);
|
||||
d=0>=b[0]||0>=b[1]?"":b.join("x");a.Wa=d}catch(k){H(135)}qd=a}},td=function(){sd();for(var a=qd,b=W.navigator,a=b.appName+b.version+a.language+b.platform+b.userAgent+a.javaEnabled+a.jb+a.P+(J.cookie?J.cookie:"")+(J.referrer?J.referrer:""),b=a.length,c=W.history.length;0<c;)a+=c--^b++;return Yc(a)},ud=function(a){sd();var b=qd;a.set(Lb,b.jb);a.set(Mb,b.P);a.set(Pb,b.language);a.set(Qb,b.characterSet);a.set(Nb,b.javaEnabled);a.set(Rb,b.Wa);if(a.get(ib)&&a.get(jb)){if(!(b=rd)){var c,d,e;d="ShockwaveFlash";
|
||||
if((b=(b=W.navigator)?b.plugins:void 0)&&0<b.length)for(c=0;c<b.length&&!e;c++)d=b[c],-1<d.name.indexOf("Shockwave Flash")&&(e=d.description.split("Shockwave Flash ")[1]);else{d=d+"."+d;try{c=new ActiveXObject(d+".7"),e=c.GetVariable("$version")}catch(f){}if(!e)try{c=new ActiveXObject(d+".6"),e="WIN 6,0,21,0",c.AllowScriptAccess="always",e=c.GetVariable("$version")}catch(Be){}if(!e)try{c=new ActiveXObject(d),e=c.GetVariable("$version")}catch(k){}e&&(e=e.split(" ")[1].split(","),e=e[0]+"."+e[1]+" r"+
|
||||
e[2])}b=e?e:"-"}rd=b;a.set(Ob,rd)}else a.set(Ob,"-")};var vd=function(a){if(Ba(a))this.s=a;else{var b=a[0],c=b.lastIndexOf(":"),d=b.lastIndexOf(".");this.h=this.i=this.l="";-1==c&&-1==d?this.h=b:-1==c&&-1!=d?(this.i=b.substring(0,d),this.h=b.substring(d+1)):-1!=c&&-1==d?(this.l=b.substring(0,c),this.h=b.substring(c+1)):c>d?(this.i=b.substring(0,d),this.l=b.substring(d+1,c),this.h=b.substring(c+1)):(this.i=b.substring(0,d),this.h=b.substring(d+1));this.Xa=a.slice(1);this.Ma=!this.l&&"_require"==this.h;this.J=!this.i&&!this.l&&"_provide"==this.h}},Y=function(){T(Y.prototype,
|
||||
"push",Y.prototype.push,5);T(Y.prototype,"_getPlugin",Pc,121);T(Y.prototype,"_createAsyncTracker",Y.prototype.Sa,33);T(Y.prototype,"_getAsyncTracker",Y.prototype.Ta,34);this.I=new nf;this.eb=[]};E=Y.prototype;E.Na=function(a,b,c){var d=this.I.get(a);if(!Ba(d))return!1;b.plugins_=b.plugins_||new nf;b.plugins_.set(a,new d(b,c||{}));return!0};E.push=function(a){var b=Z.Va.apply(this,arguments),b=Z.eb.concat(b);for(Z.eb=[];0<b.length&&!Z.O(b[0])&&!(b.shift(),0<Z.eb.length););Z.eb=Z.eb.concat(b);return 0};
|
||||
E.Va=function(a){for(var b=[],c=0;c<arguments.length;c++)try{var d=new vd(arguments[c]);d.J?this.O(d):b.push(d)}catch(e){}return b};
|
||||
E.O=function(a){try{if(a.s)a.s.apply(W);else if(a.J)this.I.set(a.Xa[0],a.Xa[1]);else{var b="_gat"==a.i?M:"_gaq"==a.i?Z:M.u(a.i);if(a.Ma){if(!this.Na(a.Xa[0],b,a.Xa[2])){if(!a.Pa){var c=Oa(""+a.Xa[1]);var d=c.protocol,e=J.location.protocol;var f;if(f="https:"==d||d==e?!0:"http:"!=d?!1:"http:"==e)a:{var Be=Oa(J.location.href);if(!(c.Oa||0<=c.url.indexOf("?")||0<=c.path.indexOf("://")||c.host==Be.host&&c.port==Be.port))for(var k="http:"==c.protocol?80:443,Ja=M.S,b=0;b<Ja.length;b++)if(c.host==Ja[b][0]&&
|
||||
(c.port||k)==(Ja[b][1]||k)&&0==c.path.indexOf(Ja[b][2])){f=!0;break a}f=!1}f&&!ld()&&(a.Pa=Ia(c.url))}return!0}}else a.l&&(b=b.plugins_.get(a.l)),b[a.h].apply(b,a.Xa)}}catch(t){}};E.Sa=function(a,b){return M.hb(a,b||"")};E.Ta=function(a){return M.u(a)};var yd=function(){function a(a,b,c,d){void 0==f[a]&&(f[a]={});void 0==f[a][b]&&(f[a][b]=[]);f[a][b][c]=d}function b(a,b,c){if(void 0!=f[a]&&void 0!=f[a][b])return f[a][b][c]}function c(a,b){if(void 0!=f[a]&&void 0!=f[a][b]){f[a][b]=void 0;var c=!0,d;for(d=0;d<Be.length;d++)if(void 0!=f[a][Be[d]]){c=!1;break}c&&(f[a]=void 0)}}function d(a){var b="",c=!1,d,e;for(d=0;d<Be.length;d++)if(e=a[Be[d]],void 0!=e){c&&(b+=Be[d]);for(var c=[],f=void 0,Bd=void 0,Bd=0;Bd<e.length;Bd++)if(void 0!=e[Bd]){f="";1!=
|
||||
Bd&&void 0==e[Bd-1]&&(f+=Bd.toString()+"!");for(var fa=e[Bd],Ke="",Le=void 0,Me=void 0,ga=void 0,Le=0;Le<fa.length;Le++)Me=fa.charAt(Le),ga=k[Me],Ke+=void 0!=ga?ga:Me;f+=Ke;c.push(f)}b+="("+c.join("*")+")";c=!1}else c=!0;return b}var e=this,f=[],Be=["k","v"],k={"'":"'0",")":"'1","*":"'2","!":"'3"};e.Ra=function(a){return void 0!=f[a]};e.A=function(){for(var a="",b=0;b<f.length;b++)void 0!=f[b]&&(a+=b.toString()+d(f[b]));return a};e.Qa=function(a){if(void 0==a)return e.A();for(var b=a.A(),c=0;c<f.length;c++)void 0==
|
||||
f[c]||a.Ra(c)||(b+=c.toString()+d(f[c]));return b};e.f=function(b,c,d){if(!wd(d))return!1;a(b,"k",c,d);return!0};e.o=function(b,c,d){if(!xd(d))return!1;a(b,"v",c,d.toString());return!0};e.getKey=function(a,c){return b(a,"k",c)};e.N=function(a,c){return b(a,"v",c)};e.L=function(a){c(a,"k")};e.M=function(a){c(a,"v")};T(e,"_setKey",e.f,89);T(e,"_setValue",e.o,90);T(e,"_getKey",e.getKey,87);T(e,"_getValue",e.N,88);T(e,"_clearKey",e.L,85);T(e,"_clearValue",e.M,86)};
|
||||
function wd(a){return"string"==typeof a}function xd(a){return!("number"==typeof a||void 0!=Number&&a instanceof Number)||Math.round(a)!=a||isNaN(a)||Infinity==a?!1:!0};var zd=function(a){var b=W.gaGlobal;a&&!b&&(W.gaGlobal=b={});return b},Ad=function(){var a=zd(!0).hid;null==a&&(a=Ea(),zd(!0).hid=a);return a},Dd=function(a){a.set(Kb,Ad());var b=zd();if(b&&b.dh==a.get(O)){var c=b.sid;c&&(a.get(ac)?H(112):H(132),a.set(Zb,c),a.get(Sb)&&a.set(Wb,c));b=b.vid;a.get(Sb)&&b&&(b=b.split("."),a.set(Q,1*b[0]),a.set(Vb,1*b[1]))}};var Ed,Fd=function(a,b,c,d){var e=a.c(bb,""),f=a.c(P,"/");d=void 0!=d?d:a.b(cb,0);a=a.c(Wa,"");X(b,c,f,e,a,d)},Xc=function(a){var b=a.c(bb,"");a.b(O,1);var c=a.c(P,"/"),d=a.c(Wa,"");X("__utma",cd(a),c,b,d,a.get(cb));X("__utmb",dd(a),c,b,d,a.get(db));X("__utmc",""+a.b(O,1),c,b,d);var e=hd(a,!0);e?X("__utmz",e,c,b,d,a.get(eb)):X("__utmz","",c,b,"",-1);(e=fd(a,!1))?X("__utmv",e,c,b,d,a.get(cb)):X("__utmv","",c,b,"",-1)},Wc=function(a){var b=a.b(O,1);if(!bd(a,$c(b,pd("__utma"))))return a.set(Ub,!0),!1;
|
||||
var c=!ed(a,$c(b,pd("__utmb")));a.set(bc,c);id(a,$c(b,pd("__utmz")));gd(a,$c(b,pd("__utmv")));Ed=!c;return!0},Gd=function(a){Ed||0<pd("__utmb").length||(X("__utmd","1",a.c(P,"/"),a.c(bb,""),a.c(Wa,""),1E4),0==pd("__utmd").length&&a.stopPropagation())};var h=0,Jd=function(a){void 0==a.get(Q)?Hd(a):a.get(Ub)&&!a.get(Mc)?Hd(a):a.get(bc)&&Id(a)},Kd=function(a){a.get(hc)&&!a.get(ac)&&(Id(a),a.set(fc,a.get($b)))},Hd=function(a){h++;1<h&&H(137);var b=a.get(ab);a.set(Sb,!0);a.set(Q,Ea()^td(a)&2147483647);a.set(Tb,"");a.set(Vb,b);a.set(Wb,b);a.set(Zb,b);a.set($b,1);a.set(ac,!0);a.set(cc,0);a.set(R,10);a.set(dc,b);a.set(Fb,[]);a.set(Ub,!1);a.set(bc,!1)},Id=function(a){h++;1<h&&H(137);a.set(Wb,a.get(Zb));a.set(Zb,a.get(ab));a.Za($b);a.set(ac,!0);a.set(cc,
|
||||
0);a.set(R,10);a.set(dc,a.get(ab));a.set(bc,!1)};var Ld="daum:q eniro:search_word naver:query pchome:q images.google:q google:q yahoo:p yahoo:q msn:q bing:q aol:query aol:q lycos:q lycos:query ask:q cnn:query virgilio:qs baidu:wd baidu:word alice:qs yandex:text najdi:q seznam:q rakuten:qt biglobe:q goo.ne:MT search.smt.docomo:MT onet:qt onet:q kvasir:q terra:query rambler:query conduit:q babylon:q search-results:q avg:q comcast:q incredimail:q startsiden:q go.mail.ru:q centrum.cz:q 360.cn:q sogou:query tut.by:query globo:q ukr:q so.com:q haosou.com:q auone:q".split(" "),
|
||||
Sd=function(a){if(a.get(kb)&&!a.get(Mc)){var b;b=!F(a.get(ic))||!F(a.get(nc))||!F(a.get(S))||!F(a.get(lc));for(var c={},d=0;d<Md.length;d++){var e=Md[d];c[e]=a.get(e)}(d=a.get(rc))?(H(149),e=new nf,Na(e,d),d=e):d=La(J.location.href,a.get(gb)).R;if("1"!=L(d.get(a.get(ub)))||!b)if(d=Xe(a,d)||Qd(a),d||b||!a.get(ac)||(Pd(a,void 0,"(direct)",void 0,void 0,void 0,"(direct)","(none)",void 0,void 0),d=!0),d&&(a.set(hc,Rd(a,c)),b="(direct)"==a.get(nc)&&"(direct)"==a.get(jc)&&"(none)"==a.get(oc),a.get(hc)||
|
||||
a.get(ac)&&!b))a.set(ec,a.get(ab)),a.set(fc,a.get($b)),a.Za(gc)}},Xe=function(a,b){function c(c,d){d=d||"-";var e=L(b.get(a.get(c)));return e&&"-"!=e?I(e):d}var d=L(b.get(a.get(nb)))||"-",e=L(b.get(a.get(qb)))||"-",f=L(b.get(a.get(pb)))||"-",Be=L(b.get("gclsrc"))||"-",k=L(b.get("dclid"))||"-",Ja=c(ob,"(not set)"),t=c(rb,"(not set)"),Za=c(sb),Ma=c(tb);if(F(d)&&F(f)&&F(k)&&F(e))return!1;var mb=!F(f)&&!F(Be),mb=F(e)&&(!F(k)||mb),Xb=F(Za);if(mb||Xb){var Bd=Nd(a),Bd=La(Bd,!0);(Bd=Od(a,Bd))&&!F(Bd[1]&&
|
||||
!Bd[2])&&(mb&&(e=Bd[0]),Xb&&(Za=Bd[1]))}Pd(a,d,e,f,Be,k,Ja,t,Za,Ma);return!0},Qd=function(a){var b=Nd(a),c=La(b,!0);(b=!(void 0!=b&&null!=b&&""!=b&&"0"!=b&&"-"!=b&&0<=b.indexOf("://")))||(b=c&&-1<c.host.indexOf("google")&&c.R.contains("q")&&"cse"==c.path);if(b)return!1;if((b=Od(a,c))&&!b[2])return Pd(a,void 0,b[0],void 0,void 0,void 0,"(organic)","organic",b[1],void 0),!0;if(b||!a.get(ac))return!1;a:{for(var b=a.get(Bb),d=Ka(c.host),e=0;e<b.length;++e)if(-1<d.indexOf(b[e])){a=!1;break a}Pd(a,void 0,
|
||||
d,void 0,void 0,void 0,"(referral)","referral",void 0,"/"+c.path);a=!0}return a},Od=function(a,b){for(var c=a.get(zb),d=0;d<c.length;++d){var e=c[d].split(":");if(-1<b.host.indexOf(e[0].toLowerCase())){var f=b.R.get(e[1]);if(f&&(f=K(f),!f&&-1<b.host.indexOf("google.")&&(f="(not provided)"),!e[3]||-1<b.url.indexOf(e[3]))){f||H(151);a:{for(var c=f,d=a.get(Ab),c=I(c).toLowerCase(),Be=0;Be<d.length;++Be)if(c==d[Be]){c=!0;break a}c=!1}return[e[2]||e[0],f,c]}}}return null},Pd=function(a,b,c,d,e,f,Be,k,
|
||||
Ja,t){a.set(ic,b);a.set(nc,c);a.set(S,d);a.set(kc,e);a.set(lc,f);a.set(jc,Be);a.set(oc,k);a.set(pc,Ja);a.set(qc,t)},Md=[jc,ic,S,lc,nc,oc,pc,qc],Rd=function(a,b){function c(a){a=(""+a).split("+").join("%20");return a=a.split(" ").join("%20")}function d(c){var d=""+(a.get(c)||"");c=""+(b[c]||"");return 0<d.length&&d==c}if(d(S)||d(lc))return H(131),!1;for(var e=0;e<Md.length;e++){var f=Md[e],Be=b[f]||"-",f=a.get(f)||"-";if(c(Be)!=c(f))return!0}return!1},Td=new RegExp(/^https?:\/\/(www\.)?google(\.com?)?(\.[a-z]{2}t?)?\/?$/i),
|
||||
jf=/^https?:\/\/(r\.)?search\.yahoo\.com?(\.jp)?\/?[^?]*$/i,rf=/^https?:\/\/(www\.)?bing\.com\/?$/i,Nd=function(a){a=Pa(a.get(Jb),a.get(P));try{if(Td.test(a))return H(136),a+"?q=";if(jf.test(a))return H(150),a+"?p=(not provided)";if(rf.test(a))return a+"?q=(not provided)"}catch(b){H(145)}return a};var Ud,Vd,Wd=function(a){Ud=a.c(S,"");Vd=a.c(kc,"")},Xd=function(a){var b=a.c(S,""),c=a.c(kc,"");b!=Ud&&(-1<c.indexOf("ds")?a.set(mc,void 0):!F(Ud)&&-1<Vd.indexOf("ds")&&a.set(mc,Ud))};var Zd=function(a){Yd(a,J.location.href)?(a.set(Mc,!0),H(12)):a.set(Mc,!1)},Yd=function(a,b){if(!a.get(fb))return!1;var c=La(b,a.get(gb)),d=K(c.R.get("__utma")),e=K(c.R.get("__utmb")),f=K(c.R.get("__utmc")),Be=K(c.R.get("__utmx")),k=K(c.R.get("__utmz")),Ja=K(c.R.get("__utmv")),c=K(c.R.get("__utmk"));if(Yc(""+d+e+f+Be+k+Ja)!=c){d=I(d);e=I(e);f=I(f);Be=I(Be);f=$d(d+e+f+Be,k,Ja,c);if(!f)return!1;k=f[0];Ja=f[1]}if(!bd(a,d,!0))return!1;ed(a,e,!0);id(a,k,!0);gd(a,Ja,!0);ae(a,Be,!0);return!0},ce=function(a,
|
||||
b,c){var d;d=cd(a)||"-";var e=dd(a)||"-",f=""+a.b(O,1)||"-",Be=be(a)||"-",k=hd(a,!1)||"-";a=fd(a,!1)||"-";var Ja=Yc(""+d+e+f+Be+k+a),t=[];t.push("__utma="+d);t.push("__utmb="+e);t.push("__utmc="+f);t.push("__utmx="+Be);t.push("__utmz="+k);t.push("__utmv="+a);t.push("__utmk="+Ja);d=t.join("&");if(!d)return b;e=b.indexOf("#");if(c)return 0>e?b+"#"+d:b+"&"+d;c="";f=b.indexOf("?");0<e&&(c=b.substring(e),b=b.substring(0,e));return 0>f?b+"?"+d+c:b+"&"+d+c},$d=function(a,b,c,d){for(var e=0;3>e;e++){for(var f=
|
||||
0;3>f;f++){if(d==Yc(a+b+c))return H(127),[b,c];var Be=b.replace(/ /g,"%20"),k=c.replace(/ /g,"%20");if(d==Yc(a+Be+k))return H(128),[Be,k];Be=Be.replace(/\+/g,"%20");k=k.replace(/\+/g,"%20");if(d==Yc(a+Be+k))return H(129),[Be,k];try{var Ja=b.match("utmctr=(.*?)(?:\\|utm|$)");if(Ja&&2==Ja.length&&(Be=b.replace(Ja[1],G(I(Ja[1]))),d==Yc(a+Be+c)))return H(139),[Be,c]}catch(t){}b=I(b)}c=I(c)}};var de="|",fe=function(a,b,c,d,e,f,Be,k,Ja){var t=ee(a,b);t||(t={},a.get(Cb).push(t));t.id_=b;t.affiliation_=c;t.total_=d;t.tax_=e;t.shipping_=f;t.city_=Be;t.state_=k;t.country_=Ja;t.items_=t.items_||[];return t},ge=function(a,b,c,d,e,f,Be){a=ee(a,b)||fe(a,b,"",0,0,0,"","","");var k;a:{if(a&&a.items_){k=a.items_;for(var Ja=0;Ja<k.length;Ja++)if(k[Ja].sku_==c){k=k[Ja];break a}}k=null}Ja=k||{};Ja.transId_=b;Ja.sku_=c;Ja.name_=d;Ja.category_=e;Ja.price_=f;Ja.quantity_=Be;k||a.items_.push(Ja);return Ja},
|
||||
ee=function(a,b){for(var c=a.get(Cb),d=0;d<c.length;d++)if(c[d].id_==b)return c[d];return null};var he,ie=function(a){if(!he){var b;b=J.location.hash;var c=W.name,d=/^#?gaso=([^&]*)/;if(c=(b=(b=b&&b.match(d)||c&&c.match(d))?b[1]:K(pd("GASO")))&&b.match(/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))Fd(a,"GASO",""+b,0),M._gasoDomain=a.get(bb),M._gasoCPath=a.get(P),a=c[1],Ia("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(a?"prefix="+a+"&":"")+Ea(),"_gasojs");he=!0}};var ae=function(a,b,c){c&&(b=I(b));c=a.b(O,1);b=b.split(".");2>b.length||!/^\d+$/.test(b[0])||(b[0]=""+c,Fd(a,"__utmx",b.join("."),void 0))},be=function(a,b){var c=$c(a.get(O),pd("__utmx"));"-"==c&&(c="");return b?G(c):c},Ye=function(a){try{var b=La(J.location.href,!1),c=decodeURIComponent(L(b.R.get("utm_referrer")))||"";c&&a.set(Jb,c);var d=decodeURIComponent(K(b.R.get("utm_expid")))||"";d&&(d=d.split(".")[0],a.set(Oc,""+d))}catch(e){H(146)}},l=function(a){var b=W.gaData&&W.gaData.expId;b&&a.set(Oc,
|
||||
""+b)};var ke=function(a,b){var c=Math.min(a.b(Dc,0),100);if(a.b(Q,0)%100>=c)return!1;c=Ze()||$e();if(void 0==c)return!1;var d=c[0];if(void 0==d||Infinity==d||isNaN(d))return!1;0<d?af(c)?b(je(c)):b(je(c.slice(0,1))):Ga(W,"load",function(){ke(a,b)},!1);return!0},me=function(a,b,c,d){var e=new yd;e.f(14,90,b.substring(0,500));e.f(14,91,a.substring(0,150));e.f(14,92,""+le(c));void 0!=d&&e.f(14,93,d.substring(0,500));e.o(14,90,c);return e},af=function(a){for(var b=1;b<a.length;b++)if(isNaN(a[b])||Infinity==
|
||||
a[b]||0>a[b])return!1;return!0},le=function(a){return isNaN(a)||0>a?0:5E3>a?10*Math.floor(a/10):5E4>a?100*Math.floor(a/100):41E5>a?1E3*Math.floor(a/1E3):41E5},je=function(a){for(var b=new yd,c=0;c<a.length;c++)b.f(14,c+1,""+le(a[c])),b.o(14,c+1,a[c]);return b},Ze=function(){var a=W.performance||W.webkitPerformance;if(a=a&&a.timing){var b=a.navigationStart;if(0==b)H(133);else return[a.loadEventStart-b,a.domainLookupEnd-a.domainLookupStart,a.connectEnd-a.connectStart,a.responseStart-a.requestStart,
|
||||
a.responseEnd-a.responseStart,a.fetchStart-b,a.domInteractive-b,a.domContentLoadedEventStart-b]}},$e=function(){if(W.top==W){var a=W.external,b=a&&a.onloadT;a&&!a.isValidLoadTime&&(b=void 0);2147483648<b&&(b=void 0);0<b&&a.setPageReadyTime();return void 0==b?void 0:[b]}};var cf=function(a){if(a.get(Sb))try{var b;a:{var c=pd(a.get(Oe)||"_ga");if(c&&!(1>c.length)){for(var d=[],e=0;e<c.length;e++){var f;var Be=c[e].split("."),k=Be.shift();if(("GA1"==k||"1"==k)&&1<Be.length){var Ja=Be.shift().split("-");1==Ja.length&&(Ja[1]="1");Ja[0]*=1;Ja[1]*=1;f={Ya:Ja,$a:Be.join(".")}}else f=void 0;f&&d.push(f)}if(1==d.length){b=d[0].$a;break a}if(0!=d.length){var t=a.get(Pe)||a.get(bb),d=bf(d,(0==t.indexOf(".")?t.substr(1):t).split(".").length,0);if(1==d.length){b=d[0].$a;break a}var Za=
|
||||
a.get(Qe)||a.get(P);(c=Za)?(1<c.length&&"/"==c.charAt(c.length-1)&&(c=c.substr(0,c.length-1)),0!=c.indexOf("/")&&(c="/"+c),Za=c):Za="/";d=bf(d,"/"==Za?1:Za.split("/").length,1);b=d[0].$a;break a}}b=void 0}if(b){var Ma=(""+b).split(".");2==Ma.length&&/[0-9.]/.test(Ma)&&(H(114),a.set(Q,Ma[0]),a.set(Vb,Ma[1]),a.set(Sb,!1))}}catch(mb){H(115)}},bf=function(a,b,c){for(var d=[],e=[],f=128,Be=0;Be<a.length;Be++){var k=a[Be];k.Ya[c]==b?d.push(k):k.Ya[c]==f?e.push(k):k.Ya[c]<f&&(e=[k],f=k.Ya[c])}return 0<d.length?
|
||||
d:e};var kf=/^gtm\d+$/,hf=function(a){var b;b=!!a.b(Cd,1);b&&(H(140),"page"!=a.get(sc)?a.set(Kc,"",!0):(b=a.c(Lc,""),b||(b=(b=a.c($a,""))&&"~0"!=b?kf.test(b)?"__utmt_"+G(a.c(Wa,"")):"__utmt_"+G(b):"__utmt"),0<pd(b).length?a.set(Kc,"",!0):(X(b,"1",a.c(P,"/"),a.c(bb,""),a.c(Wa,""),6E5),0<pd(b).length&&(a.set(Kc,Ea(),!0),a.set(Yb,1,!0),a.set(Jc,Ne()+"/r/__utm.gif?",!0)))))};var U=function(a,b,c){function d(a){return function(b){if((b=b.get(Nc)[a])&&b.length)for(var c=Te(e,a),d=0;d<b.length;d++)b[d].call(e,c)}}var e=this;this.a=new Zc;this.get=function(a){return this.a.get(a)};this.set=function(a,b,c){this.a.set(a,b,c)};this.set(Wa,b||"UA-XXXXX-X");this.set($a,a||"");this.set(Ya,c||"");this.set(ab,Math.round((new Date).getTime()/1E3));this.set(P,"/");this.set(cb,63072E6);this.set(eb,15768E6);this.set(db,18E5);this.set(fb,!1);this.set(yb,50);this.set(gb,!1);this.set(hb,
|
||||
!0);this.set(ib,!0);this.set(jb,!0);this.set(kb,!0);this.set(lb,!0);this.set(ob,"utm_campaign");this.set(nb,"utm_id");this.set(pb,"gclid");this.set(qb,"utm_source");this.set(rb,"utm_medium");this.set(sb,"utm_term");this.set(tb,"utm_content");this.set(ub,"utm_nooverride");this.set(vb,100);this.set(Dc,1);this.set(Ec,!1);this.set(wb,"/__utm.gif");this.set(xb,1);this.set(Cb,[]);this.set(Fb,[]);this.set(zb,Ld.slice(0));this.set(Ab,[]);this.set(Bb,[]);this.B("auto");this.set(Jb,J.referrer);Ye(this.a);this.set(Nc,
|
||||
{hit:[],load:[]});this.a.g("0",Zd);this.a.g("1",Wd);this.a.g("2",Jd);this.a.g("3",cf);this.a.g("4",Sd);this.a.g("5",Xd);this.a.g("6",Kd);this.a.g("7",d("load"));this.a.g("8",ie);this.a.v("A",kd);this.a.v("B",md);this.a.v("C",Ge);this.a.v("D",Jd);this.a.v("E",jd);this.a.v("F",Tc);this.a.v("G",ne);this.a.v("H",lf);this.a.v("I",Gd);this.a.v("J",nd);this.a.v("K",ud);this.a.v("L",Dd);this.a.v("M",l);this.a.v("N",hf);this.a.v("O",d("hit"));this.a.v("P",oe);this.a.v("Q",pe);0===this.get(ab)&&H(111);this.a.T();
|
||||
this.H=void 0};E=U.prototype;E.m=function(){var a=this.get(Db);a||(a=new yd,this.set(Db,a));return a};E.La=function(a){for(var b in a){var c=a[b];a.hasOwnProperty(b)&&this.set(b,c,!0)}};E.K=function(a){if(this.get(Ec))return!1;var b=this,c=ke(this.a,function(c){b.set(Hb,a,!0);b.ib(c)});this.set(Ec,c);return c};E.Fa=function(a){a&&Ca(a)?(H(13),this.set(Hb,a,!0)):"object"===typeof a&&null!==a&&this.La(a);this.H=a=this.get(Hb);this.a.j("page");this.K(a)};
|
||||
E.F=function(a,b,c,d,e){if(""==a||!wd(a)||""==b||!wd(b)||void 0!=c&&!wd(c)||void 0!=d&&!xd(d))return!1;this.set(wc,a,!0);this.set(xc,b,!0);this.set(yc,c,!0);this.set(zc,d,!0);this.set(vc,!!e,!0);this.a.j("event");return!0};E.Ha=function(a,b,c,d,e){var f=this.a.b(Dc,0);1*e===e&&(f=e);if(this.a.b(Q,0)%100>=f)return!1;c=1*(""+c);if(""==a||!wd(a)||""==b||!wd(b)||!xd(c)||isNaN(c)||0>c||0>f||100<f||void 0!=d&&(""==d||!wd(d)))return!1;this.ib(me(a,b,c,d));return!0};
|
||||
E.Ga=function(a,b,c,d){if(!a||!b)return!1;this.set(Ac,a,!0);this.set(Bc,b,!0);this.set(Cc,c||J.location.href,!0);d&&this.set(Hb,d,!0);this.a.j("social");return!0};E.Ea=function(){this.set(Dc,10);this.K(this.H)};E.Ia=function(){this.a.j("trans")};E.ib=function(a){this.set(Eb,a,!0);this.a.j("event")};E.ia=function(a){this.initData();var b=this;return{_trackEvent:function(c,d,e){H(91);b.F(a,c,d,e)}}};E.ma=function(a){return this.get(a)};
|
||||
E.xa=function(a,b){if(a)if(Ca(a))this.set(a,b);else if("object"==typeof a)for(var c in a)a.hasOwnProperty(c)&&this.set(c,a[c])};E.addEventListener=function(a,b){var c=this.get(Nc)[a];c&&c.push(b)};E.removeEventListener=function(a,b){for(var c=this.get(Nc)[a],d=0;c&&d<c.length;d++)if(c[d]==b){c.splice(d,1);break}};E.qa=function(){return"5.6.7"};E.B=function(a){this.get(hb);a="auto"==a?Ka(J.domain):a&&"-"!=a&&"none"!=a?a.toLowerCase():"";this.set(bb,a)};E.va=function(a){this.set(hb,!!a)};
|
||||
E.na=function(a,b){return ce(this.a,a,b)};E.link=function(a,b){if(this.a.get(fb)&&a){var c=ce(this.a,a,b);J.location.href=c}};E.ua=function(a,b){this.a.get(fb)&&a&&a.action&&(a.action=ce(this.a,a.action,b))};
|
||||
E.za=function(){this.initData();var a=this.a,b=J.getElementById?J.getElementById("utmtrans"):J.utmform&&J.utmform.utmtrans?J.utmform.utmtrans:null;if(b&&b.value){a.set(Cb,[]);for(var b=b.value.split("UTM:"),c=0;c<b.length;c++){b[c]=Da(b[c]);for(var d=b[c].split(de),e=0;e<d.length;e++)d[e]=Da(d[e]);"T"==d[0]?fe(a,d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8]):"I"==d[0]&&ge(a,d[1],d[2],d[3],d[4],d[5],d[6])}}};E.$=function(a,b,c,d,e,f,Be,k){return fe(this.a,a,b,c,d,e,f,Be,k)};
|
||||
E.Y=function(a,b,c,d,e,f){return ge(this.a,a,b,c,d,e,f)};E.Aa=function(a){de=a||"|"};E.ea=function(){this.set(Cb,[])};E.wa=function(a,b,c,d){var e=this.a;if(0>=a||a>e.get(yb))a=!1;else if(!b||!c||128<b.length+c.length)a=!1;else{1!=d&&2!=d&&(d=3);var f={};f.name=b;f.value=c;f.scope=d;e.get(Fb)[a]=f;a=!0}a&&this.a.gb();return a};E.ka=function(a){this.a.get(Fb)[a]=void 0;this.a.gb()};E.ra=function(a){return(a=this.a.get(Fb)[a])&&1==a.scope?a.value:void 0};
|
||||
E.Ca=function(a,b,c){12==a&&1==b?this.set(pf,c):this.m().f(a,b,c)};E.Da=function(a,b,c){this.m().o(a,b,c)};E.sa=function(a,b){return this.m().getKey(a,b)};E.ta=function(a,b){return this.m().N(a,b)};E.fa=function(a){this.m().L(a)};E.ga=function(a){this.m().M(a)};E.ja=function(){return new yd};E.W=function(a){a&&this.get(Ab).push(a.toLowerCase())};E.ba=function(){this.set(Ab,[])};E.X=function(a){a&&this.get(Bb).push(a.toLowerCase())};E.ca=function(){this.set(Bb,[])};
|
||||
E.Z=function(a,b,c,d,e){if(a&&b){a=[a,b.toLowerCase()].join(":");if(d||e)a=[a,d,e].join(":");d=this.get(zb);d.splice(c?0:d.length,0,a)}};E.da=function(){this.set(zb,[])};E.ha=function(a){this.a.load();var b=this.get(P),c=be(this.a);this.set(P,a);this.a.gb();ae(this.a,c);this.set(P,b)};E.ya=function(a,b){if(0<a&&5>=a&&Ca(b)&&""!=b){var c=this.get(Fc)||[];c[a]=b;this.set(Fc,c)}};E.V=function(a){a=""+a;if(a.match(/^[A-Za-z0-9]{1,5}$/)){var b=this.get(Ic)||[];b.push(a);this.set(Ic,b)}};E.initData=function(){this.a.load()};
|
||||
E.Ba=function(a){a&&""!=a&&(this.set(Tb,a),this.a.j("var"))};var ne=function(a){"trans"!==a.get(sc)&&500<=a.b(cc,0)&&a.stopPropagation();if("event"===a.get(sc)){var b=(new Date).getTime(),c=a.b(dc,0),d=a.b(Zb,0),c=Math.floor((b-(c!=d?c:1E3*c))/1E3*1);0<c&&(a.set(dc,b),a.set(R,Math.min(10,a.b(R,0)+c)));0>=a.b(R,0)&&a.stopPropagation()}},pe=function(a){"event"===a.get(sc)&&a.set(R,Math.max(0,a.b(R,10)-1))};var qe=function(){var a=[];this.add=function(b,c,d){d&&(c=G(""+c));a.push(b+"="+c)};this.toString=function(){return a.join("&")}},re=function(a,b){(b||2!=a.get(xb))&&a.Za(cc)},se=function(a,b){b.add("utmwv","5.6.7");b.add("utms",a.get(cc));b.add("utmn",Ea());var c=J.location.hostname;F(c)||b.add("utmhn",c,!0);c=a.get(vb);100!=c&&b.add("utmsp",c,!0)},te=function(a,b){b.add("utmht",(new Date).getTime());b.add("utmac",Da(a.get(Wa)));a.get(Oc)&&b.add("utmxkey",a.get(Oc),!0);a.get(vc)&&b.add("utmni",1);
|
||||
a.get(of)&&b.add("utmgtm",a.get(of),!0);var c=a.get(Ic);c&&0<c.length&&b.add("utmdid",c.join("."));ff(a,b);!1!==a.get(Xa)&&(a.get(Xa)||M.w)&&b.add("aip",1);void 0!==a.get(Kc)&&b.add("utmjid",a.c(Kc,""),!0);a.b(Yb,0)&&b.add("utmredir",a.b(Yb,0),!0);M.bb||(M.bb=a.get(Wa));(1<M.ab()||M.bb!=a.get(Wa))&&b.add("utmmt",1);b.add("utmu",od.encode())},ue=function(a,b){for(var c=a.get(Fc)||[],d=[],e=1;e<c.length;e++)c[e]&&d.push(e+":"+G(c[e].replace(/%/g,"%25").replace(/:/g,"%3A").replace(/,/g,"%2C")));d.length&&
|
||||
b.add("utmpg",d.join(","))},ff=function(a,b){function c(a,b){b&&d.push(a+"="+b+";")}var d=[];c("__utma",cd(a));c("__utmz",hd(a,!1));c("__utmv",fd(a,!0));c("__utmx",be(a));b.add("utmcc",d.join("+"),!0)},ve=function(a,b){a.get(ib)&&(b.add("utmcs",a.get(Qb),!0),b.add("utmsr",a.get(Lb)),a.get(Rb)&&b.add("utmvp",a.get(Rb)),b.add("utmsc",a.get(Mb)),b.add("utmul",a.get(Pb)),b.add("utmje",a.get(Nb)),b.add("utmfl",a.get(Ob),!0))},we=function(a,b){a.get(lb)&&a.get(Ib)&&b.add("utmdt",a.get(Ib),!0);b.add("utmhid",
|
||||
a.get(Kb));b.add("utmr",Pa(a.get(Jb),a.get(P)),!0);b.add("utmp",G(a.get(Hb),!0),!0)},xe=function(a,b){for(var c=a.get(Db),d=a.get(Eb),e=a.get(Fb)||[],f=0;f<e.length;f++){var Be=e[f];Be&&(c||(c=new yd),c.f(8,f,Be.name),c.f(9,f,Be.value),3!=Be.scope&&c.f(11,f,""+Be.scope))}F(a.get(wc))||F(a.get(xc),!0)||(c||(c=new yd),c.f(5,1,a.get(wc)),c.f(5,2,a.get(xc)),e=a.get(yc),void 0!=e&&c.f(5,3,e),e=a.get(zc),void 0!=e&&c.o(5,1,e));F(a.get(pf))||(c||(c=new yd),c.f(12,1,a.get(pf)));c?b.add("utme",c.Qa(d),!0):
|
||||
d&&b.add("utme",d.A(),!0)},ye=function(a,b,c){var d=new qe;re(a,c);se(a,d);d.add("utmt","tran");d.add("utmtid",b.id_,!0);d.add("utmtst",b.affiliation_,!0);d.add("utmtto",b.total_,!0);d.add("utmttx",b.tax_,!0);d.add("utmtsp",b.shipping_,!0);d.add("utmtci",b.city_,!0);d.add("utmtrg",b.state_,!0);d.add("utmtco",b.country_,!0);xe(a,d);ve(a,d);we(a,d);(b=a.get(Gb))&&d.add("utmcu",b,!0);c||(ue(a,d),te(a,d));return d.toString()},ze=function(a,b,c){var d=new qe;re(a,c);se(a,d);d.add("utmt","item");d.add("utmtid",
|
||||
b.transId_,!0);d.add("utmipc",b.sku_,!0);d.add("utmipn",b.name_,!0);d.add("utmiva",b.category_,!0);d.add("utmipr",b.price_,!0);d.add("utmiqt",b.quantity_,!0);xe(a,d);ve(a,d);we(a,d);(b=a.get(Gb))&&d.add("utmcu",b,!0);c||(ue(a,d),te(a,d));return d.toString()},Ae=function(a,b){var c=a.get(sc);if("page"==c)c=new qe,re(a,b),se(a,c),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)),c=[c.toString()];else if("event"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","event"),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)),
|
||||
c=[c.toString()];else if("var"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","var"),!b&&te(a,c),c=[c.toString()];else if("trans"==c)for(var c=[],d=a.get(Cb),e=0;e<d.length;++e){c.push(ye(a,d[e],b));for(var f=d[e].items_,Be=0;Be<f.length;++Be)c.push(ze(a,f[Be],b))}else"social"==c?b?c=[]:(c=new qe,re(a,b),se(a,c),c.add("utmt","social"),c.add("utmsn",a.get(Ac),!0),c.add("utmsa",a.get(Bc),!0),c.add("utmsid",a.get(Cc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c.toString()]):"feedback"==c?b?c=[]:(c=new qe,
|
||||
re(a,b),se(a,c),c.add("utmt","feedback"),c.add("utmfbid",a.get(Gc),!0),c.add("utmfbpr",a.get(Hc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c.toString()]):c=[];return c},oe=function(a){var b,c=a.get(xb),d=a.get(uc),e=d&&d.Ua,f=0;if(0==c||2==c){var Be=a.get(wb)+"?";b=Ae(a,!0);for(var k=0,Ja=b.length;k<Ja;k++)Sa(b[k],e,Be,!0),f++}if(1==c||2==c)for(b=Ae(a),a=a.c(Jc,""),k=0,Ja=b.length;k<Ja;k++)try{Sa(b[k],e,a),f++}catch(t){t&&Ra(t.name,void 0,t.message)}d&&(d.fb=f)};var Ne=function(){return"https:"==J.location.protocol||M.G?"https://ssl.google-analytics.com":"http://www.google-analytics.com"},Ce=function(a){this.name="len";this.message=a+"-8192"},De=function(a){this.name="ff2post";this.message=a+"-2036"},Sa=function(a,b,c,d){b=b||Fa;if(d||2036>=a.length)gf(a,b,c);else if(8192>=a.length){if(0<=W.navigator.userAgent.indexOf("Firefox")&&![].reduce)throw new De(a.length);df(a,b)||ef(a,b)||Ee(a,b)||b()}else throw new Ce(a.length);},gf=function(a,b,c){c=c||Ne()+"/__utm.gif?";
|
||||
var d=new Image(1,1);d.src=c+a;d.onload=function(){d.onload=null;d.onerror=null;b()};d.onerror=function(){d.onload=null;d.onerror=null;b()}},ef=function(a,b){if(0!=Ne().indexOf(J.location.protocol))return!1;var c;c=W.XDomainRequest;if(!c)return!1;c=new c;c.open("POST",Ne()+"/p/__utm.gif");c.onerror=function(){b()};c.onload=b;c.send(a);return!0},df=function(a,b){var c=W.XMLHttpRequest;if(!c)return!1;var d=new c;if(!("withCredentials"in d))return!1;d.open("POST",Ne()+"/p/__utm.gif",!0);d.withCredentials=
|
||||
!0;d.setRequestHeader("Content-Type","text/plain");d.onreadystatechange=function(){4==d.readyState&&(b(),d=null)};d.send(a);return!0},Ee=function(a,b){if(!J.body)return We(function(){Ee(a,b)},100),!0;a=encodeURIComponent(a);try{var c=J.createElement('<iframe name="'+a+'"></iframe>')}catch(d){c=J.createElement("iframe"),c.name=a}c.height="0";c.width="0";c.style.display="none";c.style.visibility="hidden";var e=Ne()+"/u/post_iframe.html";Ga(W,"beforeunload",function(){c.src="";c.parentNode&&c.parentNode.removeChild(c)});
|
||||
setTimeout(b,1E3);J.body.appendChild(c);c.src=e;return!0};var qf=function(){this.G=this.w=!1;0==Ea()%1E4&&(H(142),this.G=!0);this.C={};this.D=[];this.U=0;this.S=[["www.google-analytics.com","","/plugins/"]];this._gasoCPath=this._gasoDomain=this.bb=void 0;Re();Se()};E=qf.prototype;E.oa=function(a,b){return this.hb(a,void 0,b)};E.hb=function(a,b,c){b&&H(23);c&&H(67);void 0==b&&(b="~"+M.U++);a=new U(b,a,c);M.C[b]=a;M.D.push(a);return a};E.u=function(a){a=a||"";return M.C[a]||M.hb(void 0,a)};E.pa=function(){return M.D.slice(0)};E.ab=function(){return M.D.length};
|
||||
E.aa=function(){this.w=!0};E.la=function(){this.G=!0};var Fe=function(a){if("prerender"==J.visibilityState)return!1;a();return!0};var M=new qf;var Ha=W._gat;Ha&&Ba(Ha._getTracker)?M=Ha:W._gat=M;var Z=new Y;(function(a){if(!Fe(a)){H(123);var b=!1,c=function(){if(!b&&Fe(a)){b=!0;var d=J,e=c;d.removeEventListener?d.removeEventListener("visibilitychange",e,!1):d.detachEvent&&d.detachEvent("onvisibilitychange",e)}};Ga(J,"visibilitychange",c)}})(function(){var a=W._gaq,b=!1;if(a&&Ba(a.push)&&(b="[object Array]"==Object.prototype.toString.call(Object(a)),!b)){Z=a;return}W._gaq=Z;b&&Z.push.apply(Z,a)});function Yc(a){var b=1,c=0,d;if(a)for(b=0,d=a.length-1;0<=d;d--)c=a.charCodeAt(d),b=(b<<6&268435455)+c+(c<<14),c=b&266338304,b=0!=c?b^c>>21:b;return b};})();
|
||||
@@ -0,0 +1,21 @@
|
||||
if(!window.criteo_q||window.criteo_q instanceof Array){var oldQueue=window.criteo_q||[];window.criteo_q=function(){var e={bodyReady:!1,domReady:!1,queue:[],actions:[],disingScheduled:[],accounts:[],acid:null,axid:null,pxsig:null,ccp:null},d={tagVersion:"4.1.0",handlerUrlPrefix:("https:"===document.location.protocol?"https://sslwidget.":"http://widget.")+"criteo.com/event",handlerResponseType:"single",responseType:"js",handlerParams:{v:"4.1.0"},extraData:[],customerInfo:[],manualDising:!1,manualFlush:!1,
|
||||
disOnce:!1,partialDis:!1,eventMap:{applaunched:"al",viewitem:"vp",viewhome:"vh",viewlist:"vl",viewbasket:"vb",viewsearch:"vs",tracktransaction:"vc",calldising:"dis",setdata:"exd",setemail:"ce"},propMap:{event:"e",account:"a",currency:"c",product:"p",item:"p","item.id":"i","item.price":"pr","item.quantity":"q","product.id":"i","product.price":"pr","product.quantity":"q",data:"d",keywords:"kw",checkin_date:"din",checkout_date:"dout",deduplication:"dd",attribution:"at","attribution.channel":"ac","attribution.value":"v",
|
||||
user_segment:"si",new_customer:"nc",customer_id:"ci",email:"m",hash_method:"h",transaction_value:"tv",responseType:"rt"},setters:{seturl:{cfg:"handlerUrlPrefix",evt:"url"},setaccount:{cfg:"account",evt:"account"},setcalltype:{cfg:"handlerResponseType",evt:"type"},setresponsetype:{cfg:"responseType",evt:"type"},oninitialized:{cfg:"onInitialized",evt:"callback"},ondomready:{cfg:"onDOMReady",evt:"callback"},beforeappend:{cfg:"beforeAppend",evt:"callback"},aftereval:{cfg:"afterEval",evt:"callback"},onflush:{cfg:"onFlush",
|
||||
evt:"callback"}},flags:{disonce:"disOnce",manualdising:"manualDising",manualflush:"manualFlush",nopartialflush:"noPartialFlush",disonpartialflush:"partialDis"}},l=function(a){var b;return 0<document.cookie.length&&(b=document.cookie.indexOf(a+"="),-1!=b)?(b=b+a.length+1,a=document.cookie.indexOf(";",b),-1==a&&(a=document.cookie.length),unescape(document.cookie.substring(b,a))):null};(function(a){var b=l("criteo_acid"),c=l("cto_axid"),d=l("cto_pxsig"),e=l("cto_optout");null===b&&null===c&&null===e&&
|
||||
null===d?(b=new Date,b.setTime(b.getTime()+1E4),b="expires="+b.toUTCString(),document.cookie=["criteo_write_test=ChUIBBINbXlHb29nbGVSdGJJZBgBIAE","path=/",b].join("; "),b=l("criteo_write_test"),a.canWriteCookie=null!==b,document.cookie="criteo_write_test=; path=/; expires=Thu, 01 Jan 1970 00:00:00 UTC"):(a.acid=b,a.axid=null!==e?"optout":c,a.pxsig=d,a.canWriteCookie=!0)})(e);(function(a){var b=l("criteo_cookie_perm");null!==b&&(a.ccp=b)})(e);var s=function(){for(var a=0;a<arguments.length;++a)e.queue.push(arguments[a]);
|
||||
q()},q=function(){for(var a=[],b=e.queue,c=0;c<b.length;++c){var g=b[c];if(g instanceof Array)b.splice.apply(b,[c+1,0].concat(g));else if(g instanceof Function)b.splice(c+1,0,g());else if(g&&"[object Object]"===g.toString())switch(m(g,c,b,a)){case 0:a.push(g);break;case -1:a=a.concat(b.slice(c)),c=b.length}}d.afterEval instanceof Function&&(a=d.afterEval(b,a,e,d));e.queue=a||[];!d.manualFlush&&(!d.noPartialFlush||0===e.queue.length)&&t(0!==e.queue.length)},m=function(a,b,c,g){if(!e.domReady&&a.requiresDOM&&
|
||||
"no"!==a.requiresDOM)return"blocking"===a.requiresDOM?-1:0;delete a.requiresDOM;if(!a.event)return f(a),1;a.account&&r(a.account,e.accounts);a.event=a.event.toLowerCase();switch(a.event){case "setdata":return a=f(a),d.extraData.push(a),u(e.actions,f(a)),1;case "setparameter":for(var k in a)"event"!==k.toLowerCase()&&a.hasOwnProperty(k)&&(d.handlerParams[k]=a[k]);return 1;case "calldising":a.hasOwnProperty("account")||(a.account=e.accounts);b=d.handlerResponseType;a.hasOwnProperty("type")&&(b=a.type,
|
||||
delete a.type);r(a.account,e.disingScheduled);"sequential"===b&&(a.dc=!0);break;case "setcustomerid":return a.event="setdata",a.customer_id=a.id,delete a.id,m(a);case "setemail":case "sethashedemail":case "ceh":a.event="setemail";if(a.hasOwnProperty("email")){a.email instanceof Array||(a.email=[a.email]);b=a.email;c=[];for(g=0;g<b.length;g++)void 0!==b[g]&&null!==b[g]&&c.push(String(b[g]));a.email=c}b=f(a);d.customerInfo.push(b);v(e.actions,f(a));return 1;case "setsitetype":b="d";if("mobile"===a.type||
|
||||
"m"===a.type)b="m";if("tablet"===a.type||"t"===a.type)b="t";a.event="setdata";delete a.type;a.site_type=b;return m(a);case "appendtag":e.bodyReady&&!d.container&&((b=document.body)?(c=document.createElement("div"),c.setAttribute("id","criteo-tags-div"),c.style.display="none",b.appendChild(c),b=c):b=void 0,d.container=b);a.url&&(a.isImgUrl?(b=document.createElement("img"),b.setAttribute("style","display:none;"),b.setAttribute("width","1"),b.setAttribute("height","1")):(b=document.createElement("script"),
|
||||
b.setAttribute("async","true"),b.setAttribute("type","text/javascript")),b.setAttribute("src",a.url),a.element=b);d.beforeAppend instanceof Function&&(a.element=d.beforeAppend(a.element,e,d));f(a);if(a.element&&(a.element.tagName||a.isImgUrl))if(!d.container&&("script"===a.element.tagName.toLowerCase()||a.isImgUrl))b=document.getElementsByTagName("script")[0],a.element.setAttribute("data-owner","criteo-tag"),b.parentNode.insertBefore(a.element,b);else if(d.container)d.container.appendChild(a.element);
|
||||
else return 0;return 1;case "gettagstate":return a.callback instanceof Function?a.callback(e,d):1;case "flush":case "flushevents":return t(b!==c.length-1||0!==g.length),1}if(b=d.setters[a.event])return d[b.cfg]=a[b.evt],1;if(b=d.flags[a.event])return d[b]=!0,1;e.actions.push(f(a));return 1},t=function(a){d.onFlush instanceof Function&&(e.actions=d.onFlush(e.actions,e,d));if(0!==e.actions.length){for(var b=0;b<d.extraData.length;++b)u(e.actions,d.extraData[b]);for(b=0;b<d.customerInfo.length;++b)v(e.actions,
|
||||
d.customerInfo[b]);if(!d.manualDising&&(!a||d.partialDis)){a=[];for(b=0;b<e.accounts.length;++b)p(e.disingScheduled,e.accounts[b])||a.push(e.accounts[b]);0<a.length&&m({event:"callDising",account:a})}a=e.actions;b=[];1===e.accounts.length&&(d.account=e.accounts[0]);d.account&&b.push("a="+h(d.account,[]));"js"!==d.responseType&&b.push("rt="+h(d.responseType,[]));if(d.handlerParams){var c=decodeURIComponent(h(d.handlerParams,[]));c&&b.push(c)}for(c=0;c<a.length;++c)a[c].account&&n(d.account,a[c].account)&&
|
||||
delete a[c].account,b.push("p"+c+"="+h(a[c],[]));null!==e.acid&&b.push("acid="+e.acid);null!==e.axid&&b.push("axid="+e.axid);null!==e.pxsig&&b.push("pxsig="+e.pxsig);e.canWriteCookie&&b.push("adce=1");null!==e.ccp&&b.push("ccp="+e.ccp);a=b.join("&");a={event:"appendTag",url:d.handlerUrlPrefix+"?"+a,isImgUrl:"gif"===d.responseType};e.actions=[];m(a);d.disOnce||(e.disingScheduled=[])}},u=function(a,b){for(var c=0;c<a.length;++c){var d=a[c];if(d.event===b.event&&n(b.account,d.account)){for(var e in b)b.hasOwnProperty(e)&&
|
||||
"account"!==e&&(d[e]=b[e]);return}}a.push(b)},v=function(a,b){for(var c=0;c<a.length;++c){var d=a[c];if(d.event===b.event&&n(b.account,d.account)&&("hash_method"in b?b.hash_method:"")===("hash_method"in d?d.hash_method:"")){if(b.hasOwnProperty("email")){for(var c=d,d=d.email,e=b.email,f=[],h=0;h<e.length;++h)p(d,e[h])||f.push(e[h]);d=d.concat(f);c.email=d}return}}a.push(b)},f=function(a){var b=a;if(a instanceof Function)return b=a(),b instanceof Function?b:f(b);if(a instanceof Array)for(var b=[],
|
||||
c=0;c<a.length;++c)b[c]=f(a[c]);else if(a&&"[object Object]"===a.toString())for(c in b={},a)a.hasOwnProperty(c)&&(b[c]=f(a[c]));return b},y=function(a,b){var c=b.join(".");return d.propMap[c]?d.propMap[c]:a},n=function(a,b){if(!(a instanceof Array))return n([a],b);if(!(b instanceof Array))return n(a,[b]);if(a.length!==b.length)return!1;for(var c=0;c<a.length;++c)if(!p(b,a[c]))return!1;return!0},h=function(a,b){var c="";if(a instanceof Function)c=h(a(),b);else if(a instanceof Array){for(var e=[],k=
|
||||
0;k<a.length;++k)e[k]=h(a[k],b);c+="["+e.join(",")+"]"}else if(a&&"[object Object]"===a.toString()){e=[];for(k in a)if(a.hasOwnProperty(k)){var f=b.concat([k]);e.push(y(k,f)+"="+h(a[k],f))}c+=e.join("&")}else c=1===b.length&&"event"===b[0]?c+(d.eventMap[a.toLowerCase()]?d.eventMap[a.toLowerCase()]:a):c+a;return encodeURIComponent(c)},r=function(a,b){if(a instanceof Array)for(var c=0;c<a.length;++c)r(a[c],b);else p(b,a)||b.push(a)},p=function(a,b){for(var c=0;c<a.length;++c)if(a[c]===b)return!0;return!1},
|
||||
z=function(a){if(a){var b=a.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("src",a.location.protocol+"//static.criteo.net/js/ld/ld-tag-debug.4.1.0.js");a=a.getElementsByTagName("script")[0];a.parentNode.insertBefore(b,a)}};(function(a){(function c(){document.body?setTimeout(a,0):setTimeout(c,10)})()})(function(){e.bodyReady=d.onInitialized instanceof Function?d.onInitialized(e,d):!0;q()});(function(a,b){if("complete"===a.readyState)b();else if(a.addEventListener)a.addEventListener("DOMContentLoaded",
|
||||
b,!1),window.addEventListener("load",b,!1);else{a.attachEvent("onreadystatechange",b);window.attachEvent("onload",b);var c=!1;try{c=null===window.frameElement&&document.documentElement}catch(d){}if(c&&c.doScroll)(function A(){if(c){try{c.doScroll("left")}catch(a){return setTimeout(A,50)}b()}})();else{var e=!1,f=a.onload,h=a.onreadystatechange;a.onload=a.onreadystatechange=function(){h instanceof Function&&h();if(!e&&(!a.readyState||"loaded"===a.readyState||"complete"===a.readyState))f instanceof Function&&
|
||||
f(),e=!0,b()}}}})(document,function(){e.domReady=d.onDOMReady instanceof Function?d.onDOMReady(e,d):!0;q()});(function(a){try{if(a&&a.referrer){var b=a.createElement("a");b.href=a.referrer;b.hostname!==a.location.hostname&&d.extraData.push({event:"setData",ref:b.protocol+"//"+b.hostname})}}catch(c){}})(document);(function(a,b){if(a&&b){var c=/^\#(enable|disable)-criteo-tag-debug-mode(\=(\d+))?$/.exec(b);if(c&&4==c.length){var d="enable"==c[1],e=c[3],c="criteoTagDebugMode=";d&&(e&&!isNaN(e))&&(c+=
|
||||
parseInt(e,10));d=d?(new Date).getTime()+864E5:0;d="expires="+(new Date(d)).toUTCString();document.cookie=[c,"path=/",d].join("; ");window.location.href=window.location.href.substr(0,window.location.href.indexOf("#"))}}})(document,window.location.hash);var w;w=document?"function"!=typeof Array.prototype.indexOf?!1:-1!==document.cookie.indexOf("criteoTagDebugMode="):!1;if(w){var x={originalPush:s,stagedPushes:[],stagedErrors:[],push:function(){0<arguments.length&&this.stagedPushes.push(arguments)},
|
||||
pushError:function(a){this.stagedErrors.push(a)}};window.onerror=function(a){return function(b,c,d,e){x.pushError({message:b,url:c,lineNumber:d,column:e});return a&&"function"===typeof a?a.apply(this,arguments):!1}}(window.onerror);z(document);return x}return{push:s}}();window.criteo_q.push.apply(window.criteo_q,oldQueue)};
|
||||
@@ -0,0 +1,69 @@
|
||||
.highlight .hll { background-color: #ffffcc }
|
||||
.highlight .c { color: #B729D9; font-style: italic } /* Comment */
|
||||
.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
|
||||
.highlight .g { color: #ffffff } /* Generic */
|
||||
.highlight .k { color: #FF8400 } /* Keyword */
|
||||
.highlight .l { color: #ffffff } /* Literal */
|
||||
.highlight .n { color: #ffffff } /* Name */
|
||||
.highlight .o { color: #E0882F } /* Operator */
|
||||
.highlight .x { color: #ffffff } /* Other */
|
||||
.highlight .p { color: #999999 } /* Punctuation */
|
||||
.highlight .cm { color: #B729D9; font-style: italic } /* Comment.Multiline */
|
||||
.highlight .cp { color: #a0a0a0 } /* Comment.Preproc */
|
||||
.highlight .c1 { color: #B729D9; font-style: italic } /* Comment.Single */
|
||||
.highlight .cs { color: #B729D9; font-style: italic } /* Comment.Special */
|
||||
.highlight .gd { color: #a40000 } /* Generic.Deleted */
|
||||
.highlight .ge { color: #ffffff; font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #ef2929 } /* Generic.Error */
|
||||
.highlight .gh { color: #000080 } /* Generic.Heading */
|
||||
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
||||
.highlight .go { color: #808080 } /* Generic.Output */
|
||||
.highlight .gp { color: #745334 } /* Generic.Prompt */
|
||||
.highlight .gs { color: #ffffff; font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||
.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
|
||||
.highlight .kc { color: #FF8400 } /* Keyword.Constant */
|
||||
.highlight .kd { color: #FF8400 } /* Keyword.Declaration */
|
||||
.highlight .kn { color: #FF8400 } /* Keyword.Namespace */
|
||||
.highlight .kp { color: #FF8400 } /* Keyword.Pseudo */
|
||||
.highlight .kr { color: #FF8400 } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #FF8400 } /* Keyword.Type */
|
||||
.highlight .ld { color: #ffffff } /* Literal.Date */
|
||||
.highlight .m { color: #1299DA } /* Literal.Number */
|
||||
.highlight .s { color: #56DB3A } /* Literal.String */
|
||||
.highlight .na { color: #ffffff } /* Name.Attribute */
|
||||
.highlight .nb { color: #ffffff } /* Name.Builtin */
|
||||
.highlight .nc { color: #ffffff } /* Name.Class */
|
||||
.highlight .no { color: #ffffff } /* Name.Constant */
|
||||
.highlight .nd { color: #808080 } /* Name.Decorator */
|
||||
.highlight .ni { color: #ce5c00 } /* Name.Entity */
|
||||
.highlight .ne { color: #cc0000 } /* Name.Exception */
|
||||
.highlight .nf { color: #ffffff } /* Name.Function */
|
||||
.highlight .nl { color: #f57900 } /* Name.Label */
|
||||
.highlight .nn { color: #ffffff } /* Name.Namespace */
|
||||
.highlight .nx { color: #ffffff } /* Name.Other */
|
||||
.highlight .py { color: #ffffff } /* Name.Property */
|
||||
.highlight .nt { color: #cccccc } /* Name.Tag */
|
||||
.highlight .nv { color: #ffffff } /* Name.Variable */
|
||||
.highlight .ow { color: #E0882F } /* Operator.Word */
|
||||
.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
|
||||
.highlight .mf { color: #1299DA } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #1299DA } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #1299DA } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #1299DA } /* Literal.Number.Oct */
|
||||
.highlight .sb { color: #56DB3A } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #56DB3A } /* Literal.String.Char */
|
||||
.highlight .sd { color: #B729D9; font-style: italic } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #56DB3A } /* Literal.String.Double */
|
||||
.highlight .se { color: #56DB3A } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #56DB3A } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #56DB3A } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #56DB3A } /* Literal.String.Other */
|
||||
.highlight .sr { color: #56DB3A } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #56DB3A } /* Literal.String.Single */
|
||||
.highlight .ss { color: #56DB3A } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
|
||||
.highlight .vc { color: #ffffff } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #ffffff } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #ffffff } /* Name.Variable.Instance */
|
||||
.highlight .il { color: #1299DA } /* Literal.Number.Integer.Long */
|
||||
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
|
||||
Code licensed under the BSD License:
|
||||
http://developer.yahoo.net/yui/license.txt
|
||||
version: 2.7.0
|
||||
*/
|
||||
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1 @@
|
||||
fbq.registerPlugin("1570554156513134", {__fbEventsPlugin: 1, plugin: function(fbq, instance) { if (!instance.pixelsByID.hasOwnProperty("1570554156513134")) { fbq.init("1570554156513134"); }instance.configLoaded("1570554156513134"); }});
|
||||
@@ -0,0 +1 @@
|
||||
// Excluding messages
|
||||
@@ -0,0 +1 @@
|
||||
addthis.cbs.oln9_15841865294629110({"bt2":"590c35b5001us0002","loc":"MDAwMDBFVUZSMDAyMjg5MTgyMzAwMDAwMDAwVg==","pixels":[{"url":"https://pm.w55c.net/ping_match.gif?st=addthis&rurl=https%3A%2F%2Fsu.addthis.com%2Fred%2Fusync%3Fpid%3D5%26puid%3D_wfivefivec_%26ssrc%3D1","id":5846,"isHttp":false}]});
|
||||
@@ -0,0 +1 @@
|
||||
NREUM.setToken({'stn':0,'err':0,'ins':0,'cap':0,'spa':0})
|
||||
@@ -0,0 +1 @@
|
||||
_ate.track.config_resp({"pc":"shin","tool-config":{"_default":{"widgets":{"11ia":{"widgetId":"11ia","shareCountThreshold":0,"services":"facebook,twitter,google_plusone_share","numPreferredServices":5,"borderRadius":"0%","size":"32px","thirdPartyButtons":false,"elements":".addthis_sharing_toolbox","responsive":"0px","style":"fixed","id":"shin","hideLabel":true}}}},"subscription":{"active":true,"edition":"BASIC","tier":"basic","reducedBranding":false,"insightsEnabled":false},"customMessageTemplates":[],"pro-config":{"_default":{"widgets":{"shin":{"widgetId":"11ia","shareCountThreshold":0,"services":"facebook,twitter,google_plusone_share","numPreferredServices":5,"borderRadius":"0%","size":"32px","thirdPartyButtons":false,"elements":".addthis_sharing_toolbox","responsive":"0px","style":"fixed","id":"shin","hideLabel":true}}}}});
|
||||
@@ -0,0 +1,46 @@
|
||||
(function(){var $c=function(a){this.w=a||[]};$c.prototype.set=function(a){this.w[a]=!0};$c.prototype.encode=function(){for(var a=[],b=0;b<this.w.length;b++)this.w[b]&&(a[Math.floor(b/6)]^=1<<b%6);for(b=0;b<a.length;b++)a[b]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(a[b]||0);return a.join("")+"~"};var vd=new $c;function J(a){vd.set(a)}var Nd=function(a,b){var c=new $c(Dd(a));c.set(b);a.set(Gd,c.w)},Td=function(a){a=Dd(a);a=new $c(a);for(var b=vd.w.slice(),c=0;c<a.w.length;c++)b[c]=b[c]||a.w[c];return(new $c(b)).encode()},Dd=function(a){a=a.get(Gd);ka(a)||(a=[]);return a};var ea=function(a){return"function"==typeof a},ka=function(a){return"[object Array]"==Object.prototype.toString.call(Object(a))},qa=function(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")},D=function(a,b){return 0==a.indexOf(b)},sa=function(a){return a?a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,""):""},ga=function(){for(var a=O.navigator.userAgent+(M.cookie?M.cookie:"")+(M.referrer?M.referrer:""),b=a.length,c=O.history.length;0<c;)a+=c--^b++;return[hd()^La(a)&2147483647,Math.round((new Date).getTime()/
|
||||
1E3)].join(".")},ta=function(a){var b=M.createElement("img");b.width=1;b.height=1;b.src=a;return b},ua=function(){},K=function(a){if(encodeURIComponent instanceof Function)return encodeURIComponent(a);J(28);return a},L=function(a,b,c,d){try{a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)}catch(e){J(27)}},f=/^[\w\-:/.?=&%!]+$/,wa=function(a,b,c,d){a&&(c?(d="",b&&f.test(b)&&(d=' id="'+b+'"'),f.test(a)&&M.write("<script"+d+' src="'+a+'">\x3c/script>')):(c=M.createElement("script"),
|
||||
c.type="text/javascript",c.async=!0,c.src=a,d&&(c.onload=d),b&&(c.id=b),a=M.getElementsByTagName("script")[0],a.parentNode.insertBefore(c,a)))},Ud=function(){return"https:"==M.location.protocol},E=function(a,b){return(a=a.match("(?:&|#|\\?)"+K(b).replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")+"=([^&#]*)"))&&2==a.length?a[1]:""},xa=function(){var a=""+M.location.hostname;return 0==a.indexOf("www.")?a.substring(4):a},ya=function(a){var b=M.referrer;if(/^https?:\/\//i.test(b)){if(a)return b;a="//"+M.location.hostname;
|
||||
var c=b.indexOf(a);if(5==c||6==c)if(a=b.charAt(c+a.length),"/"==a||"?"==a||""==a||":"==a)return;return b}},za=function(a,b){if(1==b.length&&null!=b[0]&&"object"===typeof b[0])return b[0];for(var c={},d=Math.min(a.length+1,b.length),e=0;e<d;e++)if("object"===typeof b[e]){for(var g in b[e])b[e].hasOwnProperty(g)&&(c[g]=b[e][g]);break}else e<a.length&&(c[a[e]]=b[e]);return c};var ee=function(){this.keys=[];this.values={};this.m={}};ee.prototype.set=function(a,b,c){this.keys.push(a);c?this.m[":"+a]=b:this.values[":"+a]=b};ee.prototype.get=function(a){return this.m.hasOwnProperty(":"+a)?this.m[":"+a]:this.values[":"+a]};ee.prototype.map=function(a){for(var b=0;b<this.keys.length;b++){var c=this.keys[b],d=this.get(c);d&&a(c,d)}};var O=window,M=document;var F=window,G=function(a){var b=F._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===F["ga-disable-"+a])return!0;try{var c=F.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(d){}return!1};var Ca=function(a){var b=[],c=M.cookie.split(";");a=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var d=0;d<c.length;d++){var e=c[d].match(a);e&&b.push(e[1])}return b},zc=function(a,b,c,d,e,g){e=G(e)?!1:eb.test(M.location.hostname)||"/"==c&&vc.test(d)?!1:!0;if(!e)return!1;b&&1200<b.length&&(b=b.substring(0,1200),J(24));c=a+"="+b+"; path="+c+"; ";g&&(c+="expires="+(new Date((new Date).getTime()+g)).toGMTString()+"; ");d&&"none"!=d&&(c+="domain="+d+";");d=M.cookie;M.cookie=c;if(!(d=d!=M.cookie))a:{a=
|
||||
Ca(a);for(d=0;d<a.length;d++)if(b==a[d]){d=!0;break a}d=!1}return d},Cc=function(a){return K(a).replace(/\(/g,"%28").replace(/\)/g,"%29")},vc=/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/,eb=/(^|\.)doubleclick\.net$/i;var oc=function(){return(Ba||Ud()?"https:":"http:")+"//www.google-analytics.com"},Da=function(a){this.name="len";this.message=a+"-8192"},ba=function(a,b,c){c=c||ua;if(2036>=b.length)wc(a,b,c);else if(8192>=b.length)x(a,b,c)||wd(a,b,c)||wc(a,b,c);else throw ge("len",b.length),new Da(b.length);},wc=function(a,b,c){var d=ta(a+"?"+b);d.onload=d.onerror=function(){d.onload=null;d.onerror=null;c()}},wd=function(a,b,c){var d=O.XMLHttpRequest;if(!d)return!1;var e=new d;if(!("withCredentials"in e))return!1;
|
||||
e.open("POST",a,!0);e.withCredentials=!0;e.setRequestHeader("Content-Type","text/plain");e.onreadystatechange=function(){4==e.readyState&&(c(),e=null)};e.send(b);return!0},x=function(a,b,c){return O.navigator.sendBeacon?O.navigator.sendBeacon(a,b)?(c(),!0):!1:!1},ge=function(a,b,c){1<=100*Math.random()||G("?")||(a=["t=error","_e="+a,"_v=j53","sr=1"],b&&a.push("_f="+b),c&&a.push("_m="+K(c.substring(0,100))),a.push("aip=1"),a.push("z="+hd()),wc(oc()+"/collect",a.join("&"),ua))};var h=function(a){var b=O.gaData=O.gaData||{};return b[a]=b[a]||{}};var Ha=function(){this.M=[]};Ha.prototype.add=function(a){this.M.push(a)};Ha.prototype.D=function(a){try{for(var b=0;b<this.M.length;b++){var c=a.get(this.M[b]);c&&ea(c)&&c.call(O,a)}}catch(d){}b=a.get(Ia);b!=ua&&ea(b)&&(a.set(Ia,ua,!0),setTimeout(b,10))};function Ja(a){if(100!=a.get(Ka)&&La(P(a,Q))%1E4>=100*R(a,Ka))throw"abort";}function Ma(a){if(G(P(a,Na)))throw"abort";}function Oa(){var a=M.location.protocol;if("http:"!=a&&"https:"!=a)throw"abort";}
|
||||
function Pa(a){try{O.navigator.sendBeacon?J(42):O.XMLHttpRequest&&"withCredentials"in new O.XMLHttpRequest&&J(40)}catch(c){}a.set(ld,Td(a),!0);a.set(Ac,R(a,Ac)+1);var b=[];Qa.map(function(c,d){d.F&&(c=a.get(c),void 0!=c&&c!=d.defaultValue&&("boolean"==typeof c&&(c*=1),b.push(d.F+"="+K(""+c))))});b.push("z="+Bd());a.set(Ra,b.join("&"),!0)}
|
||||
function Sa(a){var b=P(a,gd)||oc()+"/collect",c=P(a,fa);!c&&a.get(Vd)&&(c="beacon");if(c){var d=P(a,Ra),e=a.get(Ia),e=e||ua;"image"==c?wc(b,d,e):"xhr"==c&&wd(b,d,e)||"beacon"==c&&x(b,d,e)||ba(b,d,e)}else ba(b,P(a,Ra),a.get(Ia));b=a.get(Na);b=h(b);c=b.hitcount;b.hitcount=c?c+1:1;b=a.get(Na);delete h(b).pending_experiments;a.set(Ia,ua,!0)}
|
||||
function Hc(a){(O.gaData=O.gaData||{}).expId&&a.set(Nc,(O.gaData=O.gaData||{}).expId);(O.gaData=O.gaData||{}).expVar&&a.set(Oc,(O.gaData=O.gaData||{}).expVar);var b=a.get(Na);if(b=h(b).pending_experiments){var c=[];for(d in b)b.hasOwnProperty(d)&&b[d]&&c.push(encodeURIComponent(d)+"."+encodeURIComponent(b[d]));var d=c.join("!")}else d=void 0;d&&a.set(m,d,!0)}function cd(){if(O.navigator&&"preview"==O.navigator.loadPurpose)throw"abort";}
|
||||
function yd(a){var b=O.gaDevIds;ka(b)&&0!=b.length&&a.set("&did",b.join(","),!0)}function vb(a){if(!a.get(Na))throw"abort";};var hd=function(){return Math.round(2147483647*Math.random())},Bd=function(){try{var a=new Uint32Array(1);O.crypto.getRandomValues(a);return a[0]&2147483647}catch(b){return hd()}};function Ta(a){var b=R(a,Ua);500<=b&&J(15);var c=P(a,Va);if("transaction"!=c&&"item"!=c){var c=R(a,Wa),d=(new Date).getTime(),e=R(a,Xa);0==e&&a.set(Xa,d);e=Math.round(2*(d-e)/1E3);0<e&&(c=Math.min(c+e,20),a.set(Xa,d));if(0>=c)throw"abort";a.set(Wa,--c)}a.set(Ua,++b)};var Ya=function(){this.data=new ee},Qa=new ee,Za=[];Ya.prototype.get=function(a){var b=$a(a),c=this.data.get(a);b&&void 0==c&&(c=ea(b.defaultValue)?b.defaultValue():b.defaultValue);return b&&b.Z?b.Z(this,a,c):c};var P=function(a,b){a=a.get(b);return void 0==a?"":""+a},R=function(a,b){a=a.get(b);return void 0==a||""===a?0:1*a};Ya.prototype.set=function(a,b,c){if(a)if("object"==typeof a)for(var d in a)a.hasOwnProperty(d)&&ab(this,d,a[d],c);else ab(this,a,b,c)};
|
||||
var ab=function(a,b,c,d){if(void 0!=c)switch(b){case Na:wb.test(c)}var e=$a(b);e&&e.o?e.o(a,b,c,d):a.data.set(b,c,d)},bb=function(a,b,c,d,e){this.name=a;this.F=b;this.Z=d;this.o=e;this.defaultValue=c},$a=function(a){var b=Qa.get(a);if(!b)for(var c=0;c<Za.length;c++){var d=Za[c],e=d[0].exec(a);if(e){b=d[1](e);Qa.set(b.name,b);break}}return b},yc=function(a){var b;Qa.map(function(c,d){d.F==a&&(b=d)});return b&&b.name},S=function(a,b,c,d,e){a=new bb(a,b,c,d,e);Qa.set(a.name,a);return a.name},cb=function(a,
|
||||
b){Za.push([new RegExp("^"+a+"$"),b])},T=function(a,b,c){return S(a,b,c,void 0,db)},db=function(){};var gb=qa(window.GoogleAnalyticsObject)&&sa(window.GoogleAnalyticsObject)||"ga",Ba=!1,hb=T("apiVersion","v"),ib=T("clientVersion","_v");S("anonymizeIp","aip");var jb=S("adSenseId","a"),Va=S("hitType","t"),Ia=S("hitCallback"),Ra=S("hitPayload");S("nonInteraction","ni");S("currencyCode","cu");S("dataSource","ds");var Vd=S("useBeacon",void 0,!1),fa=S("transport");S("sessionControl","sc","");S("sessionGroup","sg");S("queueTime","qt");var Ac=S("_s","_s");S("screenName","cd");
|
||||
var kb=S("location","dl",""),lb=S("referrer","dr"),mb=S("page","dp","");S("hostname","dh");var nb=S("language","ul"),ob=S("encoding","de");S("title","dt",function(){return M.title||void 0});cb("contentGroup([0-9]+)",function(a){return new bb(a[0],"cg"+a[1])});var pb=S("screenColors","sd"),qb=S("screenResolution","sr"),rb=S("viewportSize","vp"),sb=S("javaEnabled","je"),tb=S("flashVersion","fl");S("campaignId","ci");S("campaignName","cn");S("campaignSource","cs");S("campaignMedium","cm");
|
||||
S("campaignKeyword","ck");S("campaignContent","cc");var ub=S("eventCategory","ec"),xb=S("eventAction","ea"),yb=S("eventLabel","el"),zb=S("eventValue","ev"),Bb=S("socialNetwork","sn"),Cb=S("socialAction","sa"),Db=S("socialTarget","st"),Eb=S("l1","plt"),Fb=S("l2","pdt"),Gb=S("l3","dns"),Hb=S("l4","rrt"),Ib=S("l5","srt"),Jb=S("l6","tcp"),Kb=S("l7","dit"),Lb=S("l8","clt"),Mb=S("timingCategory","utc"),Nb=S("timingVar","utv"),Ob=S("timingLabel","utl"),Pb=S("timingValue","utt");S("appName","an");
|
||||
S("appVersion","av","");S("appId","aid","");S("appInstallerId","aiid","");S("exDescription","exd");S("exFatal","exf");var Nc=S("expId","xid"),Oc=S("expVar","xvar"),m=S("exp","exp"),Rc=S("_utma","_utma"),Sc=S("_utmz","_utmz"),Tc=S("_utmht","_utmht"),Ua=S("_hc",void 0,0),Xa=S("_ti",void 0,0),Wa=S("_to",void 0,20);cb("dimension([0-9]+)",function(a){return new bb(a[0],"cd"+a[1])});cb("metric([0-9]+)",function(a){return new bb(a[0],"cm"+a[1])});S("linkerParam",void 0,void 0,Bc,db);
|
||||
var ld=S("usage","_u"),Gd=S("_um");S("forceSSL",void 0,void 0,function(){return Ba},function(a,b,c){J(34);Ba=!!c});var ed=S("_j1","jid"),ia=S("_j2","gjid");cb("\\&(.*)",function(a){var b=new bb(a[0],a[1]),c=yc(a[0].substring(1));c&&(b.Z=function(a){return a.get(c)},b.o=function(a,b,g,ca){a.set(c,g,ca)},b.F=void 0);return b});
|
||||
var Qb=T("_oot"),dd=S("previewTask"),Rb=S("checkProtocolTask"),md=S("validationTask"),Sb=S("checkStorageTask"),Uc=S("historyImportTask"),Tb=S("samplerTask"),Vb=S("_rlt"),Wb=S("buildHitTask"),Xb=S("sendHitTask"),Vc=S("ceTask"),zd=S("devIdTask"),Cd=S("timingTask"),Ld=S("displayFeaturesTask"),V=T("name"),Q=T("clientId","cid"),n=T("clientIdTime"),Ad=S("userId","uid"),Na=T("trackingId","tid"),U=T("cookieName",void 0,"_ga"),W=T("cookieDomain"),Yb=T("cookiePath",void 0,"/"),Zb=T("cookieExpires",void 0,63072E3),
|
||||
$b=T("legacyCookieDomain"),Wc=T("legacyHistoryImport",void 0,!0),ac=T("storage",void 0,"cookie"),bc=T("allowLinker",void 0,!1),cc=T("allowAnchor",void 0,!0),Ka=T("sampleRate","sf",100),dc=T("siteSpeedSampleRate",void 0,1),ec=T("alwaysSendReferrer",void 0,!1),I=T("_gid","_gid"),ja=T("_ge"),la=T("_gcn"),gd=S("transportUrl"),Md=S("_r","_r");function X(a,b,c,d){b[a]=function(){try{return d&&J(d),c.apply(this,arguments)}catch(e){throw ge("exc",a,e&&e.name),e;}}};var Od=function(a,b,c){this.V=a;this.fa=b;this.$=!1;this.oa=c;this.ea=1},Ed=function(a,b,c){if(a.fa&&a.$)return 0;a.$=!0;if(b){if(a.oa&&R(b,a.oa))return R(b,a.oa);if(0==b.get(dc))return 0}if(0==a.V)return 0;void 0===c&&(c=Bd());return 0==c%a.V?Math.floor(c/a.V)%a.ea+1:0};function fc(){var a,b;if((b=(b=O.navigator)?b.plugins:null)&&b.length)for(var c=0;c<b.length&&!a;c++){var d=b[c];-1<d.name.indexOf("Shockwave Flash")&&(a=d.description)}if(!a)try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=e.GetVariable("$version")}catch(g){}if(!a)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),a="WIN 6,0,21,0",e.AllowScriptAccess="always",a=e.GetVariable("$version")}catch(g){}if(!a)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),a=e.GetVariable("$version")}catch(g){}a&&
|
||||
(e=a.match(/[\d]+/g))&&3<=e.length&&(a=e[0]+"."+e[1]+" r"+e[2]);return a||void 0};var aa=function(a){var b=Math.min(R(a,dc),100);return La(P(a,Q))%100>=b?!1:!0},gc=function(a){var b={};if(Ec(b)||Fc(b)){var c=b[Eb];void 0==c||Infinity==c||isNaN(c)||(0<c?(Y(b,Gb),Y(b,Jb),Y(b,Ib),Y(b,Fb),Y(b,Hb),Y(b,Kb),Y(b,Lb),a(b)):L(O,"load",function(){gc(a)},!1))}},Ec=function(a){var b=O.performance||O.webkitPerformance,b=b&&b.timing;if(!b)return!1;var c=b.navigationStart;if(0==c)return!1;a[Eb]=b.loadEventStart-c;a[Gb]=b.domainLookupEnd-b.domainLookupStart;a[Jb]=b.connectEnd-b.connectStart;a[Ib]=
|
||||
b.responseStart-b.requestStart;a[Fb]=b.responseEnd-b.responseStart;a[Hb]=b.fetchStart-c;a[Kb]=b.domInteractive-c;a[Lb]=b.domContentLoadedEventStart-c;return!0},Fc=function(a){if(O.top!=O)return!1;var b=O.external,c=b&&b.onloadT;b&&!b.isValidLoadTime&&(c=void 0);2147483648<c&&(c=void 0);0<c&&b.setPageReadyTime();if(void 0==c)return!1;a[Eb]=c;return!0},Y=function(a,b){var c=a[b];if(isNaN(c)||Infinity==c||0>c)a[b]=void 0},Fd=function(a){return function(b){if("pageview"==b.get(Va)&&!a.I){a.I=!0;var c=
|
||||
aa(b);b=0<E(b.get(kb),"gclid").length;(c||b)&&gc(function(b){a.send(c?"timing":"adtiming",b)})}}};var hc=!1,mc=function(a){"cookie"==P(a,ac)&&(ma(a,Q,U),a.get(ja)&&ma(a,I,la,864E5))},ma=function(a,b,c,d){var e=nd(a,b);if(e){c=P(a,c);b=kc(P(a,Yb));var g=lc(P(a,W));d=d||1E3*R(a,Zb);var ca=P(a,Na);if("auto"!=g)zc(c,e,b,g,ca,d)&&(hc=!0);else{J(32);a:{e=[];g=xa().split(".");if(4==g.length){var l=g[g.length-1];if(parseInt(l,10)==l){l=["none"];break a}}for(l=g.length-2;0<=l;l--)e.push(g.slice(l).join("."));e.push("none");l=e}for(var k=0;k<l.length;k++)if(g=l[k],a.data.set(W,g),e=nd(a,Q),zc(c,e,b,g,ca,
|
||||
d)){hc=!0;return}a.data.set(W,"auto")}}else a.get(ja)||J(54)},nc=function(a){if("cookie"==P(a,ac)&&!hc&&(mc(a),!hc))throw"abort";},Yc=function(a){if(a.get(Wc)){var b=P(a,W),c=P(a,$b)||xa(),d=Xc("__utma",c,b);d&&(J(19),a.set(Tc,(new Date).getTime(),!0),a.set(Rc,d.R),(b=Xc("__utmz",c,b))&&d.hash==b.hash&&a.set(Sc,b.R))}},nd=function(a,b){b=Cc(P(a,b));var c=lc(P(a,W)).split(".").length;a=jc(P(a,Yb));1<a&&(c+="-"+a);return b?["GA1",c,b].join("."):""},na=function(a,b){if(b&&!(1>b.length)){for(var c=[],
|
||||
d=0;d<b.length;d++){var e=b[d].split(".");var g=e.shift();("GA1"==g||"1"==g)&&1<e.length?(g=e.shift().split("-"),1==g.length&&(g[1]="1"),g[0]*=1,g[1]*=1,e={H:g,s:e.join(".")}):e=void 0;e&&c.push(e)}if(1==c.length)return J(13),c[0].s;if(0==c.length)J(12);else{J(14);b=lc(P(a,W)).split(".").length;c=Gc(c,b,0);if(1==c.length)return c[0].s;a=jc(P(a,Yb));c=Gc(c,a,1);return c[0]&&c[0].s}}},Gc=function(a,b,c){for(var d=[],e=[],g,ca=0;ca<a.length;ca++){var l=a[ca];l.H[c]==b?d.push(l):void 0==g||l.H[c]<g?(e=
|
||||
[l],g=l.H[c]):l.H[c]==g&&e.push(l)}return 0<d.length?d:e},lc=function(a){return 0==a.indexOf(".")?a.substr(1):a},kc=function(a){if(!a)return"/";1<a.length&&a.lastIndexOf("/")==a.length-1&&(a=a.substr(0,a.length-1));0!=a.indexOf("/")&&(a="/"+a);return a},jc=function(a){a=kc(a);return"/"==a?1:a.split("/").length};function Xc(a,b,c){"none"==b&&(b="");var d=[],e=Ca(a);a="__utma"==a?6:2;for(var g=0;g<e.length;g++){var ca=(""+e[g]).split(".");ca.length>=a&&d.push({hash:ca[0],R:e[g],O:ca})}if(0!=d.length)return 1==d.length?d[0]:Zc(b,d)||Zc(c,d)||Zc(null,d)||d[0]}function Zc(a,b){if(null==a)var c=a=1;else c=La(a),a=La(D(a,".")?a.substring(1):"."+a);for(var d=0;d<b.length;d++)if(b[d].hash==c||b[d].hash==a)return b[d]};var od=new RegExp(/^https?:\/\/([^\/:]+)/),pd=/(.*)([?&#])(?:_ga=[^&#]*)(?:&?)(.*)/;function Bc(a){var b=a.get(Q);if(a.get(ja)){a=a.get(I);var c=Ic(a+b,0);return"_ga=2."+K(c+"."+a+"-"+b)}c=Ic(b,0);return"_ga=1."+K(c+"."+b)}function Ic(a,b){var c=new Date,d=O.navigator,e=d.plugins||[];a=[a,d.userAgent,c.getTimezoneOffset(),c.getYear(),c.getDate(),c.getHours(),c.getMinutes()+b];for(b=0;b<e.length;++b)a.push(e[b].description);return La(a.join("."))}var Dc=function(a){J(48);this.target=a;this.T=!1};
|
||||
Dc.prototype.ca=function(a,b){if(a.tagName){if("a"==a.tagName.toLowerCase()){a.href&&(a.href=qd(this,a.href,b));return}if("form"==a.tagName.toLowerCase())return rd(this,a)}if("string"==typeof a)return qd(this,a,b)};
|
||||
var qd=function(a,b,c){var d=pd.exec(b);d&&3<=d.length&&(b=d[1]+(d[3]?d[2]+d[3]:""));a=a.target.get("linkerParam");var e=b.indexOf("?"),d=b.indexOf("#");c?b+=(-1==d?"#":"&")+a:(c=-1==e?"?":"&",b=-1==d?b+(c+a):b.substring(0,d)+c+a+b.substring(d));return b=b.replace(/&+_ga=/,"&_ga=")},rd=function(a,b){if(b&&b.action)if("get"==b.method.toLowerCase()){a=a.target.get("linkerParam").split("=")[1];for(var c=b.childNodes||[],d=0;d<c.length;d++)if("_ga"==c[d].name){c[d].setAttribute("value",a);return}c=M.createElement("input");
|
||||
c.setAttribute("type","hidden");c.setAttribute("name","_ga");c.setAttribute("value",a);b.appendChild(c)}else"post"==b.method.toLowerCase()&&(b.action=qd(a,b.action))};
|
||||
Dc.prototype.S=function(a,b,c){function d(c){try{c=c||O.event;a:{var d=c.target||c.srcElement;for(c=100;d&&0<c;){if(d.href&&d.nodeName.match(/^a(?:rea)?$/i)){var g=d;break a}d=d.parentNode;c--}g={}}("http:"==g.protocol||"https:"==g.protocol)&&sd(a,g.hostname||"")&&g.href&&(g.href=qd(e,g.href,b))}catch(k){J(26)}}var e=this;this.T||(this.T=!0,L(M,"mousedown",d,!1),L(M,"keyup",d,!1));c&&L(M,"submit",function(b){b=b||O.event;if((b=b.target||b.srcElement)&&b.action){var c=b.action.match(od);c&&sd(a,c[1])&&
|
||||
rd(e,b)}})};function sd(a,b){if(b==M.location.hostname)return!1;for(var c=0;c<a.length;c++)if(a[c]instanceof RegExp){if(a[c].test(b))return!0}else if(0<=b.indexOf(a[c]))return!0;return!1};var p=/^(GTM|OPT)-[A-Z0-9]+$/,q=/;_gaexp=[^;]*/g,r=/;((__utma=)|([^;=]+=GAX?\d+\.))[^;]*/g,t=function(a){function b(a,b){b&&(c+="&"+a+"="+K(b))}var c="https://www.google-analytics.com/gtm/js?id="+K(a.id);"dataLayer"!=a.B&&b("l",a.B);b("t",a.target);b("cid",a.ja);b("cidt",a.ka);b("gac",a.la);b("aip",a.ia);a.sync&&b("m","sync");b("cycle",a.G);a.qa&&b("gclid",a.qa);return c};var Jd=function(a,b,c){this.U=ed;this.aa=b;(b=c)||(b=(b=P(a,V))&&"t0"!=b?Wd.test(b)?"_gat_"+Cc(P(a,Na)):"_gat_"+Cc(b):"_gat");this.Y=b},Rd=function(a,b){var c=b.get(Wb);b.set(Wb,function(b){Pd(a,b,a.U);var d=c(b);Qd(a,b);return d});var d=b.get(Xb);b.set(Xb,function(b){var c=d(b);Id(a,b);return c})},Pd=function(a,b,c){b.get(c)||("1"==Ca(a.Y)[0]?b.set(c,"",!0):b.set(c,""+hd(),!0))},Qd=function(a,b){b.get(a.U)&&zc(a.Y,"1",b.get(Yb),b.get(W),b.get(Na),6E4)},Id=function(a,b){if(b.get(a.U)){var c=new ee,
|
||||
d=function(a){$a(a).F&&c.set($a(a).F,b.get(a))};d(hb);d(ib);d(Na);d(Q);d(Ad);d(a.U);c.set($a(ld).F,Td(b));var e=a.aa;c.map(function(a,b){e+=K(a)+"=";e+=K(""+b)+"&"});e+="z="+hd();ta(e);b.set(a.U,"",!0)}},Wd=/^gtm\d+$/;var fd=function(a,b){a=a.b;if(!a.get("dcLoaded")){Nd(a,29);b=b||{};var c;b[U]&&(c=Cc(b[U]));b=new Jd(a,"https://stats.g.doubleclick.net/r/collect?t=dc&aip=1&_r=3&",c);Rd(b,a);a.set("dcLoaded",!0)}};var Sd=function(a){if(!a.get("dcLoaded")&&"cookie"==a.get(ac)){Nd(a,51);var b=new Jd(a);Pd(b,a,b.U);Pd(b,a,ia);Qd(b,a);a.get(b.U)&&(a.set(Md,1,!0),a.set(gd,oc()+"/r/collect",!0))}};var Lc=function(){var a=O.gaGlobal=O.gaGlobal||{};return a.hid=a.hid||hd()};var ad,bd=function(a,b,c){if(!ad){var d=M.location.hash;var e=O.name,g=/^#?gaso=([^&]*)/;if(e=(d=(d=d&&d.match(g)||e&&e.match(g))?d[1]:Ca("GASO")[0]||"")&&d.match(/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))zc("GASO",""+d,c,b,a,0),window._udo||(window._udo=b),window._utcp||(window._utcp=c),a=e[1],wa("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(a?"prefix="+a+"&":"")+hd(),"_gasojs");ad=!0}};var H=function(a){return a?(1*a).toFixed(3):"0"},da=function(a){var b=O.performance;if(b&&b.getEntriesByName){J(35);var c="https://www.google-analytics.com/analytics.js?wpid="+a;wa(c,void 0,void 0,function(){try{var d=1,e=b.getEntriesByName("https://www.google-analytics.com/analytics.js");e&&0!=e.length||(e=b.getEntriesByName("http://www.google-analytics.com/analytics.js"),d=0);var g=b.getEntriesByName(c);if(e&&1==e.length&&g&&1==g.length){J(37);var ca=e[0],l=g[0],k={tid:a,ad:H(ca.duration),bd:H(l.duration),
|
||||
ar:H(ca.responseEnd-ca.requestStart),br:H(l.responseEnd-l.requestStart),an:H(ca.domainLookupEnd-ca.domainLookupStart),bn:H(l.domainLookupEnd-l.domainLookupStart),ac:H(ca.connectEnd-ca.connectStart),bc:H(l.connectEnd-l.connectStart),as:d},d=[];d.push("_v=j53");d.push("id=10");for(var w in k)k.hasOwnProperty(w)&&d.push(w+"="+K(k[w]));d.push("z="+hd());wc("https://www.google-analytics.com/u/d",d.join("&"),ua)}}catch(ha){}})}};var wb=/^(UA|YT|MO|GP)-(\d+)-(\d+)$/,pc=function(a){function b(a,b){d.b.data.set(a,b)}function c(a,c){b(a,c);d.filters.add(a)}var d=this;this.b=new Ya;this.filters=new Ha;b(V,a[V]);b(Na,sa(a[Na]));b(U,a[U]);b(W,a[W]||xa());b(Yb,a[Yb]);b(Zb,a[Zb]);b($b,a[$b]);b(Wc,a[Wc]);b(bc,a[bc]);b(cc,a[cc]);b(Ka,a[Ka]);b(dc,a[dc]);b(ec,a[ec]);b(ac,a[ac]);b(Ad,a[Ad]);b(n,a[n]);b(ja,a[ja]);b(hb,1);b(ib,"j53");c(Qb,Ma);c(dd,cd);c(Rb,Oa);c(md,vb);c(Sb,nc);c(Uc,Yc);c(Tb,Ja);c(Vb,Ta);c(Vc,Hc);c(zd,yd);c(Ld,Sd);c(Wb,
|
||||
Pa);c(Xb,Sa);c(Cd,Fd(this));Jc(this.b,a[Q]);Kc(this.b);this.b.set(jb,Lc());bd(this.b.get(Na),this.b.get(W),this.b.get(Yb));this.ra=new Od(1E4,!0,"gaexp10")},Jc=function(a,b){if("cookie"==P(a,ac)){hc=!1;var c=Ca(P(a,U));if(!(c=na(a,c))){var c=P(a,W),d=P(a,$b)||xa();c=Xc("__utma",d,c);void 0!=c?(J(10),c=c.O[1]+"."+c.O[2]):c=void 0}c&&(a.data.set(Q,c),c=Ca(P(a,la)),(c=na(a,c))&&a.data.set(I,c),hc=!0)}a:if(c=a.get(cc),c=E(M.location[c?"href":"search"],"_ga"))if(a.get(bc))if(d=c.indexOf("."),-1==d)J(22);
|
||||
else{var e=c.substring(0,d),g=c.substring(d+1),d=g.indexOf("."),c=g.substring(0,d),g=g.substring(d+1);if("1"==e){if(d=g,c!=Ic(d,0)&&c!=Ic(d,-1)&&c!=Ic(d,-2)){J(23);break a}}else if("2"==e){e=g.split("-",2);d=e[1];if(c!=Ic(e[0]+d,0)&&c!=Ic(e[0]+d,-1)&&c!=Ic(e[0]+d,-2)){J(53);break a}J(2);a.data.set(I,e[0])}else{J(22);break a}J(11);a.data.set(Q,d)}else J(21);b&&(J(9),a.data.set(Q,K(b)));a.get(Q)||((b=(b=O.gaGlobal&&O.gaGlobal.vid)&&-1!=b.search(/^(?:utma\.)?\d+\.\d+$/)?b:void 0)?(J(17),a.data.set(Q,
|
||||
b)):(J(8),a.data.set(Q,ga())));a.data.set(ja,a.get(ja)||1==Ed(new Od(1,!0),void 0,La(a.get(Q))));a.get(ja)&&(b=P(a,U),a.data.set(la,"_ga"==b?"_gid":b+"_gid"));a.get(ja)&&!a.get(I)&&(J(3),a.data.set(I,ga()));mc(a)},Kc=function(a){var b=O.navigator,c=O.screen,d=M.location;a.set(lb,ya(a.get(ec)));if(d){var e=d.pathname||"";"/"!=e.charAt(0)&&(J(31),e="/"+e);a.set(kb,d.protocol+"//"+d.hostname+e+d.search)}c&&a.set(qb,c.width+"x"+c.height);c&&a.set(pb,c.colorDepth+"-bit");var c=M.documentElement,g=(e=M.body)&&
|
||||
e.clientWidth&&e.clientHeight,ca=[];c&&c.clientWidth&&c.clientHeight&&("CSS1Compat"===M.compatMode||!g)?ca=[c.clientWidth,c.clientHeight]:g&&(ca=[e.clientWidth,e.clientHeight]);c=0>=ca[0]||0>=ca[1]?"":ca.join("x");a.set(rb,c);a.set(tb,fc());a.set(ob,M.characterSet||M.charset);a.set(sb,b&&"function"===typeof b.javaEnabled&&b.javaEnabled()||!1);a.set(nb,(b&&(b.language||b.browserLanguage)||"").toLowerCase());if(d&&a.get(cc)&&(b=M.location.hash)){b=b.split(/[?&#]+/);d=[];for(c=0;c<b.length;++c)(D(b[c],
|
||||
"utm_id")||D(b[c],"utm_campaign")||D(b[c],"utm_source")||D(b[c],"utm_medium")||D(b[c],"utm_term")||D(b[c],"utm_content")||D(b[c],"gclid")||D(b[c],"dclid")||D(b[c],"gclsrc"))&&d.push(b[c]);0<d.length&&(b="#"+d.join("&"),a.set(kb,a.get(kb)+b))}};pc.prototype.get=function(a){return this.b.get(a)};pc.prototype.set=function(a,b){this.b.set(a,b)};var qc={pageview:[mb],event:[ub,xb,yb,zb],social:[Bb,Cb,Db],timing:[Mb,Nb,Pb,Ob]};
|
||||
pc.prototype.send=function(a){if(!(1>arguments.length)){if("string"===typeof arguments[0]){var b=arguments[0];var c=[].slice.call(arguments,1)}else b=arguments[0]&&arguments[0][Va],c=arguments;b&&(c=za(qc[b]||[],c),c[Va]=b,this.b.set(c,void 0,!0),this.filters.D(this.b),this.b.data.m={},Ed(this.ra,this.b)&&da(this.b.get(Na)))}};pc.prototype.ma=function(a,b){var c=this;u(a,c,b)||(v(a,function(){u(a,c,b)}),y(String(c.get(V)),a,void 0,b,!0))};var rc=function(a){if("prerender"==M.visibilityState)return!1;a();return!0},z=function(a){if(!rc(a)){J(16);var b=!1,c=function(){if(!b&&rc(a)){b=!0;var d=c,e=M;e.removeEventListener?e.removeEventListener("visibilitychange",d,!1):e.detachEvent&&e.detachEvent("onvisibilitychange",d)}};L(M,"visibilitychange",c)}};var td=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/,sc=function(a){if(ea(a[0]))this.u=a[0];else{var b=td.exec(a[0]);null!=b&&4==b.length&&(this.c=b[1]||"t0",this.K=b[2]||"",this.C=b[3],this.a=[].slice.call(a,1),this.K||(this.A="create"==this.C,this.i="require"==this.C,this.g="provide"==this.C,this.ba="remove"==this.C),this.i&&(3<=this.a.length?(this.X=this.a[1],this.W=this.a[2]):this.a[1]&&(qa(this.a[1])?this.X=this.a[1]:this.W=this.a[1])));b=a[1];a=a[2];if(!this.C)throw"abort";if(this.i&&(!qa(b)||""==b))throw"abort";
|
||||
if(this.g&&(!qa(b)||""==b||!ea(a)))throw"abort";if(ud(this.c)||ud(this.K))throw"abort";if(this.g&&"t0"!=this.c)throw"abort";}};function ud(a){return 0<=a.indexOf(".")||0<=a.indexOf(":")};var Yd,Zd,$d,A;Yd=new ee;$d=new ee;A=new ee;Zd={ec:45,ecommerce:46,linkid:47};
|
||||
var u=function(a,b,c){b==N||b.get(V);var d=Yd.get(a);if(!ea(d))return!1;b.plugins_=b.plugins_||new ee;if(b.plugins_.get(a))return!0;b.plugins_.set(a,new d(b,c||{}));return!0},y=function(a,b,c,d,e){if(!ea(Yd.get(b))&&!$d.get(b)){Zd.hasOwnProperty(b)&&J(Zd[b]);if(p.test(b)){J(52);a=N.j(a);if(!a)return!0;c=d||{};d={id:b,B:c.dataLayer||"dataLayer",ia:!!a.get("anonymizeIp"),sync:e,G:!1};a.get(">m")==b&&(d.G=!0);var g=String(a.get("name"));"t0"!=g&&(d.target=g);G(String(a.get("trackingId")))||(d.ja=String(a.get(Q)),
|
||||
d.ka=Number(a.get(n)),c=c.palindrome?r:q,c=(c=M.cookie.replace(/^|(; +)/g,";").match(c))?c.sort().join("").substring(1):void 0,d.la=c,d.qa=E(a.b.get(kb)||"","gclid"));a=d.B;c=(new Date).getTime();O[a]=O[a]||[];c={"gtm.start":c};e||(c.event="gtm.js");O[a].push(c);c=t(d)}!c&&Zd.hasOwnProperty(b)?(J(39),c=b+".js"):J(43);c&&(c&&0<=c.indexOf("/")||(c=(Ba||Ud()?"https:":"http:")+"//www.google-analytics.com/plugins/ua/"+c),d=ae(c),a=d.protocol,c=M.location.protocol,("https:"==a||a==c||("http:"!=a?0:"http:"==
|
||||
c))&&B(d)&&(wa(d.url,void 0,e),$d.set(b,!0)))}},v=function(a,b){var c=A.get(a)||[];c.push(b);A.set(a,c)},C=function(a,b){Yd.set(a,b);b=A.get(a)||[];for(var c=0;c<b.length;c++)b[c]();A.set(a,[])},B=function(a){var b=ae(M.location.href);if(D(a.url,"https://www.google-analytics.com/gtm/js?id="))return!0;if(a.query||0<=a.url.indexOf("?")||0<=a.path.indexOf("://"))return!1;if(a.host==b.host&&a.port==b.port)return!0;b="http:"==a.protocol?80:443;return"www.google-analytics.com"==a.host&&(a.port||b)==b&&
|
||||
D(a.path,"/plugins/")?!0:!1},ae=function(a){function b(a){var b=(a.hostname||"").split(":")[0].toLowerCase(),c=(a.protocol||"").toLowerCase(),c=1*a.port||("http:"==c?80:"https:"==c?443:"");a=a.pathname||"";D(a,"/")||(a="/"+a);return[b,""+c,a]}var c=M.createElement("a");c.href=M.location.href;var d=(c.protocol||"").toLowerCase(),e=b(c),g=c.search||"",ca=d+"//"+e[0]+(e[1]?":"+e[1]:"");D(a,"//")?a=d+a:D(a,"/")?a=ca+a:!a||D(a,"?")?a=ca+e[2]+(a||g):0>a.split("/")[0].indexOf(":")&&(a=ca+e[2].substring(0,
|
||||
e[2].lastIndexOf("/"))+"/"+a);c.href=a;d=b(c);return{protocol:(c.protocol||"").toLowerCase(),host:d[0],port:d[1],path:d[2],query:c.search||"",url:a||""}};var Z={ga:function(){Z.f=[]}};Z.ga();Z.D=function(a){var b=Z.J.apply(Z,arguments),b=Z.f.concat(b);for(Z.f=[];0<b.length&&!Z.v(b[0])&&!(b.shift(),0<Z.f.length););Z.f=Z.f.concat(b)};Z.J=function(a){for(var b,c=[],d=0;d<arguments.length;d++)try{b=new sc(arguments[d]),b.g?C(b.a[0],b.a[1]):(b.i&&(b.ha=y(b.c,b.a[0],b.X,b.W)),c.push(b))}catch(e){}return c};
|
||||
Z.v=function(a){try{if(a.u)a.u.call(O,N.j("t0"));else{var b=a.c==gb?N:N.j(a.c);if(a.A)"t0"!=a.c||N.create.apply(N,a.a);else if(a.ba)N.remove(a.c);else if(b)if(a.i){if(a.ha&&(a.ha=y(a.c,a.a[0],a.X,a.W)),!u(a.a[0],b,a.W))return!0}else if(a.K){var c=a.C,d=a.a,e=b.plugins_.get(a.K);e[c].apply(e,d)}else b[a.C].apply(b,a.a)}}catch(g){}};var N=function(a){J(1);Z.D.apply(Z,[arguments])};N.h={};N.P=[];N.L=0;N.answer=42;var uc=[Na,W,V];N.create=function(a){var b=za(uc,[].slice.call(arguments));b[V]||(b[V]="t0");var c=""+b[V];if(N.h[c])return N.h[c];b=new pc(b);N.h[c]=b;N.P.push(b);return b};N.remove=function(a){for(var b=0;b<N.P.length;b++)if(N.P[b].get(V)==a){N.P.splice(b,1);N.h[a]=null;break}};N.j=function(a){return N.h[a]};N.getAll=function(){return N.P.slice(0)};
|
||||
N.N=function(){"ga"!=gb&&J(49);var a=O[gb];if(!a||42!=a.answer){N.L=a&&a.l;N.loaded=!0;var b=O[gb]=N;X("create",b,b.create);X("remove",b,b.remove);X("getByName",b,b.j,5);X("getAll",b,b.getAll,6);b=pc.prototype;X("get",b,b.get,7);X("set",b,b.set,4);X("send",b,b.send);X("requireSync",b,b.ma);b=Ya.prototype;X("get",b,b.get);X("set",b,b.set);if(!Ud()&&!Ba){a:{for(var b=M.getElementsByTagName("script"),c=0;c<b.length&&100>c;c++){var d=b[c].src;if(d&&0==d.indexOf("https://www.google-analytics.com/analytics")){J(33);
|
||||
b=!0;break a}}b=!1}b&&(Ba=!0)}Ud()||Ba||!Ed(new Od(1E4))||(J(36),Ba=!0);(O.gaplugins=O.gaplugins||{}).Linker=Dc;b=Dc.prototype;C("linker",Dc);X("decorate",b,b.ca,20);X("autoLink",b,b.S,25);C("displayfeatures",fd);C("adfeatures",fd);a=a&&a.q;ka(a)?Z.D.apply(N,a):J(50)}};N.da=function(){for(var a=N.getAll(),b=0;b<a.length;b++)a[b].get(V)};var oa=N.N,pa=O[gb];pa&&pa.r?oa():z(oa);z(function(){Z.D(["provide","render",ua])});function La(a){var b=1,c;if(a)for(b=0,c=a.length-1;0<=c;c--){var d=a.charCodeAt(c);b=(b<<6&268435455)+d+(d<<14);d=b&266338304;b=0!=d?b^d>>21:b}return b};})(window);
|
||||
|
After Width: | Height: | Size: 53 KiB |
@@ -0,0 +1,21 @@
|
||||
(function(){var k=this,n=function(a){return"string"==typeof a};var r=function(a){a=parseFloat(a);return isNaN(a)||1<a||0>a?0:a};var fa=r("0.20"),ga=r("0.01");var ha=/^true$/.test("false")?!0:!1;var ia=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(n(a))return n(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},ja=Array.prototype.filter?function(a,b,c){return Array.prototype.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=n(a)?a.split(""):a,h=0;h<d;h++)if(h in g){var l=g[h];b.call(c,l,h,a)&&(e[f++]=l)}return e},ka=Array.prototype.map?
|
||||
function(a,b,c){return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=n(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},la=function(a){return Array.prototype.concat.apply([],arguments)};var u=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b};var x=function(a){x[" "](a);return a};x[" "]=function(){};var z=function(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(void 0,a[c],c,a)};var ma=function(){this.h={};this.a={};for(var a=[2,3],b=0,c=a.length;b<c;++b)this.a[a[b]]=""},A=function(){try{var a=k.top.location.hash;if(a){var b=a.match(/\bdeid=([\d,]+)/);return b&&b[1]||""}}catch(c){}return""},F=function(a,b,c){var d=E;if(c?d.a.hasOwnProperty(c)&&""==d.a[c]:1){var e;if(e=(e=A().match(new RegExp("\\b("+a.join("|")+")\\b")))&&e[0]||null)a=e;else a:{if(!(1E-4>Math.random())&&(e=Math.random(),e<b)){try{var f=new Uint32Array(1);k.crypto.getRandomValues(f);e=f[0]/65536/65536}catch(g){e=
|
||||
Math.random()}a=a[Math.floor(e*a.length)];break a}a=null}a&&""!=a&&(c?d.a.hasOwnProperty(c)&&(d.a[c]=a):d.h[a]=!0)}},G=function(a){var b=E;return b.a.hasOwnProperty(a)?b.a[a]:""},na=function(){var a=E,b=[];z(a.h,function(a,d){b.push(d)});z(a.a,function(a){""!=a&&b.push(a)});return b};var H={g:{c:"27391101",b:"27391102"},f:{c:"376635470",b:"376635471"}},E=null,oa=function(){var a=la.apply([],ka(u(H),function(a){return u(a)},void 0)),b=ja(A().split(","),function(b){return""!=b&&!(0<=ia(a,b))});return 0<b.length?"&debug_experiment_id="+b.join(","):""};var I=null,J=null;var K=function(a,b,c,d){for(var e=c.length;0<=(b=a.indexOf(c,b))&&b<d;){var f=a.charCodeAt(b-1);if(38==f||63==f)if(f=a.charCodeAt(b+e),!f||61==f||38==f||35==f)return b;b+=e+1}return-1},O=/#|$/,P=function(a,b){var c=a.search(O),d=K(a,0,b,c);if(0>d)return null;var e=a.indexOf("&",d);if(0>e||e>c)e=c;d+=b.length+1;return decodeURIComponent(a.substr(d,e-d).replace(/\+/g," "))},pa=/[?&]($|#)/;(function(){var a=!1;try{var b=Object.defineProperty({},"passive",{get:function(){a=!0}});k.addEventListener("test",null,b)}catch(c){}return a})();var Q="google_conversion_id google_conversion_format google_conversion_type google_conversion_order_id google_conversion_language google_conversion_value google_conversion_currency google_conversion_domain google_conversion_label google_conversion_color google_disable_viewthrough google_enable_display_cookie_match google_remarketing_only google_remarketing_for_search google_conversion_items google_conversion_merchant_id google_custom_params google_conversion_date google_conversion_time google_conversion_js_version onload_callback opt_image_generator google_conversion_page_url google_conversion_referrer_url".split(" "),
|
||||
R=function(a){return null!=a?encodeURIComponent(a.toString()):""},S=function(a){return null!=a?a.toString().substring(0,512):""},T=function(a,b){b=R(b);return""!=b&&(a=R(a),""!=a)?"&".concat(a,"=",b):""},U=function(a){var b=typeof a;return null==a||"object"==b||"function"==b?null:String(a).replace(/,/g,"\\,").replace(/;/g,"\\;").replace(/=/g,"\\=")},qa=function(a){if((a=a.google_custom_params)&&"object"==typeof a&&"function"!=typeof a.join){var b=[];for(g in a)if(Object.prototype.hasOwnProperty.call(a,
|
||||
g)){var c=a[g];if(c&&"function"==typeof c.join){for(var d=[],e=0;e<c.length;++e){var f=U(c[e]);null!=f&&d.push(f)}c=d.length?d.join(","):null}else c=U(c);(d=U(g))&&null!=c&&b.push(d+"="+c)}var g=b.join(";")}else g="";return""==g?"":"&".concat("data=",encodeURIComponent(g))};function V(a){return"number"!=typeof a&&"string"!=typeof a?"":R(a.toString())}
|
||||
var ra=function(a){if(!a)return"";a=a.google_conversion_items;if(!a)return"";for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c],f=[];e&&(f.push(V(e.value)),f.push(V(e.quantity)),f.push(V(e.item_id)),f.push(V(e.adwords_grouping)),f.push(V(e.sku)),b.push("("+f.join("*")+")"))}return 0<b.length?"&item="+b.join(""):""},sa=function(a,b,c){var d=[];if(a){var e=a.screen;e&&(d.push(T("u_h",e.height)),d.push(T("u_w",e.width)),d.push(T("u_ah",e.availHeight)),d.push(T("u_aw",e.availWidth)),d.push(T("u_cd",e.colorDepth)));
|
||||
a.history&&d.push(T("u_his",a.history.length))}c&&"function"==typeof c.getTimezoneOffset&&d.push(T("u_tz",-c.getTimezoneOffset()));b&&("function"==typeof b.javaEnabled&&d.push(T("u_java",b.javaEnabled())),b.plugins&&d.push(T("u_nplug",b.plugins.length)),b.mimeTypes&&d.push(T("u_nmime",b.mimeTypes.length)));return d.join("")};
|
||||
function ta(a){a=a?a.title:"";if(void 0==a||""==a)return"";var b=function(a){try{return decodeURIComponent(a),!0}catch(e){return!1}};a=encodeURIComponent(a);for(var c=256;!b(a.substr(0,c));)c--;return"&tiba="+a.substr(0,c)}
|
||||
var W=function(a,b,c,d){var e="";if(b){if(a.top==a)var f=0;else{var g=a.location.ancestorOrigins;if(g)f=g[g.length-1]==a.location.origin?1:2;else{g=a.top;try{var h;if(h=!!g&&null!=g.location.href)c:{try{x(g.foo);h=!0;break c}catch(l){}h=!1}f=h}catch(l){f=!1}f=f?1:2}}a=c?c:1==f?a.top.location.href:a.location.href;e+=T("frm",f);e+=T("url",S(a));e+=T("ref",S(d||b.referrer))}return e},X=function(a,b){return!(ha||b&&ua.test(navigator.userAgent))||a&&a.location&&a.location.protocol&&"https:"==a.location.protocol.toString().toLowerCase()?
|
||||
"https:":"http:"},ua=/Android ([01]\.|2\.[01])/i,Y=function(a,b){var c=b.createElement("iframe");c.style.display="none";c.src=X(a,!1)+"//bid.g.doubleclick.net/xbbe/pixel?d=KAE";b.body.appendChild(c)};function va(){return new Image}
|
||||
function wa(a,b,c,d){if((E?G(3):"")==H.g.b)try{a:if(3!=P(c,"fmt"))var e=!1;else{if(d){var f=P(c,"random"),g=P(c,"label");if(!f||!g){e=!1;break a}for(var h=decodeURIComponent(g.replace(/\+/g," "))+":"+decodeURIComponent(f.replace(/\+/g," ")),f=[],l=g=0;l<h.length;l++){for(var m=h.charCodeAt(l);255<m;)f[g++]=m&255,m>>=8;f[g++]=m}if(!I)for(I={},J={},h=0;65>h;h++)I[h]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h),J[h]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(h);
|
||||
h=J;m=[];for(g=0;g<f.length;g+=3){var p=f[g],v=g+1<f.length,B=v?f[g+1]:0,C=g+2<f.length,y=C?f[g+2]:0,l=p>>2,Z=(p&3)<<4|B>>4,aa=(B&15)<<2|y>>6,ba=y&63;C||(ba=64,v||(aa=64));m.push(h[l],h[Z],h[aa],h[ba])}var t=m.join("").replace(/[.]*$/,"");var D=a.GooglebQhCsO;D||(D={},a.GooglebQhCsO=D);a=D;if(a[t])var ca=!1;else a[t]=[],a[t][0]=d,ca=!0;if(!ca){e=!1;break a}}var L=c.search(O);d=0;for(var M,t=[];0<=(M=K(c,d,"fmt",L));)t.push(c.substring(d,M)),d=Math.min(c.indexOf("&",M)+1||L,L);t.push(c.substr(d));
|
||||
var q=[t.join("").replace(pa,"$1"),"&","fmt"];q.push("=",encodeURIComponent("4"));if(q[1]){var w=q[0],N=w.indexOf("#");0<=N&&(q.push(w.substr(N)),q[0]=w=w.substr(0,N));var da=w.indexOf("?");0>da?q[1]="?":da==w.length-1&&(q[1]=void 0)}var ea=b.createElement("script");ea.src=q.join("");b.getElementsByTagName("script")[0].parentElement.appendChild(ea);e=!0}return e}catch(Ca){}return!1}
|
||||
var xa=function(a,b,c,d,e,f){var g=c.opt_image_generator&&c.opt_image_generator.call,h;e&&c.onload_callback&&c.onload_callback.call?h=c.onload_callback:h=function(){};d+=T("async","1");!g&&f&&wa(a,b,d,h)||(a=va,g&&(a=c.opt_image_generator),c=a(),c.src=d,c.onload=h)},ya=function(a,b){for(var c=document.createElement("iframe"),d=[],e=[],f=0;f<b.google_conversion_items.length;f++){var g=b.google_conversion_items[f];g&&g.quantity&&g.sku&&(d.push(g.sku),e.push(g.quantity))}a=X(a,!1)+"//www.google.com/ads/mrc";
|
||||
c.src=a+"?sku="+d.join(",")+"&qty="+e.join(",")+"&oid="+b.google_conversion_order_id+"&mcid="+b.google_conversion_merchant_id;c.style.width="1px";c.style.height="1px";c.style.display="none";return c},za=function(a,b,c){var d=function(){c.documentElement.appendChild(ya(a,b))};"complete"===c.readyState?d():a.addEventListener?a.addEventListener("load",d):a.attachEvent("onload",d)},Aa=function(a,b){(E?G(2):"")==H.f.b&&("complete"===b.readyState?Y(a,b):a.addEventListener?a.addEventListener("load",function(){Y(a,
|
||||
b)}):a.attachEvent("onload",function(){Y(a,b)}))},Ba=function(a,b){for(var c={},d=function(d){c[d]=b&&null!=b[d]?b[d]:a[d]},e=0;e<Q.length;e++)d(Q[e]);d("onload_callback");return c};window.google_trackConversion=function(a){var b=window,c=navigator,d=document;a=Ba(b,a);a.google_conversion_format=3;var e=!1;if(a&&3==a.google_conversion_format){try{if("landing"==a.google_conversion_type||!a.google_conversion_id||a.google_remarketing_only&&a.google_disable_viewthrough)var f=!1;else a.google_conversion_date=new Date,a.google_conversion_time=a.google_conversion_date.getTime(),a.google_conversion_snippets="number"==typeof a.google_conversion_snippets&&0<a.google_conversion_snippets?
|
||||
a.google_conversion_snippets+1:1,"number"!=typeof a.google_conversion_first_time&&(a.google_conversion_first_time=a.google_conversion_time),a.google_conversion_js_version="8",0!=a.google_conversion_format&&1!=a.google_conversion_format&&2!=a.google_conversion_format&&3!=a.google_conversion_format&&(a.google_conversion_format=1),!1!==a.google_enable_display_cookie_match&&(a.google_enable_display_cookie_match=!0),E=new ma,f=!0;if(f){a.google_remarketing_only&&a.google_enable_display_cookie_match&&E&&
|
||||
F([H.f.c,H.f.b],fa,2);a.google_remarketing_only||a.google_conversion_domain||E&&F([H.g.c,H.g.b],ga,3);f="/?";"landing"==a.google_conversion_type&&(f="/extclk?");var g=[a.google_remarketing_only?"viewthroughconversion/":"conversion/",R(a.google_conversion_id),f,"random=",R(a.google_conversion_time)].join(""),h=a.google_remarketing_only?"googleads.g.doubleclick.net":a.google_conversion_domain||"www.googleadservices.com";var l=X(b,/www[.]googleadservices[.]com/i.test(h))+"//"+h+"/pagead/"+g;b:{var m=
|
||||
a.google_conversion_language;if(null!=m){var p=m.toString();if(2==p.length){var v=T("hl",p);break b}if(5==p.length){v=T("hl",p.substring(0,2))+T("gl",p.substring(3,5));break b}}v=""}var B=[T("cv",a.google_conversion_js_version),T("fst",a.google_conversion_first_time),T("num",a.google_conversion_snippets),T("fmt",a.google_conversion_format),T("value",a.google_conversion_value),T("currency_code",a.google_conversion_currency),T("label",a.google_conversion_label),T("oid",a.google_conversion_order_id),
|
||||
T("bg",a.google_conversion_color),v,T("guid","ON"),T("disvt",a.google_disable_viewthrough),T("eid",na().join()),ra(a),sa(b,c,a.google_conversion_date),qa(a),W(b,d,a.google_conversion_page_url,a.google_conversion_referrer_url),a.google_remarketing_for_search&&!a.google_conversion_domain?"&srr=n":"",ta(d)].join("")+oa();xa(b,d,a,l+B,!0,!0);if(a.google_remarketing_for_search&&!a.google_conversion_domain){var C=[R(a.google_conversion_id),"/?random=",Math.floor(1E9*Math.random())].join("");var y=X(b,!1)+
|
||||
"//www.google.com/ads/user-lists/"+C;y+=[T("label",a.google_conversion_label),T("fmt","3"),W(b,d,a.google_conversion_page_url,a.google_conversion_referrer_url)].join("");xa(b,d,a,y,!1,!1)}a.google_remarketing_only&&a.google_enable_display_cookie_match&&Aa(b,d);e=!0}a.google_conversion_merchant_id&&a.google_conversion_order_id&&a.google_conversion_items&&(za(b,a,d),e=!0)}catch(Z){}b=e}else b=!1;return b};}).call(this);
|
||||
@@ -0,0 +1,2 @@
|
||||
(function(){var e=window,h=document,k="replace";var m=function(a,c,d,b,g){c=encodeURIComponent(c)[k](/\(/g,"%28")[k](/\)/g,"%29");a=a+"="+c+"; path="+(d||"/")+"; ";g&&(a+="expires="+(new Date((new Date).getTime()+g)).toGMTString()+"; ");b&&"none"!=b&&(a+="domain="+b+";");b=h.cookie;h.cookie=a;return b!=h.cookie},p=function(a){var c=h.body;try{c.addEventListener?c.addEventListener("click",a,!1):c.attachEvent&&c.attachEvent("onclick",a)}catch(d){}};var q=function(a,c,d,b){this.get=function(){for(var b=void 0,c=[],d=h.cookie.split(";"),l=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$"),f=0;f<d.length;f++){var n=d[f].match(l);n&&c.push(decodeURIComponent(n[1][k](/%28/g,"(")[k](/%29/g,")")))}for(d=0;d<c.length;d++)c[d]&&(b=c[d]);return b};this.set=function(g){return m(a,g,b,c,1E3*d)};this.remove=function(){return m(a,"",b,c,-100)}};var t=function(a,c){var d=void 0;if("function"==typeof a.get&&"function"==typeof a.set){var b=c||{},g=b.hasOwnProperty("cookieName")?b.cookieName:"_gali",r=b.hasOwnProperty("cookieTimeout")?b.cookieTimeout:30,s=b.hasOwnProperty("levels")?b.levels:3,b=a.get("cookieDomain"),l=a.get("cookiePath"),f=new q(g,b,r,l);d||(d=f.get());d&&a.set("&linkid",d);p(function(a){a=a||e.event;a=a.target||a.srcElement;for(var b,c=0;a&&c<=s;c++){if(b=a.getAttribute("id")){a=b;100<a.length?f.remove():a?f.set(a):f.remove();
|
||||
return}a=a.parentElement}f.remove()})}};(function(){e.gaplugins=e.gaplugins||{};e.gaplugins.LinkId=t;var a=e.GoogleAnalyticsObject||"ga";e[a]=e[a]||function(){(e[a].q=e[a].q||[]).push(arguments)};e[a]("provide","linkid",t)})();})();
|
||||
|
After Width: | Height: | Size: 7.1 KiB |
@@ -0,0 +1,3 @@
|
||||
/* Disable minification (remove `.min` from URL path) for more info */
|
||||
|
||||
(function(undefined) {this.addEventListener("focus",function(e){e.target.dispatchEvent(new Event("focusin",{bubbles:!0,cancelable:!0}))},!0),this.addEventListener("blur",function(e){e.target.dispatchEvent(new Event("focusout",{bubbles:!0,cancelable:!0}))},!0);}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Quantcast measurement tag
|
||||
Copyright (c) 2008-2017, Quantcast Corp.
|
||||
*/
|
||||
window.__qc=function(c){if(c.__qc)return c.__qc;RULE_FETCH_BLACKLIST=5;var w=c.document,B=c.navigator,T="4dcfa7079941 127fdf7967f31 588ab9292a3f 32f92b0727e5 22f9aa38dfd3 a4abfe8f3e04 18b66bc1325c 958e70ea2f28 bdbf0cb4bbb 65118a0d557 40a1d9db1864 18ae3d985046 3b26460f55d".split(" "),ja=!1,U=0,V=[],Da=[],W=[],Ea={tcYgbCswcTSeq:1,"01-0VIaSjnOLg":1,aD1qr93XuF6aC:1,"56WJ0KtIxWJ_2":1,T1nhLcmCjVzQS:1,zddNYNtUkUhdQ:1,"59TntzuqummDw":1,P7x87XHnVfbWr:1,HGAVM7nQJ_sep:1,"w9vzus-GKCA0U":1,"00TsOkvHvnsZU":1,effSsmMYCbAck:1,
|
||||
PFW5FesqXn206:1,"0dYLvhSGGqUWo":1,c1rF4kxgLUzNc:1,"5brKQLtleyIQU":1,"mEzuYq24VEJ-3":1,"57OGVHgSOoedo":1,"e7wR0qsM6-pDa":1,"8tgFhCTDYhV2V":1,"82MbSinIaQJw2":1,buQ2dAnrdTGCS:1,"49SVsgIZlUqPk":1,eeFYJkotb1rUU:1,EzVU5HfAMVqEV:1,"45nh8QKbsf2Xk":1,sLJ2v5QaN4z2Y:1,"5cvC4NOeGmtNA":1,"573scDfDoUH6o":1,"915Y6SMHQQJHI":1,z0zMG4nCgXzzj:1,"124BfeS-bwiSE":1,"ZzStSGgW6hG-4":1,KUMT4fYgcdEeg:1,d9vfr8QTWnv1E:1,fug7wP0GuN1h6:1,cd12aNCzw_ZaB:1,"51zXP5Cc9sxvQ":1,"4dIM5nVs2rFio":1,"8fZNjMQsH1Ews":1,C6W3aFrWFMS7m:1,N7ekbgK3G3jrt:1,
|
||||
dfQGRefil9mes:1,"9axVJDmh4EHIM":1,NPcfSf1E0V1T1:1,"72V4-XKpaKDrE":1,"8cV3w6ZJH0sXI":1,sHwqAaPHqVjee:1,b15U9CAASyBMc:1},x=[],y={},J=0,E=[],C=null,X={},v={},ka=null,t,Y=[].slice,la,Z,K,l,z,aa,L,ma,na,oa,F,ba,M,N,pa,G,qa,ra,sa,ta,p,ua,A,O,va,ca,wa,xa,da,q,ya,ea,P,Q,za,Aa,R,Ba,fa,ga,Ca,ha,D,H,I,S,ia,u=function(a){try{return{init:N,hash:M,rules:za,hasRules:R,defaults:Ca,__qc:function(){return!0}}[a].apply(null,Y.call(arguments,1))}catch(b){return!1}};u.evts=0;u.v=2;u.SD=T;u.qpixelsent=[];Q=function(a){var b=
|
||||
a?a.length||0:0,d;for(d=0;d<b;d++)if(!a[d])return!1;return!0};ga=function(a){(a=a||c._qacct)&&(da(x,a)||x.push(a))};da=function(a,b){var d=a.length,g;for(g=0;g<d;g++)if(a[g]===b)return!0;return!1};ea=function(a){return{}.toString.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase()};P=function(a){var b,d;b=ea(a);if("array"===b)return a.slice(0);if("object"===b){b={};for(d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);return b}return"string"===b?""+a:a};R=function(a){return da(W,a)};Ca=function(a,b){var d;a&&((d=
|
||||
X[a])&&(b=S(b,d)),b.qacct&&delete b.qacct,X[a]=b)};ha=function(a){var b,d;if(l(a))for(b in a)if("string"==typeof a[b]){b=a.event||"load";d=a.media||"webpage";"rule"!==b&&"load"!==b||"webpage"!==d&&"ad"!==d?p(a):(d=a.qacct||c._qacct,a.qacct=d,b=(b=v[d])?S(b,a):a,v[d]=b);ga(a.qacct);break}else"object"==typeof a[b]&&null!=a[b]&&ha(a[b])};S=function(a,b){var d={};d.qacct=a.qacct||b.qacct;d.event="load"===a.event||"load"===b.event?"load":a.event&&b.event?a.event||b.event:null;d.media=null;d.media="webpage"===
|
||||
a.media||"webpage"===b.media?"webpage":"ad"===a.media||"ad"===b.media?"ad":a.media||b.media;ca(d,a,b);ca(d,b,a);d.event||delete d.event;d.media||delete d.media;return d};ca=function(a,b,d){var g,c,h,r,n,k;for(g in b)b.hasOwnProperty(g)&&!a.hasOwnProperty(g)&&(c=b[g],h=d[g],r="",n=!!c&&"string"==typeof c,k=!!h&&"string"==typeof h,n&&(r=c),n&&k&&(r+=","),k&&(r+=h),a[g]=r)};D=function(){var a=[],b,d;if(!(0<J)){ya();for(b in v)v.hasOwnProperty(b)&&v[b]&&(d=v[b],a.push(d),delete v[b]);1==a.length&&p(a[0]);
|
||||
1<a.length&&p(a)}};H=function(a){var b=[],d,c;for(d=0;d<a.length;d++)c=a[d],Ea.hasOwnProperty(c.substring(2))?y[c]=RULE_FETCH_BLACKLIST:R(c)||b.push(c);if(0===b.length)D();else for(d=0;d<b.length;d++)c=b[d],W.push(c),wa(c)};xa=function(){for(var a;E[0]&&("loaded"==E[0].readyState||"complete"==E[0].readyState);)a=E.shift(),a.onreadystatechange=null,C.parentNode.insertBefore(a,C),I()};wa=function(a){var b,d;b=("https:"===w.location.protocol?"https://":"http://")+"rules.quantcount.com/rules-"+a+".js";
|
||||
C=C||w.scripts[0];J++;d=w.createElement("script");"async"in d?(d.src=b,d.async=!1,d.onload=function(){y[a]=0;I()},d.onerror=function(){y[a]=1;I()},C.parentNode.insertBefore(d,C)):d.readyState?(y[a]=2,E.push(d),d.onreadystatechange=xa,d.src=b):(y[a]=4,I())};I=function(){J-=0<J?1:0;D()};za=function(){var a=!0,b,d,c;if(arguments.length){c=function(b){a?ha(b):p(b,!0)};for(b=0;b<arguments.length;b++)d=Y.call(arguments[b],0),d.splice(1,0,c),Aa.apply(null,d);a=!1;ja&&D()}};Aa=function(a,b){var d=[],c=[],
|
||||
f=b||p,h,r,n,k,m;if((h=Y.call(arguments,2))&&h.length){r=h[0]||Q;n=h[1];k=h[2];h=k.length;for(m=0;m<h;m++)d.push(!1),c.push(null);d={p:a,f:d,r:r,c:k,a:n,v:c};R(a)||W.push(a);Da.push(d);Ba(d,f)}};Ba=function(a,b){var d=a?a.c?a.c.length:0:0,c;for(c=0;c<d;c++)(function(d){var c,g;try{c=a.c[d][0],g=a.c[d].slice(1),g.splice(0,0,function(c){a.f[d]=!0;a.v[d]=c;fa(a,b)}),c.apply(null,g)}catch(n){a.f[d]=!0,a.v[d]=!1,fa(a,b)}})(c)};fa=function(a,b){var d=a.a,c=a.v,f=a.r||Q,h,l,n,k,m,e;(h=Q(a.f))&&(h=h&&f(c));
|
||||
if(h)for(c=0;c<d.length;c++)try{l=d[c][0];n=1<d[c].length?d[c].slice(1):[];n=n.concat(a.v);k=l.apply(null,n);m={qacct:a.p,event:"rule"};for(e in k)k.hasOwnProperty(e)&&"qacct"!==e&&(m[e]=k[e]);b(m)}catch(Fa){}};la=function(){return Z(0)!==Z(6)?1:0};Z=function(a){a=new Date(2E3,a,1,0,0,0,0);var b=a.toGMTString(),b=new Date(b.substring(0,b.lastIndexOf(" ")-1));return a-b};K=function(a){return a.replace(/\./g,"%2E").replace(/,/g,"%2C")};z="function"===typeof encodeURIComponent?encodeURIComponent:K;l=
|
||||
function(a){return"undefined"!=typeof a&&null!=a};aa=function(){return Math.round(2147483647*Math.random())};L=function(a){var b="",d=w.cookie,c;if(!d)return b;c=d.indexOf(a+"=");a=c+a.length+1;-1<c&&(b=d.indexOf(";",a),0>b&&(b=d.length),b=d.substring(a,b));return b};ma=function(){var a="",b=F(),d,c,f;if(1===U)return";fpan=u;fpa=";d=M(b);for(c=0;c<T.length;c++)if(T[c]===d)return";fpan=u;fpa=";d=new Date;c=L("__qca");if(0<c.length){try{f=+c.split("-")[2],338688E5<d-f&&(w.cookie=["__qca=",c,"; expires=",
|
||||
(new Date(f+338688E5)).toGMTString(),"; path=/; domain=",b].join(""))}catch(h){}a+=";fpan=0;fpa="+c}0===L("__qca").length&&(c="P0-"+aa()+"-"+d.getTime(),w.cookie=["__qca=",c,"; expires=",(new Date(d.getTime()+338688E5)).toGMTString(),"; path=/; domain=",b].join(""),c=L("__qca"),a=0<c.length?a+(";fpan=1;fpa="+c):a+";fpan=u;fpa=");return a};na=function(a){w.cookie=a+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/; domain="+F()};F=function(){var a,b,c,g;a=w.domain;"www."===a.substring(0,4)&&(a=a.substring(4,
|
||||
a.length));b=a.split(".");g=b.length;if(3>g)return a;c=b[g-1];return 3>c.length?a:a=b[g-2]+"."+c};ba=function(a,b){var c;for(c=0;c<b.length;c++)a^=b.charCodeAt(c),a+=(a<<1)+(a<<4)+(a<<7)+(a<<8)+(a<<24);return a};M=function(a){var b;b=ba(2166136261,a);a=ba(3386659096,a);return Math.round(Math.abs(b*a)/65536).toString(16)};O=function(a,b,d){var g="",f,h=null,r="webpage",n="load",k={},m,e;f=b?b.qacct||c._qacct:c._qacct;m=v[f];b?m&&(b=S(b,m)):b=m;f&&delete v[f];if(null!=b)for(e in b)k[e]=!0,b.hasOwnProperty(e)&&
|
||||
"string"===typeof e&&"string"===typeof b[e]&&("uid"===e||"uh"===e?(pa()||(h=M(b[e])),delete b[e]):"qacct"!==e&&(0<b[e].length?g+=";"+e+a+"="+z(b[e]):k[e]=!1,"media"===e&&(r=b[e]),"event"===e&&(n=b[e])));if("string"!==typeof f){if(!l(c._qacct)||0===c._qacct.length)return"";f=c._qacct}if(f&&(m=X[f]))for(e in m)"string"===typeof e&&m.hasOwnProperty(e)&&!k[e]&&(g+=";"+e+a+"="+z(m[e]),"media"===e&&(r=m[e]),"event"===e&&(n=m[e]));k=y[f];l(k)||(k=3);g+=";rf"+a+"="+k;"string"===typeof h&&(b.uh=h,g+=";uh"+
|
||||
a+"="+z(h));if("webpage"===r&&"load"===n){for(b=0;b<u.qpixelsent.length;b++)if(u.qpixelsent[b]===f&&!d)return"";u.qpixelsent.push(f)}"ad"===r&&(U=1);return";a"+a+"="+f+g};va=function(){var a=w.getElementsByTagName("meta"),b="",c,g,f,h;for(c=0;c<a.length;c++){f=a[c];if(1E3<=b.length)return b;l(f)&&l(f.attributes)&&l(f.attributes.property)&&l(f.attributes.property.value)&&l(f.content)&&(g=f.attributes.property.value,f=f.content,3<g.length&&"og:"===g.substring(0,3)&&(0<b.length&&(b+=","),h=80<f.length?
|
||||
80:f.length,b+=K(g.substring(3,g.length))+"."+K(f.substring(0,h))))}return z(b)};oa=function(a){return"object"===typeof a?["p","approved"===a.consent?"a":"d","asserted"===a.source?"e":"i"].join(""):""};pa=function(){var a=!1;l(c.external)&&(a=c.external,a="function"===typeof a.InPrivateFilteringEnabled&&!0===a.InPrivateFilteringEnabled());return a||"1"==B.doNotTrack||"yes"===B.doNotTrack||"1"==B.msDoNotTrack};p=function(a,b){var d="function"===typeof encodeURIComponent?"n":"s",g=aa(),f="",h="",r=
|
||||
"",n="",k="",m="u",e="1",q=0,t=[],p,v,x,y;U=0;l(u.qpixelsent)||(u.qpixelsent=[]);if(l(a))for(p in a)if("string"==typeof a[p]){h=O("",a,b);break}else"object"==typeof a[p]&&null!=a[p]&&(++q,h+=O("."+q,a[p],b));else"string"===typeof _qacct&&(h=O("",null,b));0!==h.length&&(q=B.cookieEnabled?"1":"0","undefined"!=typeof B.javaEnabled&&(m=B.javaEnabled()?"1":"0"),l(c._qmeta)&&(r=";m="+z(c._qmeta),c._qmeta=null),self.screen&&(f=screen.width+"x"+screen.height+"x"+screen.colorDepth),v=new Date,x=la(),y=ma(),
|
||||
c.location&&c.location.href&&(n=z(c.location.href)),w&&w.referrer&&(k=z(w.referrer)),c.self===c.top&&(e="0"),p=va(),t.push("/pixel;r="+g+h+y+";ns="+e+";ce="+q),t.push(";je="+m+";sr="+f+";enc="+d+";dst="+x+";et="+v.getTime()+";tzo="+v.getTimezoneOffset()+r+";ref="+k+";url="+n+";ogl="+p),V.push(t),A())};ua=function(a){var b=new Image;a=[c.location.protocol,"//pixel.",qa(t)?"quantserve.com":"quantcount.com",a[0],";cm=",oa(t),a[1]].join("");b.alt="";b.src=a;b.onload=function(){b&&"number"==typeof b.width&&
|
||||
3===b.width&&na("__qca")}};A=function(){if(t)for(;V.length;)ua(V.shift());else ta()};qa=function(a){return!0===a||1===a||1===a||l(a)&&"approved"===a.consent?!0:!1};ta=function(){if(!l(t)){if(c.top===c.self){if("object"===typeof PrivacyManagerAPI&&"function"===typeof PrivacyManagerAPI.callApi){ra("getConsent","advertising");return}}else if(c.postMessage&&"object"===typeof JSON){sa("getConsent","advertising");return}t=1}A()};ra=function(a,b){t=PrivacyManagerAPI.callApi(a,"quantserve.com",F(),"truste.com",
|
||||
b);A()};sa=function(a,b){var d={PrivacyManagerAPI:{timestamp:(new Date).getTime(),action:a,self:"quantserve.com",domain:F(),authority:"truste.com",type:b}};if(c.addEventListener)c.addEventListener("message",G,!1);else if(c.attachEvent)c.attachEvent("onmessage",G);else{t=!0;A();return}try{c.top.postMessage(JSON.stringify(d),"*")}catch(g){}ka=setTimeout(function(){l(t)||(t=!0,A())},25)};G=function(a){var b=null;if(a.source===window.top){try{b="object"===typeof JSON&&JSON.parse(a.data)}catch(d){}b&&
|
||||
"object"===typeof b.PrivacyManagerAPI&&(clearTimeout(ka),c.removeEventListener?window.removeEventListener("message",G,!1):c.detachEvent&&window.detachEvent("onmessage",G),t=b.PrivacyManagerAPI,A())}};ia=function(){var a=arguments,b,c;q([].slice.call(a));for(c=0;c<a.length;c++)b=a[c],p(b);x.length?H(x.slice(0)):D()};q=function(a){var b=ea(a);if("array"===b)for(b=0;b<a.length;b++)q(a[b]);else"object"===b&&ga(a.qacct||c._qacct)};ya=function(){var a;c._qevents.length||c.ezt.length||"undefined"===typeof _qacct||
|
||||
p({qacct:c._qacct});if(!u.evts){for(a in c._qevents)c._qevents.hasOwnProperty(a)&&p(c._qevents[a]);for(a in c.ezt)c.ezt.hasOwnProperty(a)&&p(c.ezt[a]);c._qevents={push:ia};c.ezt.push=function(){var a=arguments,d;if(l(c.queueManager))for(d=0;d<a.length;d++)c.queueManager.push(a[d]);else ia.apply(this,arguments)};u.evts=1}};N=function(){var a;l(c._qevents)||(c._qevents=[]);l(c.ezt)||(c.ezt=[]);c._qoptions&&(a=P(c._qoptions),q(c._qoptions),c._qevents.push(a),c._qoptions=null);c.qcdata&&(a=P(c.qcdata),
|
||||
q(c.qcdata),c._qevents.push(a),c.qcdata=null);c.smarttagdata&&(a=P(c.smarttagdata),q(c.smarttagdata),c._qevents.push(a),c.smarttagdata=null);u.evts||(c._qevents.push=function(){q([].slice.call(arguments));H(x.slice(0));return[].push.apply(c._qevents,arguments)},c.ezt.push=function(){q([].slice.call(arguments));H(x.slice(0));return[].push.apply(c.ezt,arguments)});q(c.ezt);q(c._qevents);q({qacct:c._qacct});c._qoptions=null;x.length?H(x.slice(0)):D();ja=!0};c.quantserve=c.quantserve||N;u.quantserve=
|
||||
N;return u}(window);quantserve();
|
||||
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
Quantcast measurement tag
|
||||
Copyright (c) 2008-2017, Quantcast Corp.
|
||||
*/
|
||||
(function(e,g,f){try{__qc("defaults",e,{labels:"_fp.event.Default"})}catch(k){}var h=function(a,b,c){return a?"nc"===a?!b||!c||0>b.indexOf(c):"eq"===a?b===c:"sw"===a?0===b.indexOf(c):"ew"===a?(a=b.length-c.length,b=b.lastIndexOf(c,a),-1!==b&&b===a):"c"===a?0<=b.indexOf(c):!1:!1};__qc("rules",[e,null,[[function(a){return"array"==={}.toString.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase()?{labels:a.join(",")}:{labels:""+a}},"_fp.event.Homepage"]],[[function(a,b,c){var d;if(g.top===g.self)d=f.location.pathname;
|
||||
else{d=f.referrer;var e=f.createElement("a");e.href=d;d=e.pathname}h(b,d,c)?a(d):a(!1)},"eq","/"]]])})("p-d1D4hSPec1QW4",window,document);
|
||||
@@ -0,0 +1 @@
|
||||
define("ace/theme/monokai",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai {background-color: #272822;color: #F8F8F2}.ace-monokai .ace_cursor {color: #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta.ace_tag,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_punctuation,.ace-monokai .ace_punctuation.ace_tag {color: #fff}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_entity.ace_other.ace_attribute-name,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)})
|
||||
@@ -0,0 +1 @@
|
||||
(function(){function c(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1)return c_start=c_start+a.length+1,c_end=document.cookie.indexOf(";",c_start),c_end==-1&&(c_end=document.cookie.length),unescape(document.cookie.substring(c_start,c_end))}return""}function d(a,b,d){var e=document.location.host.toLowerCase().split(":")[0],f=e.split("."),g=[];if(f.length==1){var h=new Date;h.setDate(h.getDate()+d),document.cookie=a+"="+escape(b)+(d==null?"":";expires="+h.toUTCString())+";path=/"}else for(var i=f.length-1;i>=0;i--){g.push(f[i]);var j="."+g.slice().reverse().join("."),h=new Date;h.setDate(h.getDate()+d),document.cookie=a+"="+escape(b)+(d==null?"":";expires="+h.toUTCString())+";domain="+j+";path=/";if(c(a)==b)break}}function e(a){return f(a)==="function"}function f(a){return a==null?String(a):b[Object.prototype.toString.call(a)]||"object"}function g(b){var c=[],d=function(a,b){b=e(b)?b():b,c[c.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};for(var f in b)b.hasOwnProperty(f)&&h(f,b[f],d);return c.join("&").replace(a,"+")}function h(a,b,c){if(b!=null&&typeof b=="object")for(var d in b)b.hasOwnProperty(d)&&h(a+"["+d+"]",b[d]==null?"":b[d],c);else c(a,b)}function i(){var a=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}function j(){var a=c(_cio.cookieNamespace);return a||(a=i(),d(_cio.cookieNamespace,a,1)),a}function k(){return c(_cio.cookieNamespace+"id")}function l(a,b){var c,d,e=document.getElementById("cio-tracker");return e&&(d=e.getAttribute("data-site-id"),c=e.src.replace("assets.customer.io","track.customer.io"),c=c.replace("/assets/track.js","/events/"+a+".gif"),c=c.replace("/assets_dev/track.js","/events/"+a+".gif"),c=c.replace(/\/events\/.*\.gif/,"/events/"+a+".gif"),c=c.replace(/^(http|https):/,""),c=c.replace(/^\/\//,""),b.site_id=d,b.timestamp=(new Date).getTime(),c+="?"+g(b)),"https://"+c}function m(a,b){b.s=j(),b.c=k();var c=new Image;c.src=l(a,b),_cio.images.push(c)}function n(a,b){_cio.pageHasLoaded?m(a,b):setTimeout(function(){n(a,b)},50)}var a=/%20/g,b={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"};if(f(_cio)=="array"){var o=_cio.slice(0);_cio={images:[],pageHasLoaded:!1,cookieNamespace:"_cio",load:function(){_cio.pageHasLoaded=!0},push:function(a){var b=a.shift();_cio[b].apply(this,a)},identify:function(a){var b=c(_cio.cookieNamespace+"id"),e=a.id||a.id_secure;b&&b!=e&&(guid=i(),d(_cio.cookieNamespace,guid,1)),d(_cio.cookieNamespace+"id",e,1),n("identify",{user:a})},sidentify:function(a){a._secure=!0,_cio.identify(a)},track:function(a,b){n("event",{name:a,data:b||{}})},page:function(a,b){n("page",{name:a,data:b||{}})},cookie:function(a){_cio.cookieNamespace=a}},function(){var a={width:window.innerWidth,height:window.innerHeight};document.referrer&&document.referrer!=""&&(a.referrer=document.referrer),_cio.page(document.location.href,a)}();for(var p=0;p<o.length;p++)_cio.push(o[p]);document.readyState==="complete"?_cio.load():window.addEventListener?window.addEventListener("load",_cio.load,!1):window.attachEvent?window.attachEvent("onload",_cio.load):_cio.load()}})();
|
||||
@@ -0,0 +1,10 @@
|
||||
# webAduc
|
||||
|
||||
webAduc is a web tool aimed to become one one the best way to administer an Active Directory server.
|
||||
|
||||
Keys :
|
||||
. full Web
|
||||
. scalable
|
||||
. extensible
|
||||
. plugin
|
||||
. opensource
|
||||
@@ -0,0 +1 @@
|
||||
Documentation API
|
||||
@@ -0,0 +1 @@
|
||||
Placer la documentation dans ce répertoire
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
// Exemple en Selenium2
|
||||
|
||||
class monTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setHost('localhost');
|
||||
$this->setPort(4444);
|
||||
$this->setBrowserUrl('http://stagiaire20.testing.local');
|
||||
$this->setBrowser('firefox');
|
||||
}
|
||||
|
||||
public function testLoginOK()
|
||||
{
|
||||
$this->url('http://stagiaire20.testing.local/');
|
||||
|
||||
$this->byId("Login")->value("Admin");
|
||||
$this->byId("Password")->value("Passwd");
|
||||
//$this->byId("formAction")->submit();
|
||||
$this->byId("Connect")->click();
|
||||
// Le bouton 'Logout' n'existe que si on est connecté !
|
||||
$this->byId("Logout")->click();
|
||||
}
|
||||
|
||||
public function testLoginFormOK()
|
||||
{
|
||||
$this->url('http://stagiaire20.testing.local/');
|
||||
|
||||
$this->assertEquals('require',$this->byId("Login")->getAttribute("require"));
|
||||
$this->assertEquals('32',$this->byId("Login")->getAttribute("size"));
|
||||
$this->byId("Password")->getAttribute("require");
|
||||
$this->byId("Login")->getAttribute("size");
|
||||
}
|
||||
|
||||
/** generate screenshot if any test has failed */
|
||||
protected function tearDown()
|
||||
{
|
||||
if( $this->hasFailed() ) {
|
||||
$date = "screenshot_" . date('Y-m-d-H-i-s') . ".png" ;
|
||||
$this->webdriver->getScreenshotAndSaveToFile( $date );
|
||||
}
|
||||
//$this->close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Placer les tests fonctionnels dans ce répertoire
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
require_once('www/src/class/userClass.php');
|
||||
|
||||
// Test de la class userClass
|
||||
|
||||
class unitLoginTestextendsPHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testValidUser()
|
||||
{
|
||||
// Create a stub for the SomeClass class.
|
||||
$stub=$this->getMockBuilder('db')->setMethods(array('dbQuery','dbNumRows'))->disableOriginalConstructor()->getMock();
|
||||
// Configure the stub.
|
||||
$stub->expects($this->any())->method('dbQuery')->with($this->equalTo("SELECT * FROM Users WHERE login='user' AND passwd='".md5('password')."';"))->will($this->returnValue('TRUE'));
|
||||
$stub->expects($this->any())->method('dbNumRows')->will($this->returnValue(1));
|
||||
$user=new classUser($stub);
|
||||
$this->assertTrue($user->userIsValid("user","password"));
|
||||
}
|
||||
|
||||
public function testNotValidUser()
|
||||
{
|
||||
// Create a stub for the SomeClass class.
|
||||
$stub=$this->getMockBuilder('db')->setMethods(array('dbQuery','dbNumRows'))->disableOriginalConstructor()->getMock();
|
||||
// Configure the stub.
|
||||
$stub->expects($this->any())->method('dbQuery')->with($this->equalTo("SELECT * FROM Users WHERE login='user' AND passwd='".md5('pwd')."';"))->will($this->returnValue('TRUE'));
|
||||
$stub->expects($this->any())->method('dbNumRows')->will($this->returnValue(0));
|
||||
$user=new classUser($stub);
|
||||
$this->assertFalse($user->userIsValid("user","pwd"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Placer les tests unitaires dans ce répertoire
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
|
||||
bootstrap="www/src/lib/autoload.php"
|
||||
backupGlobals="false"
|
||||
beStrictAboutCoversAnnotation="true"
|
||||
beStrictAboutOutputDuringTests="true"
|
||||
beStrictAboutTestsThatDoNotTestAnything="true"
|
||||
beStrictAboutTodoAnnotatedTests="true"
|
||||
verbose="true">
|
||||
<testsuite>
|
||||
<directory suffix="Test.php">tests/unit</directory>
|
||||
</testsuite>
|
||||
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">www</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Exemple de test unitaire
|
||||
*/
|
||||
// Call MyClassTest::main() if this source file is executed directly.
|
||||
if (!defined('PHPUnit_MAIN_METHOD')) {
|
||||
define('PHPUnit_MAIN_METHOD', 'MyClassTest::main');
|
||||
}
|
||||
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
|
||||
require_once 'MyClass.php';
|
||||
|
||||
/**
|
||||
* Test class for MyClass.
|
||||
* Generated by PHPUnit on 2007-08-11 at 20:01:00.
|
||||
*/
|
||||
class MyClassTest extends PHPUnit_Framework_TestCase {
|
||||
/**
|
||||
* Runs the test methods of this class.
|
||||
*
|
||||
* @access public
|
||||
* @static
|
||||
*/
|
||||
public static function main() {
|
||||
require_once 'PHPUnit/TextUI/TestRunner.php';
|
||||
|
||||
$suite = new PHPUnit_Framework_TestSuite('MyClassTest');
|
||||
$result = PHPUnit_TextUI_TestRunner::run($suite);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
protected function setUp() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
protected function tearDown() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Implement testMyMethod().
|
||||
*/
|
||||
public function testMyMethod() {
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Call MyClassTest::main() if this source file is executed directly.
|
||||
if (PHPUnit_MAIN_METHOD == 'MyClassTest::main') {
|
||||
MyClassTest::main();
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="TestDepot" default="ci" basedir=".">
|
||||
<property name="source" value="www" />
|
||||
<property name="srvWeb" value="10.29.200.48" />
|
||||
<property name="pathWeb" value="/var/www/phpAduc" />
|
||||
|
||||
<target name="ci"
|
||||
description="Tâche principale d'intégration continue"
|
||||
depends="clean,qa"
|
||||
/>
|
||||
|
||||
<target name="clean" description="Vide les répertoires d'artefacts">
|
||||
|
||||
<delete dir="${project.basedir}/build/api" />
|
||||
<delete dir="${project.basedir}/build/code-browser" />
|
||||
<delete dir="${project.basedir}/build/coverage" />
|
||||
<delete dir="${project.basedir}/build/logs" />
|
||||
<delete dir="${project.basedir}/build/pdepend" />
|
||||
|
||||
<mkdir dir="${project.basedir}/build/api" />
|
||||
<mkdir dir="${project.basedir}/build/code-browser" />
|
||||
<mkdir dir="${project.basedir}/build/coverage" />
|
||||
<mkdir dir="${project.basedir}/build/logs" />
|
||||
<mkdir dir="${project.basedir}/build/pdepend" />
|
||||
</target>
|
||||
|
||||
<target name="qa" description="Lance les outils d'analyse">
|
||||
<!-- <phingcall target="pdepend" />
|
||||
<phingcall target="phpmd" />
|
||||
<phingcall target="phpcpd" />
|
||||
<phingcall target="phploc" />
|
||||
<phingcall target="phpcs" />
|
||||
<phingcall target="phpdoc" /> -->
|
||||
<phingcall target="phpunit" />
|
||||
<!-- <phingcall target="phpcb" /> -->
|
||||
<phingcall target="publish"/>
|
||||
<phingcall target="phpselenium" />
|
||||
</target>
|
||||
|
||||
<target name="pdepend">
|
||||
<phpdepend file="${project.basedir}/${source}/" excludeDirectories="${project.basedir}/${source}/vendor/">
|
||||
<logger type="jdepend-xml" outfile="${project.basedir}/build/logs/jdepend.xml" />
|
||||
<logger type="jdepend-chart" outfile="${project.basedir}/build/pdepend/dependencies.svg" />
|
||||
<logger type="overview-pyramid" outfile="${project.basedir}/build/pdepend/overview-pyramid.svg" />
|
||||
</phpdepend>
|
||||
</target>
|
||||
|
||||
<target name="phpmd">
|
||||
<exec logoutput="true" dir="${project.basedir}" command="phpmd '${project.basedir}/${source}/' xml cleancode,codesize,controversial,design,naming,unusedcode --exclude '${project.basedir}/${source}/vendor/' --reportfile '${project.basedir}/build/logs/phpmd.xml'" escape="false" />
|
||||
</target>
|
||||
|
||||
<target name="phpcpd">
|
||||
<exec logoutput="true" dir="${project.basedir}" command="phpcpd --log-pmd '${project.basedir}/build/logs/pmd-cpd.xml' --exclude 'vendor' '${project.basedir}/${source}/' " escape="false" />
|
||||
</target>
|
||||
|
||||
<target name="phploc">
|
||||
<exec logoutput="true" dir="${project.basedir}" command="phploc --log-csv '${project.basedir}/build/logs/phploc.csv' --exclude='vendor' '${project.basedir}/${source}/'" escape="false" />
|
||||
</target>
|
||||
|
||||
<target name="phpcs">
|
||||
<exec logoutput="true" dir="${project.basedir}" command="phpcs --report=checkstyle --standard=PSR1 --ignore=${source}/vendor --report-file=build/logs/checkstyle.xml ${source}" escape="false" />
|
||||
</target>
|
||||
|
||||
<target name="phpdoc">
|
||||
<exec logoutput="true" dir="${project.basedir}" command="phpdoc -t '${project.basedir}/build/api' -d '${project.basedir}/${source}' --ignore 'vendor/*'" escape="false" />
|
||||
</target>
|
||||
|
||||
<target name="phpunit">
|
||||
<exec logoutput="true" command="phpunit --coverage-clover 'build/logs/clover.xml' --log-junit 'build/logs/junit/unit.xml' tests/unit" escape="false" />
|
||||
</target>
|
||||
|
||||
<target name="phpselenium">
|
||||
<exec logoutput="true" dir="${project.basedir}" command="phpunit --log-junit build/logs/junit/func.xml tests/func" escape="false" />
|
||||
</target>
|
||||
|
||||
<target name="phpcb" >
|
||||
<exec logoutput="true" dir="${project.basedir}" command="phpcb --source 'www/' --output 'build/code-browser' --ignore 'www/vendor/'" escape="false" />
|
||||
</target>
|
||||
|
||||
<target name="publish">
|
||||
<echo msg="Suppression du cache" />
|
||||
<exec logoutput="true" command='ssh git@${srvWeb} "bash -c \"rm -f ${pathWeb}/templates_c/*\" "' />
|
||||
<echo msg="Copie des fichiers sur le serveur web" />
|
||||
<exec logoutput="true" command='rsync -rltv ${project.basedir}/${source}/* git@${srvWeb}:${pathWeb}' escape="false" />
|
||||
</target>
|
||||
</project>
|
||||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>jstree basic demos</title>
|
||||
<style>
|
||||
html { margin:0; padding:0; font-size:62.5%; }
|
||||
body { max-width:800px; min-width:300px; margin:0 auto; padding:20px 10px; font-size:14px; font-size:1.4em; }
|
||||
h1 { font-size:1.8em; }
|
||||
.demo { overflow:auto; border:1px solid silver; min-height:100px; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="./../../dist/themes/default/style.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>HTML demo</h1>
|
||||
<div id="html" class="demo">
|
||||
<ul>
|
||||
<li data-jstree='{ "opened" : true }'>Root node
|
||||
<ul>
|
||||
<li data-jstree='{ "selected" : true }'>Child node 1</li>
|
||||
<li>Child node 2</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h1>Inline data demo</h1>
|
||||
<div id="data" class="demo"></div>
|
||||
|
||||
<h1>Data format demo</h1>
|
||||
<div id="frmt" class="demo"></div>
|
||||
|
||||
<h1>AJAX demo</h1>
|
||||
<div id="ajax" class="demo"></div>
|
||||
|
||||
<h1>Lazy loading demo</h1>
|
||||
<div id="lazy" class="demo"></div>
|
||||
|
||||
<h1>Callback function data demo</h1>
|
||||
<div id="clbk" class="demo"></div>
|
||||
|
||||
<h1>Interaction and events demo</h1>
|
||||
<button id="evts_button">select node with id 1</button> <em>either click the button or a node in the tree</em>
|
||||
<div id="evts" class="demo"></div>
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
|
||||
<script src="./../../dist/jstree.min.js"></script>
|
||||
|
||||
<script>
|
||||
// html demo
|
||||
$('#html').jstree();
|
||||
|
||||
// inline data demo
|
||||
$('#data').jstree({
|
||||
'core' : {
|
||||
'data' : [
|
||||
{ "text" : "Root node", "children" : [
|
||||
{ "text" : "Child node 1" },
|
||||
{ "text" : "Child node 2" }
|
||||
]}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
// data format demo
|
||||
$('#frmt').jstree({
|
||||
'core' : {
|
||||
'data' : [
|
||||
{
|
||||
"text" : "Root node",
|
||||
"state" : { "opened" : true },
|
||||
"children" : [
|
||||
{
|
||||
"text" : "Child node 1",
|
||||
"state" : { "selected" : true },
|
||||
"icon" : "jstree-file"
|
||||
},
|
||||
{ "text" : "Child node 2", "state" : { "disabled" : true } }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
// ajax demo
|
||||
$('#ajax').jstree({
|
||||
'core' : {
|
||||
'data' : {
|
||||
"url" : "./root.json",
|
||||
"dataType" : "json" // needed only if you do not supply JSON headers
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// lazy demo
|
||||
$('#lazy').jstree({
|
||||
'core' : {
|
||||
'data' : {
|
||||
"url" : "//www.jstree.com/fiddle/?lazy",
|
||||
"data" : function (node) {
|
||||
return { "id" : node.id };
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// data from callback
|
||||
$('#clbk').jstree({
|
||||
'core' : {
|
||||
'data' : function (node, cb) {
|
||||
if(node.id === "#") {
|
||||
cb([{"text" : "Root", "id" : "1", "children" : true}]);
|
||||
}
|
||||
else {
|
||||
cb(["Child"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// interaction and events
|
||||
$('#evts_button').on("click", function () {
|
||||
var instance = $('#evts').jstree(true);
|
||||
instance.deselect_all();
|
||||
instance.select_node('1');
|
||||
});
|
||||
$('#evts')
|
||||
.on("changed.jstree", function (e, data) {
|
||||
if(data.selected.length) {
|
||||
alert('The selected node is: ' + data.instance.get_node(data.selected[0]).text);
|
||||
}
|
||||
})
|
||||
.jstree({
|
||||
'core' : {
|
||||
'multiple' : false,
|
||||
'data' : [
|
||||
{ "text" : "Root node", "children" : [
|
||||
{ "text" : "Child node 1", "id" : 1 },
|
||||
{ "text" : "Child node 2" }
|
||||
]}
|
||||
]
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
[{"id":1,"text":"Root node","children":[{"id":2,"text":"Child node 1"},{"id":3,"text":"Child node 2"}]}]
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "snoel/phpaduc",
|
||||
"description": "Web manager for samba AD domain",
|
||||
"type": "project",
|
||||
"license": "GNU/Gpl",
|
||||
"authors": [{
|
||||
"name": "Serge NOEL",
|
||||
"email": "serge.noel@net6a.com"
|
||||
}],
|
||||
"require": {
|
||||
"php": "7.*",
|
||||
"components/jquery": "3.*",
|
||||
"components/jqueryui": "1.*",
|
||||
"vakata/jstree": "3.*",
|
||||
"twbs/bootstrap": "4.*",
|
||||
"smarty/smarty": "3.*",
|
||||
"adldap2/adldap2": "10.*"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,858 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "7e3aa01c6b3577f1bd7b3c4f03e0093a",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adldap2/adldap2",
|
||||
"version": "v10.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Adldap2/Adldap2.git",
|
||||
"reference": "936a4e2eb925d005198f716a75bb78068c4de94d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Adldap2/Adldap2/zipball/936a4e2eb925d005198f716a75bb78068c4de94d",
|
||||
"reference": "936a4e2eb925d005198f716a75bb78068c4de94d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-ldap": "*",
|
||||
"illuminate/contracts": "~5.0|~6.0|~7.0|~8.0",
|
||||
"php": ">=7.0",
|
||||
"psr/log": "~1.0",
|
||||
"psr/simple-cache": "~1.0",
|
||||
"tightenco/collect": "~5.0|~6.0|~7.0|~8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "~1.0",
|
||||
"phpunit/phpunit": "~6.0|~7.0|~8.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-fileinfo": "fileinfo is required when retrieving user encoded thumbnails"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Adldap\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Steve Bauman",
|
||||
"email": "steven_bauman@outlook.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "A PHP LDAP Package for humans.",
|
||||
"keywords": [
|
||||
"active directory",
|
||||
"ad",
|
||||
"adLDAP",
|
||||
"adldap2",
|
||||
"directory",
|
||||
"ldap",
|
||||
"windows"
|
||||
],
|
||||
"time": "2020-09-09T12:55:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "components/jquery",
|
||||
"version": "3.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/components/jquery.git",
|
||||
"reference": "b33e8f0f9a1cb2ae390cf05d766a900b53d2125b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/components/jquery/zipball/b33e8f0f9a1cb2ae390cf05d766a900b53d2125b",
|
||||
"reference": "b33e8f0f9a1cb2ae390cf05d766a900b53d2125b",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "component",
|
||||
"extra": {
|
||||
"component": {
|
||||
"scripts": [
|
||||
"jquery.js"
|
||||
],
|
||||
"files": [
|
||||
"jquery.min.js",
|
||||
"jquery.min.map",
|
||||
"jquery.slim.js",
|
||||
"jquery.slim.min.js",
|
||||
"jquery.slim.min.map"
|
||||
]
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "JS Foundation and other contributors"
|
||||
}
|
||||
],
|
||||
"description": "jQuery JavaScript Library",
|
||||
"homepage": "http://jquery.com",
|
||||
"time": "2020-05-05T13:21:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "components/jqueryui",
|
||||
"version": "1.12.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/components/jqueryui.git",
|
||||
"reference": "44ecf3794cc56b65954cc19737234a3119d036cc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/components/jqueryui/zipball/44ecf3794cc56b65954cc19737234a3119d036cc",
|
||||
"reference": "44ecf3794cc56b65954cc19737234a3119d036cc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"components/jquery": ">=1.6"
|
||||
},
|
||||
"type": "component",
|
||||
"extra": {
|
||||
"component": {
|
||||
"name": "jquery-ui",
|
||||
"scripts": [
|
||||
"jquery-ui.js"
|
||||
],
|
||||
"files": [
|
||||
"ui/**",
|
||||
"themes/**",
|
||||
"jquery-ui.min.js"
|
||||
],
|
||||
"shim": {
|
||||
"deps": [
|
||||
"jquery"
|
||||
],
|
||||
"exports": "jQuery"
|
||||
}
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "jQuery UI Team",
|
||||
"homepage": "http://jqueryui.com/about"
|
||||
},
|
||||
{
|
||||
"name": "Joern Zaefferer",
|
||||
"email": "joern.zaefferer@gmail.com",
|
||||
"homepage": "http://bassistance.de"
|
||||
},
|
||||
{
|
||||
"name": "Scott Gonzalez",
|
||||
"email": "scott.gonzalez@gmail.com",
|
||||
"homepage": "http://scottgonzalez.com"
|
||||
},
|
||||
{
|
||||
"name": "Kris Borchers",
|
||||
"email": "kris.borchers@gmail.com",
|
||||
"homepage": "http://krisborchers.com"
|
||||
},
|
||||
{
|
||||
"name": "Mike Sherov",
|
||||
"email": "mike.sherov@gmail.com",
|
||||
"homepage": "http://mike.sherov.com"
|
||||
},
|
||||
{
|
||||
"name": "TJ VanToll",
|
||||
"email": "tj.vantoll@gmail.com",
|
||||
"homepage": "http://tjvantoll.com"
|
||||
},
|
||||
{
|
||||
"name": "Corey Frang",
|
||||
"email": "gnarf37@gmail.com",
|
||||
"homepage": "http://gnarf.net"
|
||||
},
|
||||
{
|
||||
"name": "Felix Nagel",
|
||||
"email": "info@felixnagel.com",
|
||||
"homepage": "http://www.felixnagel.com"
|
||||
}
|
||||
],
|
||||
"description": "jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.",
|
||||
"time": "2016-09-16T05:47:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/contracts",
|
||||
"version": "v8.15.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/contracts.git",
|
||||
"reference": "d9e6a156efb8332dcce427b7d1ccd2706609bfa5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/contracts/zipball/d9e6a156efb8332dcce427b7d1ccd2706609bfa5",
|
||||
"reference": "d9e6a156efb8332dcce427b7d1ccd2706609bfa5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.3|^8.0",
|
||||
"psr/container": "^1.0",
|
||||
"psr/simple-cache": "^1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Illuminate\\Contracts\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "The Illuminate Contracts package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"time": "2020-11-10T15:48:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/container.git",
|
||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Container\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common Container Interface (PHP FIG PSR-11)",
|
||||
"homepage": "https://github.com/php-fig/container",
|
||||
"keywords": [
|
||||
"PSR-11",
|
||||
"container",
|
||||
"container-interface",
|
||||
"container-interop",
|
||||
"psr"
|
||||
],
|
||||
"time": "2017-02-14T16:28:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Log\\": "Psr/Log/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for logging libraries",
|
||||
"homepage": "https://github.com/php-fig/log",
|
||||
"keywords": [
|
||||
"log",
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2020-03-23T09:12:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/simple-cache",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/simple-cache.git",
|
||||
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\SimpleCache\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interfaces for simple caching",
|
||||
"keywords": [
|
||||
"cache",
|
||||
"caching",
|
||||
"psr",
|
||||
"psr-16",
|
||||
"simple-cache"
|
||||
],
|
||||
"time": "2017-10-23T01:57:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "smarty/smarty",
|
||||
"version": "v3.1.36",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/smarty-php/smarty.git",
|
||||
"reference": "fd148f7ade295014fff77f89ee3d5b20d9d55451"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/fd148f7ade295014fff77f89ee3d5b20d9d55451",
|
||||
"reference": "fd148f7ade295014fff77f89ee3d5b20d9d55451",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "6.4.1",
|
||||
"smarty/smarty-lexer": "^3.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"libs/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Monte Ohrt",
|
||||
"email": "monte@ohrt.com"
|
||||
},
|
||||
{
|
||||
"name": "Uwe Tews",
|
||||
"email": "uwe.tews@googlemail.com"
|
||||
},
|
||||
{
|
||||
"name": "Rodney Rehm",
|
||||
"email": "rodney.rehm@medialize.de"
|
||||
}
|
||||
],
|
||||
"description": "Smarty - the compiling PHP template engine",
|
||||
"homepage": "http://www.smarty.net",
|
||||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2020-04-14T14:44:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.20.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531",
|
||||
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "For best performance"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.20-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Mbstring\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for the Mbstring extension",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"mbstring",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-23T14:02:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.20.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
|
||||
"reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.20-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php80\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ion Bazan",
|
||||
"email": "ion.bazan@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-23T14:02:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v5.1.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "4e13f3fcefb1fcaaa5efb5403581406f4e840b9a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/4e13f3fcefb1fcaaa5efb5403581406f4e840b9a",
|
||||
"reference": "4e13f3fcefb1fcaaa5efb5403581406f4e840b9a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php80": "^1.15"
|
||||
},
|
||||
"conflict": {
|
||||
"phpunit/phpunit": "<5.4.3",
|
||||
"symfony/console": "<4.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-iconv": "*",
|
||||
"symfony/console": "^4.4|^5.0",
|
||||
"symfony/process": "^4.4|^5.0",
|
||||
"twig/twig": "^2.4|^3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
|
||||
"ext-intl": "To show region name in time zone dump",
|
||||
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
|
||||
},
|
||||
"bin": [
|
||||
"Resources/bin/var-dump-server"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"Resources/functions/dump.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\VarDumper\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony mechanism for exploring and dumping PHP variables",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"debug",
|
||||
"dump"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-27T10:11:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tightenco/collect",
|
||||
"version": "v8.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tighten/collect.git",
|
||||
"reference": "8f79c602c872afd7c9371e193d6aa4ed13e97661"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/tighten/collect/zipball/8f79c602c872afd7c9371e193d6aa4ed13e97661",
|
||||
"reference": "8f79c602c872afd7c9371e193d6aa4ed13e97661",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2",
|
||||
"symfony/var-dumper": "^3.4 || ^4.0 || ^5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.0",
|
||||
"nesbot/carbon": "^2.23.0",
|
||||
"phpunit/phpunit": "^8.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/Collect/Support/helpers.php",
|
||||
"src/Collect/Support/alias.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Tightenco\\Collect\\": "src/Collect"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylorotwell@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Collect - Illuminate Collections as a separate package.",
|
||||
"keywords": [
|
||||
"collection",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2020-11-16T18:55:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "twbs/bootstrap",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/twbs/bootstrap.git",
|
||||
"reference": "a716fb03f965dc0846df479e14388b1b4b93d7ce"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/a716fb03f965dc0846df479e14388b1b4b93d7ce",
|
||||
"reference": "a716fb03f965dc0846df479e14388b1b4b93d7ce",
|
||||
"shasum": ""
|
||||
},
|
||||
"replace": {
|
||||
"twitter/bootstrap": "self.version"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.3.x-dev"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mark Otto",
|
||||
"email": "markdotto@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Jacob Thornton",
|
||||
"email": "jacobthornton@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
|
||||
"homepage": "https://getbootstrap.com/",
|
||||
"keywords": [
|
||||
"JS",
|
||||
"css",
|
||||
"framework",
|
||||
"front-end",
|
||||
"mobile-first",
|
||||
"responsive",
|
||||
"sass",
|
||||
"web"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://opencollective.com/bootstrap",
|
||||
"type": "open_collective"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-13T15:38:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vakata/jstree",
|
||||
"version": "3.3.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vakata/jstree.git",
|
||||
"reference": "6dce2271757dd0bd4cd0e941bd093c6678e98faf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vakata/jstree/zipball/6dce2271757dd0bd4cd0e941bd093c6678e98faf",
|
||||
"reference": "6dce2271757dd0bd4cd0e941bd093c6678e98faf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"components/jquery": ">=1.9.1"
|
||||
},
|
||||
"suggest": {
|
||||
"robloach/component-installer": "Allows installation of Components via Composer"
|
||||
},
|
||||
"type": "component",
|
||||
"extra": {
|
||||
"component": {
|
||||
"scripts": [
|
||||
"dist/jstree.js"
|
||||
],
|
||||
"styles": [
|
||||
"dist/themes/default/style.css"
|
||||
],
|
||||
"images": [
|
||||
"dist/themes/default/32px.png",
|
||||
"dist/themes/default/40px.png",
|
||||
"dist/themes/default/throbber.gif"
|
||||
],
|
||||
"files": [
|
||||
"dist/jstree.min.js",
|
||||
"dist/themes/default/style.min.css",
|
||||
"dist/themes/default/32px.png",
|
||||
"dist/themes/default/40px.png",
|
||||
"dist/themes/default/throbber.gif"
|
||||
]
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ivan Bozhanov",
|
||||
"email": "jstree@jstree.com"
|
||||
}
|
||||
],
|
||||
"description": "jsTree is jquery plugin, that provides interactive trees.",
|
||||
"homepage": "http://jstree.com",
|
||||
"time": "2020-06-16T11:17:46+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "7.*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "1.1.0"
|
||||
}
|
||||
|
After Width: | Height: | Size: 970 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1 @@
|
||||
deny from all
|
||||
@@ -0,0 +1 @@
|
||||
Conteneur
|
||||
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,450 @@
|
||||
<?php
|
||||
ini_set('open_basedir', dirname(__FILE__) . DIRECTORY_SEPARATOR);
|
||||
|
||||
class fs
|
||||
{
|
||||
protected $base = null;
|
||||
|
||||
protected function real($path) {
|
||||
$temp = realpath($path);
|
||||
if(!$temp) { throw new Exception('Path does not exist: ' . $path); }
|
||||
if($this->base && strlen($this->base)) {
|
||||
if(strpos($temp, $this->base) !== 0) { throw new Exception('Path is not inside base ('.$this->base.'): ' . $temp); }
|
||||
}
|
||||
return $temp;
|
||||
}
|
||||
protected function path($id) {
|
||||
$id = str_replace('/', DIRECTORY_SEPARATOR, $id);
|
||||
$id = trim($id, DIRECTORY_SEPARATOR);
|
||||
$id = $this->real($this->base . DIRECTORY_SEPARATOR . $id);
|
||||
return $id;
|
||||
}
|
||||
protected function id($path) {
|
||||
$path = $this->real($path);
|
||||
$path = substr($path, strlen($this->base));
|
||||
$path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
|
||||
$path = trim($path, '/');
|
||||
return strlen($path) ? $path : '/';
|
||||
}
|
||||
|
||||
public function __construct($base) {
|
||||
$this->base = $this->real($base);
|
||||
if(!$this->base) { throw new Exception('Base directory does not exist'); }
|
||||
}
|
||||
public function lst($id, $with_root = false) {
|
||||
$dir = $this->path($id);
|
||||
$lst = @scandir($dir);
|
||||
if(!$lst) { throw new Exception('Could not list path: ' . $dir); }
|
||||
$res = array();
|
||||
foreach($lst as $item) {
|
||||
if($item == '.' || $item == '..' || $item === null) { continue; }
|
||||
$tmp = preg_match('([^ a-zа-я-_0-9.]+)ui', $item);
|
||||
if($tmp === false || $tmp === 1) { continue; }
|
||||
if(is_dir($dir . DIRECTORY_SEPARATOR . $item)) {
|
||||
$res[] = array('text' => $item, 'children' => true, 'id' => $this->id($dir . DIRECTORY_SEPARATOR . $item), 'icon' => 'folder');
|
||||
}
|
||||
else {
|
||||
$res[] = array('text' => $item, 'children' => false, 'id' => $this->id($dir . DIRECTORY_SEPARATOR . $item), 'type' => 'file', 'icon' => 'file file-'.substr($item, strrpos($item,'.') + 1));
|
||||
}
|
||||
}
|
||||
if($with_root && $this->id($dir) === '/') {
|
||||
$res = array(array('text' => basename($this->base), 'children' => $res, 'id' => '/', 'icon'=>'folder', 'state' => array('opened' => true, 'disabled' => true)));
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
public function data($id) {
|
||||
if(strpos($id, ":")) {
|
||||
$id = array_map(array($this, 'id'), explode(':', $id));
|
||||
return array('type'=>'multiple', 'content'=> 'Multiple selected: ' . implode(' ', $id));
|
||||
}
|
||||
$dir = $this->path($id);
|
||||
if(is_dir($dir)) {
|
||||
return array('type'=>'folder', 'content'=> $id);
|
||||
}
|
||||
if(is_file($dir)) {
|
||||
$ext = strpos($dir, '.') !== FALSE ? substr($dir, strrpos($dir, '.') + 1) : '';
|
||||
$dat = array('type' => $ext, 'content' => '');
|
||||
switch($ext) {
|
||||
case 'txt':
|
||||
case 'text':
|
||||
case 'md':
|
||||
case 'js':
|
||||
case 'json':
|
||||
case 'css':
|
||||
case 'html':
|
||||
case 'htm':
|
||||
case 'xml':
|
||||
case 'c':
|
||||
case 'cpp':
|
||||
case 'h':
|
||||
case 'sql':
|
||||
case 'log':
|
||||
case 'py':
|
||||
case 'rb':
|
||||
case 'htaccess':
|
||||
case 'php':
|
||||
$dat['content'] = file_get_contents($dir);
|
||||
break;
|
||||
case 'jpg':
|
||||
case 'jpeg':
|
||||
case 'gif':
|
||||
case 'png':
|
||||
case 'bmp':
|
||||
$dat['content'] = 'data:'.finfo_file(finfo_open(FILEINFO_MIME_TYPE), $dir).';base64,'.base64_encode(file_get_contents($dir));
|
||||
break;
|
||||
default:
|
||||
$dat['content'] = 'File not recognized: '.$this->id($dir);
|
||||
break;
|
||||
}
|
||||
return $dat;
|
||||
}
|
||||
throw new Exception('Not a valid selection: ' . $dir);
|
||||
}
|
||||
public function create($id, $name, $mkdir = false) {
|
||||
$dir = $this->path($id);
|
||||
if(preg_match('([^ a-zа-я-_0-9.]+)ui', $name) || !strlen($name)) {
|
||||
throw new Exception('Invalid name: ' . $name);
|
||||
}
|
||||
if($mkdir) {
|
||||
mkdir($dir . DIRECTORY_SEPARATOR . $name);
|
||||
}
|
||||
else {
|
||||
file_put_contents($dir . DIRECTORY_SEPARATOR . $name, '');
|
||||
}
|
||||
return array('id' => $this->id($dir . DIRECTORY_SEPARATOR . $name));
|
||||
}
|
||||
public function rename($id, $name) {
|
||||
$dir = $this->path($id);
|
||||
if($dir === $this->base) {
|
||||
throw new Exception('Cannot rename root');
|
||||
}
|
||||
if(preg_match('([^ a-zа-я-_0-9.]+)ui', $name) || !strlen($name)) {
|
||||
throw new Exception('Invalid name: ' . $name);
|
||||
}
|
||||
$new = explode(DIRECTORY_SEPARATOR, $dir);
|
||||
array_pop($new);
|
||||
array_push($new, $name);
|
||||
$new = implode(DIRECTORY_SEPARATOR, $new);
|
||||
if($dir !== $new) {
|
||||
if(is_file($new) || is_dir($new)) { throw new Exception('Path already exists: ' . $new); }
|
||||
rename($dir, $new);
|
||||
}
|
||||
return array('id' => $this->id($new));
|
||||
}
|
||||
public function remove($id) {
|
||||
$dir = $this->path($id);
|
||||
if($dir === $this->base) {
|
||||
throw new Exception('Cannot remove root');
|
||||
}
|
||||
if(is_dir($dir)) {
|
||||
foreach(array_diff(scandir($dir), array(".", "..")) as $f) {
|
||||
$this->remove($this->id($dir . DIRECTORY_SEPARATOR . $f));
|
||||
}
|
||||
rmdir($dir);
|
||||
}
|
||||
if(is_file($dir)) {
|
||||
unlink($dir);
|
||||
}
|
||||
return array('status' => 'OK');
|
||||
}
|
||||
public function move($id, $par) {
|
||||
$dir = $this->path($id);
|
||||
$par = $this->path($par);
|
||||
$new = explode(DIRECTORY_SEPARATOR, $dir);
|
||||
$new = array_pop($new);
|
||||
$new = $par . DIRECTORY_SEPARATOR . $new;
|
||||
rename($dir, $new);
|
||||
return array('id' => $this->id($new));
|
||||
}
|
||||
public function copy($id, $par) {
|
||||
$dir = $this->path($id);
|
||||
$par = $this->path($par);
|
||||
$new = explode(DIRECTORY_SEPARATOR, $dir);
|
||||
$new = array_pop($new);
|
||||
$new = $par . DIRECTORY_SEPARATOR . $new;
|
||||
if(is_file($new) || is_dir($new)) { throw new Exception('Path already exists: ' . $new); }
|
||||
|
||||
if(is_dir($dir)) {
|
||||
mkdir($new);
|
||||
foreach(array_diff(scandir($dir), array(".", "..")) as $f) {
|
||||
$this->copy($this->id($dir . DIRECTORY_SEPARATOR . $f), $this->id($new));
|
||||
}
|
||||
}
|
||||
if(is_file($dir)) {
|
||||
copy($dir, $new);
|
||||
}
|
||||
return array('id' => $this->id($new));
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_GET['operation'])) {
|
||||
$fs = new fs(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'root' . DIRECTORY_SEPARATOR);
|
||||
try {
|
||||
$rslt = null;
|
||||
switch($_GET['operation']) {
|
||||
case 'get_node':
|
||||
$node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
|
||||
$rslt = $fs->lst($node, (isset($_GET['id']) && $_GET['id'] === '#'));
|
||||
break;
|
||||
case "get_content":
|
||||
$node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
|
||||
$rslt = $fs->data($node);
|
||||
break;
|
||||
case 'create_node':
|
||||
$node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
|
||||
$rslt = $fs->create($node, isset($_GET['text']) ? $_GET['text'] : '', (!isset($_GET['type']) || $_GET['type'] !== 'file'));
|
||||
break;
|
||||
case 'rename_node':
|
||||
$node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
|
||||
$rslt = $fs->rename($node, isset($_GET['text']) ? $_GET['text'] : '');
|
||||
break;
|
||||
case 'delete_node':
|
||||
$node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
|
||||
$rslt = $fs->remove($node);
|
||||
break;
|
||||
case 'move_node':
|
||||
$node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
|
||||
$parn = isset($_GET['parent']) && $_GET['parent'] !== '#' ? $_GET['parent'] : '/';
|
||||
$rslt = $fs->move($node, $parn);
|
||||
break;
|
||||
case 'copy_node':
|
||||
$node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
|
||||
$parn = isset($_GET['parent']) && $_GET['parent'] !== '#' ? $_GET['parent'] : '/';
|
||||
$rslt = $fs->copy($node, $parn);
|
||||
break;
|
||||
default:
|
||||
throw new Exception('Unsupported operation: ' . $_GET['operation']);
|
||||
break;
|
||||
}
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
echo json_encode($rslt);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
header($_SERVER["SERVER_PROTOCOL"] . ' 500 Server Error');
|
||||
header('Status: 500 Server Error');
|
||||
echo $e->getMessage();
|
||||
}
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Title</title>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="stylesheet" href="../vendor/vakata/jstree/dist/themes/default/style.min.css" />
|
||||
<style>
|
||||
html, body { background:#ebebeb; font-size:10px; font-family:Verdana; margin:0; padding:0; }
|
||||
#container { min-width:320px; margin:0px auto 0 auto; background:white; border-radius:0px; padding:0px; overflow:hidden; }
|
||||
#tree { float:left; min-width:319px; border-right:1px solid silver; overflow:auto; padding:0px 0; }
|
||||
#data { margin-left:320px; }
|
||||
#data textarea { margin:0; padding:0; height:100%; width:100%; border:0; background:white; display:block; line-height:18px; resize:none; }
|
||||
#data, #code { font: normal normal normal 12px/18px 'Consolas', monospace !important; }
|
||||
|
||||
#tree .folder { background:url('./file_sprite.png') right bottom no-repeat; }
|
||||
#tree .file { background:url('./file_sprite.png') 0 0 no-repeat; }
|
||||
#tree .file-pdf { background-position: -32px 0 }
|
||||
#tree .file-as { background-position: -36px 0 }
|
||||
#tree .file-c { background-position: -72px -0px }
|
||||
#tree .file-iso { background-position: -108px -0px }
|
||||
#tree .file-htm, #tree .file-html, #tree .file-xml, #tree .file-xsl { background-position: -126px -0px }
|
||||
#tree .file-cf { background-position: -162px -0px }
|
||||
#tree .file-cpp { background-position: -216px -0px }
|
||||
#tree .file-cs { background-position: -236px -0px }
|
||||
#tree .file-sql { background-position: -272px -0px }
|
||||
#tree .file-xls, #tree .file-xlsx { background-position: -362px -0px }
|
||||
#tree .file-h { background-position: -488px -0px }
|
||||
#tree .file-crt, #tree .file-pem, #tree .file-cer { background-position: -452px -18px }
|
||||
#tree .file-php { background-position: -108px -18px }
|
||||
#tree .file-jpg, #tree .file-jpeg, #tree .file-png, #tree .file-gif, #tree .file-bmp { background-position: -126px -18px }
|
||||
#tree .file-ppt, #tree .file-pptx { background-position: -144px -18px }
|
||||
#tree .file-rb { background-position: -180px -18px }
|
||||
#tree .file-text, #tree .file-txt, #tree .file-md, #tree .file-log, #tree .file-htaccess { background-position: -254px -18px }
|
||||
#tree .file-doc, #tree .file-docx { background-position: -362px -18px }
|
||||
#tree .file-zip, #tree .file-gz, #tree .file-tar, #tree .file-rar { background-position: -416px -18px }
|
||||
#tree .file-js { background-position: -434px -18px }
|
||||
#tree .file-css { background-position: -144px -0px }
|
||||
#tree .file-fla { background-position: -398px -0px }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" role="main">
|
||||
<div id="tree"></div>
|
||||
<div id="data">
|
||||
<div class="content code" style="display:none;"><textarea id="code" readonly="readonly"></textarea></div>
|
||||
<div class="content folder" style="display:none;"></div>
|
||||
<div class="content image" style="display:none; position:relative;"><img src="" alt="" style="display:block; position:absolute; left:50%; top:50%; padding:0; max-height:90%; max-width:90%;" /></div>
|
||||
<div class="content default" style="text-align:center;">Select a file from the tree.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
|
||||
<script src="../vendor/vakata/jstree/dist/jstree.min.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$(window).resize(function () {
|
||||
var h = Math.max($(window).height() - 0, 420);
|
||||
$('#container, #data, #tree, #data .content').height(h).filter('.default').css('lineHeight', h + 'px');
|
||||
}).resize();
|
||||
|
||||
$('#tree')
|
||||
.jstree({
|
||||
'core' : {
|
||||
'data' : {
|
||||
'url' : '?operation=get_node',
|
||||
'data' : function (node) {
|
||||
return { 'id' : node.id };
|
||||
}
|
||||
},
|
||||
'check_callback' : function(o, n, p, i, m) {
|
||||
if(m && m.dnd && m.pos !== 'i') { return false; }
|
||||
if(o === "move_node" || o === "copy_node") {
|
||||
if(this.get_node(n).parent === this.get_node(p).id) { return false; }
|
||||
}
|
||||
return true;
|
||||
},
|
||||
'force_text' : true,
|
||||
'themes' : {
|
||||
'responsive' : false,
|
||||
'variant' : 'small',
|
||||
'stripes' : true
|
||||
}
|
||||
},
|
||||
'sort' : function(a, b) {
|
||||
return this.get_type(a) === this.get_type(b) ? (this.get_text(a) > this.get_text(b) ? 1 : -1) : (this.get_type(a) >= this.get_type(b) ? 1 : -1);
|
||||
},
|
||||
'contextmenu' : {
|
||||
'items' : function(node) {
|
||||
var tmp = $.jstree.defaults.contextmenu.items();
|
||||
delete tmp.create.action;
|
||||
tmp.create.label = "New";
|
||||
tmp.create.submenu = {
|
||||
"create_folder" : {
|
||||
"separator_after" : true,
|
||||
"label" : "Folder",
|
||||
"action" : function (data) {
|
||||
var inst = $.jstree.reference(data.reference),
|
||||
obj = inst.get_node(data.reference);
|
||||
inst.create_node(obj, { type : "default" }, "last", function (new_node) {
|
||||
setTimeout(function () { inst.edit(new_node); },0);
|
||||
});
|
||||
}
|
||||
},
|
||||
"create_file" : {
|
||||
"label" : "File",
|
||||
"action" : function (data) {
|
||||
var inst = $.jstree.reference(data.reference),
|
||||
obj = inst.get_node(data.reference);
|
||||
inst.create_node(obj, { type : "file" }, "last", function (new_node) {
|
||||
setTimeout(function () { inst.edit(new_node); },0);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if(this.get_type(node) === "file") {
|
||||
delete tmp.create;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
},
|
||||
'types' : {
|
||||
'default' : { 'icon' : 'folder' },
|
||||
'file' : { 'valid_children' : [], 'icon' : 'file' }
|
||||
},
|
||||
'unique' : {
|
||||
'duplicate' : function (name, counter) {
|
||||
return name + ' ' + counter;
|
||||
}
|
||||
},
|
||||
'plugins' : ['state','dnd','sort','types','contextmenu','unique']
|
||||
})
|
||||
.on('delete_node.jstree', function (e, data) {
|
||||
$.get('?operation=delete_node', { 'id' : data.node.id })
|
||||
.fail(function () {
|
||||
data.instance.refresh();
|
||||
});
|
||||
})
|
||||
.on('create_node.jstree', function (e, data) {
|
||||
$.get('?operation=create_node', { 'type' : data.node.type, 'id' : data.node.parent, 'text' : data.node.text })
|
||||
.done(function (d) {
|
||||
data.instance.set_id(data.node, d.id);
|
||||
})
|
||||
.fail(function () {
|
||||
data.instance.refresh();
|
||||
});
|
||||
})
|
||||
.on('rename_node.jstree', function (e, data) {
|
||||
$.get('?operation=rename_node', { 'id' : data.node.id, 'text' : data.text })
|
||||
.done(function (d) {
|
||||
data.instance.set_id(data.node, d.id);
|
||||
})
|
||||
.fail(function () {
|
||||
data.instance.refresh();
|
||||
});
|
||||
})
|
||||
.on('move_node.jstree', function (e, data) {
|
||||
$.get('?operation=move_node', { 'id' : data.node.id, 'parent' : data.parent })
|
||||
.done(function (d) {
|
||||
//data.instance.load_node(data.parent);
|
||||
data.instance.refresh();
|
||||
})
|
||||
.fail(function () {
|
||||
data.instance.refresh();
|
||||
});
|
||||
})
|
||||
.on('copy_node.jstree', function (e, data) {
|
||||
$.get('?operation=copy_node', { 'id' : data.original.id, 'parent' : data.parent })
|
||||
.done(function (d) {
|
||||
//data.instance.load_node(data.parent);
|
||||
data.instance.refresh();
|
||||
})
|
||||
.fail(function () {
|
||||
data.instance.refresh();
|
||||
});
|
||||
})
|
||||
.on('changed.jstree', function (e, data) {
|
||||
if(data && data.selected && data.selected.length) {
|
||||
$.get('?operation=get_content&id=' + data.selected.join(':'), function (d) {
|
||||
if(d && typeof d.type !== 'undefined') {
|
||||
$('#data .content').hide();
|
||||
switch(d.type) {
|
||||
case 'text':
|
||||
case 'txt':
|
||||
case 'md':
|
||||
case 'htaccess':
|
||||
case 'log':
|
||||
case 'sql':
|
||||
case 'php':
|
||||
case 'js':
|
||||
case 'json':
|
||||
case 'css':
|
||||
case 'html':
|
||||
$('#data .code').show();
|
||||
$('#code').val(d.content);
|
||||
break;
|
||||
case 'png':
|
||||
case 'jpg':
|
||||
case 'jpeg':
|
||||
case 'bmp':
|
||||
case 'gif':
|
||||
$('#data .image img').one('load', function () { $(this).css({'marginTop':'-' + $(this).height()/2 + 'px','marginLeft':'-' + $(this).width()/2 + 'px'}); }).attr('src',d.content);
|
||||
$('#data .image').show();
|
||||
break;
|
||||
default:
|
||||
$('#data .default').html(d.content).show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('#data .content').hide();
|
||||
$('#data .default').html('Select a file from the tree.').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is the entry point of phpAduc.
|
||||
*
|
||||
* Ce fichier redirige les demandes vers la page appropriée
|
||||
*
|
||||
* PHP version > 7.3
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.01 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_01.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @category Main
|
||||
* @package phpAduc
|
||||
* @author Serge NOEL <serge.noel@easylinux.fr>
|
||||
* @copyright 2016-2020 Easylinux
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @version GIT: 2.0
|
||||
* @link ../tests/Documentation Tests/Documentation.odt
|
||||
*/
|
||||
// Charge les classes installées par Composer
|
||||
require_once 'vendor/autoload.php';
|
||||
// Lire la configuration du site
|
||||
require_once 'src/config/config.php';
|
||||
require_once 'src/class/autoload.php';
|
||||
session_start();
|
||||
|
||||
/* Initialisation de Smarty */
|
||||
$smarty = new Smarty();
|
||||
// Définir le dossier templates
|
||||
$smarty->setTemplateDir('src/templates');
|
||||
$smarty->setConfigDir('src/templates/configs');
|
||||
|
||||
// Définir le dossier qui recoit les templates compilés
|
||||
$smarty->setCompileDir('templates_c');
|
||||
$smarty->setCacheDir('src/templates_c/cache');
|
||||
|
||||
// Lire la page demandée
|
||||
$Action=filter_input(INPUT_POST,'Action',FILTER_SANITIZE_STRING);
|
||||
if(!isset($_SESSION['Loggued']) && $Action=="")
|
||||
{
|
||||
$Action='Login';
|
||||
}
|
||||
|
||||
error_log("Appel avec $Action");
|
||||
switch($Action)
|
||||
{
|
||||
case 'tryLogin':
|
||||
error_log('tryLogin ');
|
||||
$Usr=new userClass();
|
||||
$sLogin=filter_input(INPUT_POST,'sLogin',FILTER_SANITIZE_STRING);
|
||||
$sPasswd=filter_input(INPUT_POST,'sPassword',FILTER_SANITIZE_STRING);
|
||||
if($Usr->isValid($sLogin,$sPasswd))
|
||||
{
|
||||
$template='main.smarty';
|
||||
$component='main';
|
||||
$_SESSION['loggued']=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$template='login.smarty';
|
||||
$component="";
|
||||
$smarty->assign('error','Compte ou mot de passe invalide !');
|
||||
$smarty->assign('Title',"easyCloud");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'Logout':
|
||||
unset($_SESSION['Loggued']);
|
||||
|
||||
case 'Login':
|
||||
$template='login.smarty';
|
||||
$component="";
|
||||
break;
|
||||
|
||||
default:
|
||||
$component=strtolower($Action);
|
||||
$template="$component.smarty";
|
||||
break;
|
||||
}
|
||||
|
||||
if($component!="")
|
||||
{
|
||||
require_once("src/components/$component.php");
|
||||
}
|
||||
|
||||
$smarty->assign('Title',"easyCloud");
|
||||
echo $smarty->display($template);
|
||||
@@ -0,0 +1,47 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
$('input[type=password]').keyup(function() {
|
||||
var pswd = $(this).val();
|
||||
|
||||
//validate the length
|
||||
if ( pswd.length < 8 ) {
|
||||
$('#length').removeClass('valid').addClass('invalid');
|
||||
} else {
|
||||
$('#length').removeClass('invalid').addClass('valid');
|
||||
}
|
||||
|
||||
//validate letter
|
||||
if ( pswd.match(/[A-z]/) ) {
|
||||
$('#letter').removeClass('invalid').addClass('valid');
|
||||
} else {
|
||||
$('#letter').removeClass('valid').addClass('invalid');
|
||||
}
|
||||
|
||||
//validate capital letter
|
||||
if ( pswd.match(/[A-Z]/) ) {
|
||||
$('#capital').removeClass('invalid').addClass('valid');
|
||||
} else {
|
||||
$('#capital').removeClass('valid').addClass('invalid');
|
||||
}
|
||||
|
||||
//validate number
|
||||
if ( pswd.match(/\d/) ) {
|
||||
$('#number').removeClass('invalid').addClass('valid');
|
||||
} else {
|
||||
$('#number').removeClass('valid').addClass('invalid');
|
||||
}
|
||||
|
||||
//validate space
|
||||
if ( pswd.match(/[^a-zA-Z0-9\-\/]/) ) {
|
||||
$('#space').removeClass('invalid').addClass('valid');
|
||||
} else {
|
||||
$('#space').removeClass('valid').addClass('invalid');
|
||||
}
|
||||
|
||||
}).focus(function() {
|
||||
$('#pswd_info').show();
|
||||
}).blur(function() {
|
||||
$('#pswd_info').hide();
|
||||
});
|
||||
|
||||
});
|
||||
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.11, written by Peter Selinger 2001-2013
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M2115 5099 c-16 -5 -124 -35 -240 -65 -115 -31 -215 -60 -222 -66 -7
|
||||
-5 -17 -7 -23 -3 -17 11 -12 -21 30 -175 22 -81 40 -155 40 -165 0 -11 -26
|
||||
-28 -77 -52 -43 -20 -80 -39 -83 -42 -3 -4 -20 -13 -38 -20 -18 -8 -87 -50
|
||||
-155 -95 -109 -72 -175 -110 -154 -90 4 4 -48 63 -115 131 l-123 123 -207
|
||||
-207 -208 -208 125 -125 c69 -69 125 -128 125 -131 0 -3 -36 -59 -79 -124 -44
|
||||
-66 -77 -123 -75 -127 3 -4 1 -8 -3 -8 -9 0 -50 -76 -51 -94 0 -5 -4 -12 -9
|
||||
-15 -5 -3 -21 -33 -36 -66 -20 -45 -31 -59 -44 -57 -10 2 -83 21 -163 43 -80
|
||||
21 -153 39 -162 39 -9 0 -18 -11 -21 -27 -3 -16 -35 -140 -72 -276 -37 -136
|
||||
-65 -250 -62 -253 2 -3 82 -26 176 -51 l171 -46 -8 -41 c-9 -53 -9 -438 1
|
||||
-492 7 -44 5 -47 -64 -60 -42 -8 -271 -73 -276 -78 -5 -5 135 -544 144 -555 4
|
||||
-5 87 14 245 58 l106 29 58 -119 c32 -65 62 -119 67 -119 4 0 6 -4 3 -8 -2 -4
|
||||
31 -61 75 -127 43 -65 79 -121 79 -124 0 -3 -57 -62 -126 -132 l-125 -126 66
|
||||
-64 c37 -35 71 -63 77 -61 5 1 7 -1 4 -6 -3 -5 57 -70 132 -145 l137 -137 124
|
||||
125 c69 69 129 125 134 125 4 0 23 -11 41 -25 18 -14 38 -25 44 -25 6 0 12 -4
|
||||
14 -8 5 -12 56 -46 153 -102 62 -36 90 -47 96 -39 5 8 8 7 10 -5 3 -10 31 -30
|
||||
69 -46 49 -22 64 -33 62 -47 -2 -10 -21 -84 -43 -164 -40 -152 -46 -184 -29
|
||||
-174 5 3 17 1 27 -5 10 -5 113 -35 228 -65 116 -30 227 -60 248 -67 20 -6 40
|
||||
-9 43 -6 3 3 26 83 51 177 l46 171 41 -7 c78 -14 467 -9 514 6 23 8 42 18 42
|
||||
23 0 4 4 7 8 5 15 -4 82 48 77 60 -2 7 1 12 8 10 7 -1 25 23 40 53 25 49 28
|
||||
63 24 125 -4 80 -22 121 -76 176 -67 67 -85 70 -371 73 -212 3 -271 7 -350 24
|
||||
-335 72 -622 225 -850 451 -41 41 -79 74 -85 72 -5 -1 -7 1 -2 5 9 10 -22 44
|
||||
-40 44 -8 0 -11 4 -8 10 3 5 -14 37 -40 69 -133 174 -231 390 -291 646 -21 91
|
||||
-26 144 -31 305 -6 216 9 342 62 525 29 101 111 301 133 328 8 9 11 17 6 17
|
||||
-5 0 -4 4 1 8 6 4 26 32 45 62 19 30 54 81 78 113 24 31 40 62 37 67 -3 6 -1
|
||||
10 5 10 6 0 60 48 118 108 100 100 256 222 347 271 76 41 164 86 172 88 4 2
|
||||
60 21 123 43 189 65 279 81 500 87 170 5 212 2 325 -17 150 -25 330 -81 460
|
||||
-145 105 -51 167 -86 177 -100 5 -7 8 -7 8 0 0 6 5 2 11 -7 5 -10 14 -18 19
|
||||
-18 6 0 18 -6 27 -14 166 -136 215 -181 283 -259 115 -130 205 -269 271 -414
|
||||
51 -112 86 -217 116 -353 24 -105 27 -137 29 -373 2 -243 3 -260 24 -300 28
|
||||
-54 50 -78 63 -70 6 3 7 1 3 -5 -4 -6 13 -22 41 -39 42 -24 58 -28 128 -28 63
|
||||
0 89 5 121 22 53 28 99 81 132 152 25 55 26 61 26 266 1 116 -2 233 -7 261 -8
|
||||
55 -9 54 58 69 105 24 263 70 273 79 12 12 -6 89 -111 473 l-22 81 -35 -4
|
||||
c-19 -2 -98 -22 -175 -43 -130 -36 -172 -41 -160 -21 7 11 -107 240 -115 235
|
||||
-4 -2 -7 2 -7 10 0 18 -123 205 -134 205 -30 0 7 52 115 160 116 116 123 126
|
||||
109 143 -9 9 -22 17 -30 17 -8 0 -12 4 -8 10 7 12 -33 53 -45 45 -5 -3 -12 0
|
||||
-16 6 -4 8 -3 9 4 5 7 -4 12 -2 12 3 0 6 -7 11 -15 11 -8 0 -15 6 -15 13 0 17
|
||||
-39 49 -50 42 -6 -3 -7 1 -4 9 4 11 0 16 -10 16 -9 0 -16 7 -16 15 0 8 -7 15
|
||||
-15 15 -8 0 -15 5 -15 11 0 14 -25 39 -39 39 -6 0 -11 7 -11 15 0 8 -6 15 -14
|
||||
15 -8 0 -17 7 -20 16 -3 8 -11 12 -16 9 -6 -4 -10 -3 -9 2 3 20 -2 34 -11 28
|
||||
-5 -3 -10 0 -10 8 0 8 -10 21 -22 30 -22 15 -27 12 -151 -111 -97 -97 -130
|
||||
-125 -141 -117 -115 82 -226 148 -338 203 -106 52 -137 71 -137 87 -1 11 17
|
||||
85 39 165 22 80 40 152 40 160 0 12 -66 33 -275 89 -152 41 -278 71 -281 68
|
||||
-5 -4 -61 -202 -63 -222 -1 -3 -8 -32 -18 -65 l-16 -60 -56 8 c-72 9 -423 9
|
||||
-477 -1 l-41 -7 -33 123 c-66 253 -57 237 -125 216z"/>
|
||||
<path d="M2581 3660 c-84 -11 -158 -21 -162 -22 -5 -2 2 -15 16 -30 14 -15 25
|
||||
-30 25 -33 0 -8 231 -319 246 -331 8 -6 14 -15 14 -19 0 -5 46 -69 102 -144
|
||||
191 -253 218 -296 218 -340 0 -44 -21 -83 -132 -248 -125 -187 -134 -193 -302
|
||||
-247 -203 -64 -249 -76 -296 -76 -55 0 -86 23 -151 113 -29 39 -57 76 -61 82
|
||||
-5 5 -33 44 -64 85 -30 41 -59 77 -64 78 -6 2 -10 8 -10 13 0 15 -191 269
|
||||
-202 269 -6 0 -8 3 -5 6 4 4 -4 19 -16 35 -12 15 -46 61 -76 103 -41 56 -57
|
||||
72 -65 63 -16 -16 -124 -265 -141 -324 -45 -155 -14 -390 68 -519 55 -87 210
|
||||
-289 223 -292 9 -2 13 -9 11 -15 -5 -17 105 -162 172 -225 96 -92 296 -172
|
||||
428 -172 21 0 147 17 280 38 l242 39 193 -193 c106 -106 196 -190 202 -187 5
|
||||
3 6 2 3 -4 -8 -13 277 -296 288 -286 4 5 5 3 2 -3 -8 -14 96 -117 108 -107 4
|
||||
5 5 3 2 -3 -8 -14 214 -233 278 -273 84 -53 170 -74 283 -69 53 3 108 10 122
|
||||
15 14 6 27 10 30 10 9 -2 73 37 127 76 54 38 78 68 65 82 -4 5 -2 5 5 1 17
|
||||
-10 68 74 93 153 26 83 27 207 1 290 -23 76 -68 154 -83 145 -7 -5 -8 -2 -3 6
|
||||
5 8 -155 174 -496 516 -277 277 -505 508 -507 513 -2 5 14 42 34 83 59 116 75
|
||||
174 81 283 6 115 -11 217 -51 309 -30 67 -225 336 -244 336 -7 0 -10 4 -7 10
|
||||
8 12 -26 59 -42 60 -7 0 -10 6 -8 13 3 6 -11 29 -30 51 -19 21 -35 42 -35 46
|
||||
0 10 -101 108 -136 131 -16 10 -35 17 -42 14 -7 -3 -10 0 -7 5 6 10 -56 46
|
||||
-90 52 -11 1 -22 6 -25 9 -10 12 -127 38 -190 43 -36 2 -134 -4 -219 -14z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.0 KiB |
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "",
|
||||
"short_name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
@@ -0,0 +1,986 @@
|
||||
<?php
|
||||
// TO DO: better exceptions, use params
|
||||
class tree
|
||||
{
|
||||
protected $db = null;
|
||||
protected $options = null;
|
||||
protected $default = array(
|
||||
'structure_table' => 'structure', // the structure table (containing the id, left, right, level, parent_id and position fields)
|
||||
'data_table' => 'structure', // table for additional fields (apart from structure ones, can be the same as structure_table)
|
||||
'data2structure' => 'id', // which field from the data table maps to the structure table
|
||||
'structure' => array( // which field (value) maps to what in the structure (key)
|
||||
'id' => 'id',
|
||||
'left' => 'lft',
|
||||
'right' => 'rgt',
|
||||
'level' => 'lvl',
|
||||
'parent_id' => 'pid',
|
||||
'position' => 'pos'
|
||||
),
|
||||
'data' => array() // array of additional fields from the data table
|
||||
);
|
||||
|
||||
public function __construct(\vakata\database\IDB $db, array $options = array()) {
|
||||
$this->db = $db;
|
||||
$this->options = array_merge($this->default, $options);
|
||||
}
|
||||
|
||||
public function get_node($id, $options = array()) {
|
||||
$node = $this->db->one("
|
||||
SELECT
|
||||
s.".implode(", s.", $this->options['structure']).",
|
||||
d.".implode(", d.", $this->options['data'])."
|
||||
FROM
|
||||
".$this->options['structure_table']." s,
|
||||
".$this->options['data_table']." d
|
||||
WHERE
|
||||
s.".$this->options['structure']['id']." = d.".$this->options['data2structure']." AND
|
||||
s.".$this->options['structure']['id']." = ".(int)$id
|
||||
);
|
||||
if(!$node) {
|
||||
throw new Exception('Node does not exist');
|
||||
}
|
||||
if(isset($options['with_children'])) {
|
||||
$node['children'] = $this->get_children($id, isset($options['deep_children']));
|
||||
}
|
||||
if(isset($options['with_path'])) {
|
||||
$node['path'] = $this->get_path($id);
|
||||
}
|
||||
return $node;
|
||||
}
|
||||
|
||||
public function get_children($id, $recursive = false) {
|
||||
$sql = false;
|
||||
if($recursive) {
|
||||
$node = $this->get_node($id);
|
||||
$sql = "
|
||||
SELECT
|
||||
s.".implode(", s.", $this->options['structure']).",
|
||||
d.".implode(", d.", $this->options['data'])."
|
||||
FROM
|
||||
".$this->options['structure_table']." s,
|
||||
".$this->options['data_table']." d
|
||||
WHERE
|
||||
s.".$this->options['structure']['id']." = d.".$this->options['data2structure']." AND
|
||||
s.".$this->options['structure']['left']." > ".(int)$node[$this->options['structure']['left']]." AND
|
||||
s.".$this->options['structure']['right']." < ".(int)$node[$this->options['structure']['right']]."
|
||||
ORDER BY
|
||||
s.".$this->options['structure']['left']."
|
||||
";
|
||||
}
|
||||
else {
|
||||
$sql = "
|
||||
SELECT
|
||||
s.".implode(", s.", $this->options['structure']).",
|
||||
d.".implode(", d.", $this->options['data'])."
|
||||
FROM
|
||||
".$this->options['structure_table']." s,
|
||||
".$this->options['data_table']." d
|
||||
WHERE
|
||||
s.".$this->options['structure']['id']." = d.".$this->options['data2structure']." AND
|
||||
s.".$this->options['structure']['parent_id']." = ".(int)$id."
|
||||
ORDER BY
|
||||
s.".$this->options['structure']['position']."
|
||||
";
|
||||
}
|
||||
return $this->db->all($sql);
|
||||
}
|
||||
|
||||
public function get_path($id) {
|
||||
$node = $this->get_node($id);
|
||||
$sql = false;
|
||||
if($node) {
|
||||
$sql = "
|
||||
SELECT
|
||||
s.".implode(", s.", $this->options['structure']).",
|
||||
d.".implode(", d.", $this->options['data'])."
|
||||
FROM
|
||||
".$this->options['structure_table']." s,
|
||||
".$this->options['data_table']." d
|
||||
WHERE
|
||||
s.".$this->options['structure']['id']." = d.".$this->options['data2structure']." AND
|
||||
s.".$this->options['structure']['left']." < ".(int)$node[$this->options['structure']['left']]." AND
|
||||
s.".$this->options['structure']['right']." > ".(int)$node[$this->options['structure']['right']]."
|
||||
ORDER BY
|
||||
s.".$this->options['structure']['left']."
|
||||
";
|
||||
}
|
||||
return $sql ? $this->db->all($sql) : false;
|
||||
}
|
||||
|
||||
public function mk($parent, $position = 0, $data = array()) {
|
||||
$parent = (int)$parent;
|
||||
if($parent == 0) { throw new Exception('Parent is 0'); }
|
||||
$parent = $this->get_node($parent, array('with_children'=> true));
|
||||
if(!$parent['children']) { $position = 0; }
|
||||
if($parent['children'] && $position >= count($parent['children'])) { $position = count($parent['children']); }
|
||||
|
||||
$sql = array();
|
||||
$par = array();
|
||||
|
||||
// PREPARE NEW PARENT
|
||||
// update positions of all next elements
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["position"]." = ".$this->options['structure']["position"]." + 1
|
||||
WHERE
|
||||
".$this->options['structure']["parent_id"]." = ".(int)$parent[$this->options['structure']['id']]." AND
|
||||
".$this->options['structure']["position"]." >= ".$position."
|
||||
";
|
||||
$par[] = false;
|
||||
|
||||
// update left indexes
|
||||
$ref_lft = false;
|
||||
if(!$parent['children']) {
|
||||
$ref_lft = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else if(!isset($parent['children'][$position])) {
|
||||
$ref_lft = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else {
|
||||
$ref_lft = $parent['children'][(int)$position][$this->options['structure']["left"]];
|
||||
}
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["left"]." = ".$this->options['structure']["left"]." + 2
|
||||
WHERE
|
||||
".$this->options['structure']["left"]." >= ".(int)$ref_lft."
|
||||
";
|
||||
$par[] = false;
|
||||
|
||||
// update right indexes
|
||||
$ref_rgt = false;
|
||||
if(!$parent['children']) {
|
||||
$ref_rgt = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else if(!isset($parent['children'][$position])) {
|
||||
$ref_rgt = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else {
|
||||
$ref_rgt = $parent['children'][(int)$position][$this->options['structure']["left"]] + 1;
|
||||
}
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["right"]." = ".$this->options['structure']["right"]." + 2
|
||||
WHERE
|
||||
".$this->options['structure']["right"]." >= ".(int)$ref_rgt."
|
||||
";
|
||||
$par[] = false;
|
||||
|
||||
// INSERT NEW NODE IN STRUCTURE
|
||||
$sql[] = "INSERT INTO ".$this->options['structure_table']." (".implode(",", $this->options['structure']).") VALUES (?".str_repeat(',?', count($this->options['structure']) - 1).")";
|
||||
$tmp = array();
|
||||
foreach($this->options['structure'] as $k => $v) {
|
||||
switch($k) {
|
||||
case 'id':
|
||||
$tmp[] = null;
|
||||
break;
|
||||
case 'left':
|
||||
$tmp[] = (int)$ref_lft;
|
||||
break;
|
||||
case 'right':
|
||||
$tmp[] = (int)$ref_lft + 1;
|
||||
break;
|
||||
case 'level':
|
||||
$tmp[] = (int)$parent[$v] + 1;
|
||||
break;
|
||||
case 'parent_id':
|
||||
$tmp[] = $parent[$this->options['structure']['id']];
|
||||
break;
|
||||
case 'position':
|
||||
$tmp[] = $position;
|
||||
break;
|
||||
default:
|
||||
$tmp[] = null;
|
||||
}
|
||||
}
|
||||
$par[] = $tmp;
|
||||
|
||||
foreach($sql as $k => $v) {
|
||||
try {
|
||||
$this->db->query($v, $par[$k]);
|
||||
} catch(Exception $e) {
|
||||
$this->reconstruct();
|
||||
throw new Exception('Could not create');
|
||||
}
|
||||
}
|
||||
if($data && count($data)) {
|
||||
$node = $this->db->insert_id();
|
||||
if(!$this->rn($node,$data)) {
|
||||
$this->rm($node);
|
||||
throw new Exception('Could not rename after create');
|
||||
}
|
||||
}
|
||||
return $node;
|
||||
}
|
||||
|
||||
public function mv($id, $parent, $position = 0) {
|
||||
$id = (int)$id;
|
||||
$parent = (int)$parent;
|
||||
if($parent == 0 || $id == 0 || $id == 1) {
|
||||
throw new Exception('Cannot move inside 0, or move root node');
|
||||
}
|
||||
|
||||
$parent = $this->get_node($parent, array('with_children'=> true, 'with_path' => true));
|
||||
$id = $this->get_node($id, array('with_children'=> true, 'deep_children' => true, 'with_path' => true));
|
||||
if(!$parent['children']) {
|
||||
$position = 0;
|
||||
}
|
||||
if($id[$this->options['structure']['parent_id']] == $parent[$this->options['structure']['id']] && $position > $id[$this->options['structure']['position']]) {
|
||||
$position ++;
|
||||
}
|
||||
if($parent['children'] && $position >= count($parent['children'])) {
|
||||
$position = count($parent['children']);
|
||||
}
|
||||
if($id[$this->options['structure']['left']] < $parent[$this->options['structure']['left']] && $id[$this->options['structure']['right']] > $parent[$this->options['structure']['right']]) {
|
||||
throw new Exception('Could not move parent inside child');
|
||||
}
|
||||
|
||||
$tmp = array();
|
||||
$tmp[] = (int)$id[$this->options['structure']["id"]];
|
||||
if($id['children'] && is_array($id['children'])) {
|
||||
foreach($id['children'] as $c) {
|
||||
$tmp[] = (int)$c[$this->options['structure']["id"]];
|
||||
}
|
||||
}
|
||||
$width = (int)$id[$this->options['structure']["right"]] - (int)$id[$this->options['structure']["left"]] + 1;
|
||||
|
||||
$sql = array();
|
||||
|
||||
// PREPARE NEW PARENT
|
||||
// update positions of all next elements
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["position"]." = ".$this->options['structure']["position"]." + 1
|
||||
WHERE
|
||||
".$this->options['structure']["id"]." != ".(int)$id[$this->options['structure']['id']]." AND
|
||||
".$this->options['structure']["parent_id"]." = ".(int)$parent[$this->options['structure']['id']]." AND
|
||||
".$this->options['structure']["position"]." >= ".$position."
|
||||
";
|
||||
|
||||
// update left indexes
|
||||
$ref_lft = false;
|
||||
if(!$parent['children']) {
|
||||
$ref_lft = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else if(!isset($parent['children'][$position])) {
|
||||
$ref_lft = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else {
|
||||
$ref_lft = $parent['children'][(int)$position][$this->options['structure']["left"]];
|
||||
}
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["left"]." = ".$this->options['structure']["left"]." + ".$width."
|
||||
WHERE
|
||||
".$this->options['structure']["left"]." >= ".(int)$ref_lft." AND
|
||||
".$this->options['structure']["id"]." NOT IN(".implode(',',$tmp).")
|
||||
";
|
||||
// update right indexes
|
||||
$ref_rgt = false;
|
||||
if(!$parent['children']) {
|
||||
$ref_rgt = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else if(!isset($parent['children'][$position])) {
|
||||
$ref_rgt = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else {
|
||||
$ref_rgt = $parent['children'][(int)$position][$this->options['structure']["left"]] + 1;
|
||||
}
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["right"]." = ".$this->options['structure']["right"]." + ".$width."
|
||||
WHERE
|
||||
".$this->options['structure']["right"]." >= ".(int)$ref_rgt." AND
|
||||
".$this->options['structure']["id"]." NOT IN(".implode(',',$tmp).")
|
||||
";
|
||||
|
||||
// MOVE THE ELEMENT AND CHILDREN
|
||||
// left, right and level
|
||||
$diff = $ref_lft - (int)$id[$this->options['structure']["left"]];
|
||||
|
||||
if($diff > 0) { $diff = $diff - $width; }
|
||||
$ldiff = ((int)$parent[$this->options['structure']['level']] + 1) - (int)$id[$this->options['structure']['level']];
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["right"]." = ".$this->options['structure']["right"]." + ".$diff.",
|
||||
".$this->options['structure']["left"]." = ".$this->options['structure']["left"]." + ".$diff.",
|
||||
".$this->options['structure']["level"]." = ".$this->options['structure']["level"]." + ".$ldiff."
|
||||
WHERE ".$this->options['structure']["id"]." IN(".implode(',',$tmp).")
|
||||
";
|
||||
// position and parent_id
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["position"]." = ".$position.",
|
||||
".$this->options['structure']["parent_id"]." = ".(int)$parent[$this->options['structure']["id"]]."
|
||||
WHERE ".$this->options['structure']["id"]." = ".(int)$id[$this->options['structure']['id']]."
|
||||
";
|
||||
|
||||
// CLEAN OLD PARENT
|
||||
// position of all next elements
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["position"]." = ".$this->options['structure']["position"]." - 1
|
||||
WHERE
|
||||
".$this->options['structure']["parent_id"]." = ".(int)$id[$this->options['structure']["parent_id"]]." AND
|
||||
".$this->options['structure']["position"]." > ".(int)$id[$this->options['structure']["position"]];
|
||||
// left indexes
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["left"]." = ".$this->options['structure']["left"]." - ".$width."
|
||||
WHERE
|
||||
".$this->options['structure']["left"]." > ".(int)$id[$this->options['structure']["right"]]." AND
|
||||
".$this->options['structure']["id"]." NOT IN(".implode(',',$tmp).")
|
||||
";
|
||||
// right indexes
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["right"]." = ".$this->options['structure']["right"]." - ".$width."
|
||||
WHERE
|
||||
".$this->options['structure']["right"]." > ".(int)$id[$this->options['structure']["right"]]." AND
|
||||
".$this->options['structure']["id"]." NOT IN(".implode(',',$tmp).")
|
||||
";
|
||||
|
||||
foreach($sql as $k => $v) {
|
||||
//echo preg_replace('@[\s\t]+@',' ',$v) ."\n";
|
||||
try {
|
||||
$this->db->query($v);
|
||||
} catch(Exception $e) {
|
||||
$this->reconstruct();
|
||||
throw new Exception('Error moving');
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function cp($id, $parent, $position = 0) {
|
||||
$id = (int)$id;
|
||||
$parent = (int)$parent;
|
||||
if($parent == 0 || $id == 0 || $id == 1) {
|
||||
throw new Exception('Could not copy inside parent 0, or copy root nodes');
|
||||
}
|
||||
|
||||
$parent = $this->get_node($parent, array('with_children'=> true, 'with_path' => true));
|
||||
$id = $this->get_node($id, array('with_children'=> true, 'deep_children' => true, 'with_path' => true));
|
||||
$old_nodes = $this->db->get("
|
||||
SELECT * FROM ".$this->options['structure_table']."
|
||||
WHERE ".$this->options['structure']["left"]." > ".$id[$this->options['structure']["left"]]." AND ".$this->options['structure']["right"]." < ".$id[$this->options['structure']["right"]]."
|
||||
ORDER BY ".$this->options['structure']["left"]."
|
||||
");
|
||||
if(!$parent['children']) {
|
||||
$position = 0;
|
||||
}
|
||||
if($id[$this->options['structure']['parent_id']] == $parent[$this->options['structure']['id']] && $position > $id[$this->options['structure']['position']]) {
|
||||
//$position ++;
|
||||
}
|
||||
if($parent['children'] && $position >= count($parent['children'])) {
|
||||
$position = count($parent['children']);
|
||||
}
|
||||
|
||||
$tmp = array();
|
||||
$tmp[] = (int)$id[$this->options['structure']["id"]];
|
||||
if($id['children'] && is_array($id['children'])) {
|
||||
foreach($id['children'] as $c) {
|
||||
$tmp[] = (int)$c[$this->options['structure']["id"]];
|
||||
}
|
||||
}
|
||||
$width = (int)$id[$this->options['structure']["right"]] - (int)$id[$this->options['structure']["left"]] + 1;
|
||||
|
||||
$sql = array();
|
||||
|
||||
// PREPARE NEW PARENT
|
||||
// update positions of all next elements
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["position"]." = ".$this->options['structure']["position"]." + 1
|
||||
WHERE
|
||||
".$this->options['structure']["parent_id"]." = ".(int)$parent[$this->options['structure']['id']]." AND
|
||||
".$this->options['structure']["position"]." >= ".$position."
|
||||
";
|
||||
|
||||
// update left indexes
|
||||
$ref_lft = false;
|
||||
if(!$parent['children']) {
|
||||
$ref_lft = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else if(!isset($parent['children'][$position])) {
|
||||
$ref_lft = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else {
|
||||
$ref_lft = $parent['children'][(int)$position][$this->options['structure']["left"]];
|
||||
}
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["left"]." = ".$this->options['structure']["left"]." + ".$width."
|
||||
WHERE
|
||||
".$this->options['structure']["left"]." >= ".(int)$ref_lft."
|
||||
";
|
||||
// update right indexes
|
||||
$ref_rgt = false;
|
||||
if(!$parent['children']) {
|
||||
$ref_rgt = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else if(!isset($parent['children'][$position])) {
|
||||
$ref_rgt = $parent[$this->options['structure']["right"]];
|
||||
}
|
||||
else {
|
||||
$ref_rgt = $parent['children'][(int)$position][$this->options['structure']["left"]] + 1;
|
||||
}
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["right"]." = ".$this->options['structure']["right"]." + ".$width."
|
||||
WHERE
|
||||
".$this->options['structure']["right"]." >= ".(int)$ref_rgt."
|
||||
";
|
||||
|
||||
// MOVE THE ELEMENT AND CHILDREN
|
||||
// left, right and level
|
||||
$diff = $ref_lft - (int)$id[$this->options['structure']["left"]];
|
||||
|
||||
if($diff <= 0) { $diff = $diff - $width; }
|
||||
$ldiff = ((int)$parent[$this->options['structure']['level']] + 1) - (int)$id[$this->options['structure']['level']];
|
||||
|
||||
// build all fields + data table
|
||||
$fields = array_combine($this->options['structure'], $this->options['structure']);
|
||||
unset($fields['id']);
|
||||
$fields[$this->options['structure']["left"]] = $this->options['structure']["left"]." + ".$diff;
|
||||
$fields[$this->options['structure']["right"]] = $this->options['structure']["right"]." + ".$diff;
|
||||
$fields[$this->options['structure']["level"]] = $this->options['structure']["level"]." + ".$ldiff;
|
||||
$sql[] = "
|
||||
INSERT INTO ".$this->options['structure_table']." ( ".implode(',',array_keys($fields))." )
|
||||
SELECT ".implode(',',array_values($fields))." FROM ".$this->options['structure_table']." WHERE ".$this->options['structure']["id"]." IN (".implode(",", $tmp).")
|
||||
ORDER BY ".$this->options['structure']["level"]." ASC";
|
||||
|
||||
foreach($sql as $k => $v) {
|
||||
try {
|
||||
$this->db->query($v);
|
||||
} catch(Exception $e) {
|
||||
$this->reconstruct();
|
||||
throw new Exception('Error copying');
|
||||
}
|
||||
}
|
||||
$iid = (int)$this->db->insert_id();
|
||||
|
||||
try {
|
||||
$this->db->query("
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["position"]." = ".$position.",
|
||||
".$this->options['structure']["parent_id"]." = ".(int)$parent[$this->options['structure']["id"]]."
|
||||
WHERE ".$this->options['structure']["id"]." = ".$iid."
|
||||
");
|
||||
} catch(Exception $e) {
|
||||
$this->rm($iid);
|
||||
$this->reconstruct();
|
||||
throw new Exception('Could not update adjacency after copy');
|
||||
}
|
||||
$fields = $this->options['data'];
|
||||
unset($fields['id']);
|
||||
$update_fields = array();
|
||||
foreach($fields as $f) {
|
||||
$update_fields[] = $f.'=VALUES('.$f.')';
|
||||
}
|
||||
$update_fields = implode(',', $update_fields);
|
||||
if(count($fields)) {
|
||||
try {
|
||||
$this->db->query("
|
||||
INSERT INTO ".$this->options['data_table']." (".$this->options['data2structure'].",".implode(",",$fields).")
|
||||
SELECT ".$iid.",".implode(",",$fields)." FROM ".$this->options['data_table']." WHERE ".$this->options['data2structure']." = ".$id[$this->options['data2structure']]."
|
||||
ON DUPLICATE KEY UPDATE ".$update_fields."
|
||||
");
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$this->rm($iid);
|
||||
$this->reconstruct();
|
||||
throw new Exception('Could not update data after copy');
|
||||
}
|
||||
}
|
||||
|
||||
// manually fix all parent_ids and copy all data
|
||||
$new_nodes = $this->db->get("
|
||||
SELECT * FROM ".$this->options['structure_table']."
|
||||
WHERE ".$this->options['structure']["left"]." > ".$ref_lft." AND ".$this->options['structure']["right"]." < ".($ref_lft + $width - 1)." AND ".$this->options['structure']["id"]." != ".$iid."
|
||||
ORDER BY ".$this->options['structure']["left"]."
|
||||
");
|
||||
$parents = array();
|
||||
foreach($new_nodes as $node) {
|
||||
if(!isset($parents[$node[$this->options['structure']["left"]]])) { $parents[$node[$this->options['structure']["left"]]] = $iid; }
|
||||
for($i = $node[$this->options['structure']["left"]] + 1; $i < $node[$this->options['structure']["right"]]; $i++) {
|
||||
$parents[$i] = $node[$this->options['structure']["id"]];
|
||||
}
|
||||
}
|
||||
$sql = array();
|
||||
foreach($new_nodes as $k => $node) {
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["parent_id"]." = ".$parents[$node[$this->options['structure']["left"]]]."
|
||||
WHERE ".$this->options['structure']["id"]." = ".(int)$node[$this->options['structure']["id"]]."
|
||||
";
|
||||
if(count($fields)) {
|
||||
$up = "";
|
||||
foreach($fields as $f)
|
||||
$sql[] = "
|
||||
INSERT INTO ".$this->options['data_table']." (".$this->options['data2structure'].",".implode(",",$fields).")
|
||||
SELECT ".(int)$node[$this->options['structure']["id"]].",".implode(",",$fields)." FROM ".$this->options['data_table']."
|
||||
WHERE ".$this->options['data2structure']." = ".$old_nodes[$k][$this->options['structure']['id']]."
|
||||
ON DUPLICATE KEY UPDATE ".$update_fields."
|
||||
";
|
||||
}
|
||||
}
|
||||
//var_dump($sql);
|
||||
foreach($sql as $k => $v) {
|
||||
try {
|
||||
$this->db->query($v);
|
||||
} catch(Exception $e) {
|
||||
$this->rm($iid);
|
||||
$this->reconstruct();
|
||||
throw new Exception('Error copying');
|
||||
}
|
||||
}
|
||||
return $iid;
|
||||
}
|
||||
|
||||
public function rm($id) {
|
||||
$id = (int)$id;
|
||||
if(!$id || $id === 1) { throw new Exception('Could not create inside roots'); }
|
||||
$data = $this->get_node($id, array('with_children' => true, 'deep_children' => true));
|
||||
$lft = (int)$data[$this->options['structure']["left"]];
|
||||
$rgt = (int)$data[$this->options['structure']["right"]];
|
||||
$pid = (int)$data[$this->options['structure']["parent_id"]];
|
||||
$pos = (int)$data[$this->options['structure']["position"]];
|
||||
$dif = $rgt - $lft + 1;
|
||||
|
||||
$sql = array();
|
||||
// deleting node and its children from structure
|
||||
$sql[] = "
|
||||
DELETE FROM ".$this->options['structure_table']."
|
||||
WHERE ".$this->options['structure']["left"]." >= ".(int)$lft." AND ".$this->options['structure']["right"]." <= ".(int)$rgt."
|
||||
";
|
||||
// shift left indexes of nodes right of the node
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["left"]." = ".$this->options['structure']["left"]." - ".(int)$dif."
|
||||
WHERE ".$this->options['structure']["left"]." > ".(int)$rgt."
|
||||
";
|
||||
// shift right indexes of nodes right of the node and the node's parents
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["right"]." = ".$this->options['structure']["right"]." - ".(int)$dif."
|
||||
WHERE ".$this->options['structure']["right"]." > ".(int)$lft."
|
||||
";
|
||||
// Update position of siblings below the deleted node
|
||||
$sql[] = "
|
||||
UPDATE ".$this->options['structure_table']."
|
||||
SET ".$this->options['structure']["position"]." = ".$this->options['structure']["position"]." - 1
|
||||
WHERE ".$this->options['structure']["parent_id"]." = ".$pid." AND ".$this->options['structure']["position"]." > ".(int)$pos."
|
||||
";
|
||||
// delete from data table
|
||||
if($this->options['data_table']) {
|
||||
$tmp = array();
|
||||
$tmp[] = (int)$data['id'];
|
||||
if($data['children'] && is_array($data['children'])) {
|
||||
foreach($data['children'] as $v) {
|
||||
$tmp[] = (int)$v['id'];
|
||||
}
|
||||
}
|
||||
$sql[] = "DELETE FROM ".$this->options['data_table']." WHERE ".$this->options['data2structure']." IN (".implode(',',$tmp).")";
|
||||
}
|
||||
|
||||
foreach($sql as $v) {
|
||||
try {
|
||||
$this->db->query($v);
|
||||
} catch(Exception $e) {
|
||||
$this->reconstruct();
|
||||
throw new Exception('Could not remove');
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rn($id, $data) {
|
||||
if(!(int)$this->db->one('SELECT 1 AS res FROM '.$this->options['structure_table'].' WHERE '.$this->options['structure']['id'].' = '.(int)$id)) {
|
||||
throw new Exception('Could not rename non-existing node');
|
||||
}
|
||||
$tmp = array();
|
||||
foreach($this->options['data'] as $v) {
|
||||
if(isset($data[$v])) {
|
||||
$tmp[$v] = $data[$v];
|
||||
}
|
||||
}
|
||||
if(count($tmp)) {
|
||||
$tmp[$this->options['data2structure']] = $id;
|
||||
$sql = "
|
||||
INSERT INTO
|
||||
".$this->options['data_table']." (".implode(',', array_keys($tmp)).")
|
||||
VALUES(?".str_repeat(',?', count($tmp) - 1).")
|
||||
ON DUPLICATE KEY UPDATE
|
||||
".implode(' = ?, ', array_keys($tmp))." = ?";
|
||||
$par = array_merge(array_values($tmp), array_values($tmp));
|
||||
try {
|
||||
$this->db->query($sql, $par);
|
||||
}
|
||||
catch(Exception $e) {
|
||||
throw new Exception('Could not rename');
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function analyze($get_errors = false) {
|
||||
$report = array();
|
||||
if((int)$this->db->one("SELECT COUNT(".$this->options['structure']["id"].") AS res FROM ".$this->options['structure_table']." WHERE ".$this->options['structure']["parent_id"]." = 0") !== 1) {
|
||||
$report[] = "No or more than one root node.";
|
||||
}
|
||||
if((int)$this->db->one("SELECT ".$this->options['structure']["left"]." AS res FROM ".$this->options['structure_table']." WHERE ".$this->options['structure']["parent_id"]." = 0") !== 1) {
|
||||
$report[] = "Root node's left index is not 1.";
|
||||
}
|
||||
if((int)$this->db->one("
|
||||
SELECT
|
||||
COUNT(".$this->options['structure']['id'].") AS res
|
||||
FROM ".$this->options['structure_table']." s
|
||||
WHERE
|
||||
".$this->options['structure']["parent_id"]." != 0 AND
|
||||
(SELECT COUNT(".$this->options['structure']['id'].") FROM ".$this->options['structure_table']." WHERE ".$this->options['structure']["id"]." = s.".$this->options['structure']["parent_id"].") = 0") > 0
|
||||
) {
|
||||
$report[] = "Missing parents.";
|
||||
}
|
||||
if(
|
||||
(int)$this->db->one("SELECT MAX(".$this->options['structure']["right"].") AS res FROM ".$this->options['structure_table']) / 2 !=
|
||||
(int)$this->db->one("SELECT COUNT(".$this->options['structure']["id"].") AS res FROM ".$this->options['structure_table'])
|
||||
) {
|
||||
$report[] = "Right index does not match node count.";
|
||||
}
|
||||
if(
|
||||
(int)$this->db->one("SELECT COUNT(DISTINCT ".$this->options['structure']["right"].") AS res FROM ".$this->options['structure_table']) !=
|
||||
(int)$this->db->one("SELECT COUNT(DISTINCT ".$this->options['structure']["left"].") AS res FROM ".$this->options['structure_table'])
|
||||
) {
|
||||
$report[] = "Duplicates in nested set.";
|
||||
}
|
||||
if(
|
||||
(int)$this->db->one("SELECT COUNT(DISTINCT ".$this->options['structure']["id"].") AS res FROM ".$this->options['structure_table']) !=
|
||||
(int)$this->db->one("SELECT COUNT(DISTINCT ".$this->options['structure']["left"].") AS res FROM ".$this->options['structure_table'])
|
||||
) {
|
||||
$report[] = "Left indexes not unique.";
|
||||
}
|
||||
if(
|
||||
(int)$this->db->one("SELECT COUNT(DISTINCT ".$this->options['structure']["id"].") AS res FROM ".$this->options['structure_table']) !=
|
||||
(int)$this->db->one("SELECT COUNT(DISTINCT ".$this->options['structure']["right"].") AS res FROM ".$this->options['structure_table'])
|
||||
) {
|
||||
$report[] = "Right indexes not unique.";
|
||||
}
|
||||
if(
|
||||
(int)$this->db->one("
|
||||
SELECT
|
||||
s1.".$this->options['structure']["id"]." AS res
|
||||
FROM ".$this->options['structure_table']." s1, ".$this->options['structure_table']." s2
|
||||
WHERE
|
||||
s1.".$this->options['structure']['id']." != s2.".$this->options['structure']['id']." AND
|
||||
s1.".$this->options['structure']['left']." = s2.".$this->options['structure']['right']."
|
||||
LIMIT 1")
|
||||
) {
|
||||
$report[] = "Nested set - matching left and right indexes.";
|
||||
}
|
||||
if(
|
||||
(int)$this->db->one("
|
||||
SELECT
|
||||
".$this->options['structure']["id"]." AS res
|
||||
FROM ".$this->options['structure_table']." s
|
||||
WHERE
|
||||
".$this->options['structure']['position']." >= (
|
||||
SELECT
|
||||
COUNT(".$this->options['structure']["id"].")
|
||||
FROM ".$this->options['structure_table']."
|
||||
WHERE ".$this->options['structure']['parent_id']." = s.".$this->options['structure']['parent_id']."
|
||||
)
|
||||
LIMIT 1") ||
|
||||
(int)$this->db->one("
|
||||
SELECT
|
||||
s1.".$this->options['structure']["id"]." AS res
|
||||
FROM ".$this->options['structure_table']." s1, ".$this->options['structure_table']." s2
|
||||
WHERE
|
||||
s1.".$this->options['structure']['id']." != s2.".$this->options['structure']['id']." AND
|
||||
s1.".$this->options['structure']['parent_id']." = s2.".$this->options['structure']['parent_id']." AND
|
||||
s1.".$this->options['structure']['position']." = s2.".$this->options['structure']['position']."
|
||||
LIMIT 1")
|
||||
) {
|
||||
$report[] = "Positions not correct.";
|
||||
}
|
||||
if((int)$this->db->one("
|
||||
SELECT
|
||||
COUNT(".$this->options['structure']["id"].") FROM ".$this->options['structure_table']." s
|
||||
WHERE
|
||||
(
|
||||
SELECT
|
||||
COUNT(".$this->options['structure']["id"].")
|
||||
FROM ".$this->options['structure_table']."
|
||||
WHERE
|
||||
".$this->options['structure']["right"]." < s.".$this->options['structure']["right"]." AND
|
||||
".$this->options['structure']["left"]." > s.".$this->options['structure']["left"]." AND
|
||||
".$this->options['structure']["level"]." = s.".$this->options['structure']["level"]." + 1
|
||||
) !=
|
||||
(
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM ".$this->options['structure_table']."
|
||||
WHERE
|
||||
".$this->options['structure']["parent_id"]." = s.".$this->options['structure']["id"]."
|
||||
)")
|
||||
) {
|
||||
$report[] = "Adjacency and nested set do not match.";
|
||||
}
|
||||
if(
|
||||
$this->options['data_table'] &&
|
||||
(int)$this->db->one("
|
||||
SELECT
|
||||
COUNT(".$this->options['structure']["id"].") AS res
|
||||
FROM ".$this->options['structure_table']." s
|
||||
WHERE
|
||||
(SELECT COUNT(".$this->options['data2structure'].") FROM ".$this->options['data_table']." WHERE ".$this->options['data2structure']." = s.".$this->options['structure']["id"].") = 0
|
||||
")
|
||||
) {
|
||||
$report[] = "Missing records in data table.";
|
||||
}
|
||||
if(
|
||||
$this->options['data_table'] &&
|
||||
(int)$this->db->one("
|
||||
SELECT
|
||||
COUNT(".$this->options['data2structure'].") AS res
|
||||
FROM ".$this->options['data_table']." s
|
||||
WHERE
|
||||
(SELECT COUNT(".$this->options['structure']["id"].") FROM ".$this->options['structure_table']." WHERE ".$this->options['structure']["id"]." = s.".$this->options['data2structure'].") = 0
|
||||
")
|
||||
) {
|
||||
$report[] = "Dangling records in data table.";
|
||||
}
|
||||
return $get_errors ? $report : count($report) == 0;
|
||||
}
|
||||
|
||||
public function reconstruct($analyze = true) {
|
||||
if($analyze && $this->analyze()) { return true; }
|
||||
|
||||
if(!$this->db->query("" .
|
||||
"CREATE TEMPORARY TABLE temp_tree (" .
|
||||
"".$this->options['structure']["id"]." INTEGER NOT NULL, " .
|
||||
"".$this->options['structure']["parent_id"]." INTEGER NOT NULL, " .
|
||||
"". $this->options['structure']["position"]." INTEGER NOT NULL" .
|
||||
") "
|
||||
)) { return false; }
|
||||
if(!$this->db->query("" .
|
||||
"INSERT INTO temp_tree " .
|
||||
"SELECT " .
|
||||
"".$this->options['structure']["id"].", " .
|
||||
"".$this->options['structure']["parent_id"].", " .
|
||||
"".$this->options['structure']["position"]." " .
|
||||
"FROM ".$this->options['structure_table'].""
|
||||
)) { return false; }
|
||||
|
||||
if(!$this->db->query("" .
|
||||
"CREATE TEMPORARY TABLE temp_stack (" .
|
||||
"".$this->options['structure']["id"]." INTEGER NOT NULL, " .
|
||||
"".$this->options['structure']["left"]." INTEGER, " .
|
||||
"".$this->options['structure']["right"]." INTEGER, " .
|
||||
"".$this->options['structure']["level"]." INTEGER, " .
|
||||
"stack_top INTEGER NOT NULL, " .
|
||||
"".$this->options['structure']["parent_id"]." INTEGER, " .
|
||||
"".$this->options['structure']["position"]." INTEGER " .
|
||||
") "
|
||||
)) { return false; }
|
||||
|
||||
$counter = 2;
|
||||
if(!$this->db->query("SELECT COUNT(*) FROM temp_tree")) {
|
||||
return false;
|
||||
}
|
||||
$this->db->nextr();
|
||||
$maxcounter = (int) $this->db->f(0) * 2;
|
||||
$currenttop = 1;
|
||||
if(!$this->db->query("" .
|
||||
"INSERT INTO temp_stack " .
|
||||
"SELECT " .
|
||||
"".$this->options['structure']["id"].", " .
|
||||
"1, " .
|
||||
"NULL, " .
|
||||
"0, " .
|
||||
"1, " .
|
||||
"".$this->options['structure']["parent_id"].", " .
|
||||
"".$this->options['structure']["position"]." " .
|
||||
"FROM temp_tree " .
|
||||
"WHERE ".$this->options['structure']["parent_id"]." = 0"
|
||||
)) { return false; }
|
||||
if(!$this->db->query("DELETE FROM temp_tree WHERE ".$this->options['structure']["parent_id"]." = 0")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
while ($counter <= $maxcounter) {
|
||||
if(!$this->db->query("" .
|
||||
"SELECT " .
|
||||
"temp_tree.".$this->options['structure']["id"]." AS tempmin, " .
|
||||
"temp_tree.".$this->options['structure']["parent_id"]." AS pid, " .
|
||||
"temp_tree.".$this->options['structure']["position"]." AS lid " .
|
||||
"FROM temp_stack, temp_tree " .
|
||||
"WHERE " .
|
||||
"temp_stack.".$this->options['structure']["id"]." = temp_tree.".$this->options['structure']["parent_id"]." AND " .
|
||||
"temp_stack.stack_top = ".$currenttop." " .
|
||||
"ORDER BY temp_tree.".$this->options['structure']["position"]." ASC LIMIT 1"
|
||||
)) { return false; }
|
||||
|
||||
if($this->db->nextr()) {
|
||||
$tmp = $this->db->f("tempmin");
|
||||
|
||||
$q = "INSERT INTO temp_stack (stack_top, ".$this->options['structure']["id"].", ".$this->options['structure']["left"].", ".$this->options['structure']["right"].", ".$this->options['structure']["level"].", ".$this->options['structure']["parent_id"].", ".$this->options['structure']["position"].") VALUES(".($currenttop + 1).", ".$tmp.", ".$counter.", NULL, ".$currenttop.", ".$this->db->f("pid").", ".$this->db->f("lid").")";
|
||||
if(!$this->db->query($q)) {
|
||||
return false;
|
||||
}
|
||||
if(!$this->db->query("DELETE FROM temp_tree WHERE ".$this->options['structure']["id"]." = ".$tmp)) {
|
||||
return false;
|
||||
}
|
||||
$counter++;
|
||||
$currenttop++;
|
||||
}
|
||||
else {
|
||||
if(!$this->db->query("" .
|
||||
"UPDATE temp_stack SET " .
|
||||
"".$this->options['structure']["right"]." = ".$counter.", " .
|
||||
"stack_top = -stack_top " .
|
||||
"WHERE stack_top = ".$currenttop
|
||||
)) { return false; }
|
||||
$counter++;
|
||||
$currenttop--;
|
||||
}
|
||||
}
|
||||
|
||||
$temp_fields = $this->options['structure'];
|
||||
unset($temp_fields["parent_id"]);
|
||||
unset($temp_fields["position"]);
|
||||
unset($temp_fields["left"]);
|
||||
unset($temp_fields["right"]);
|
||||
unset($temp_fields["level"]);
|
||||
if(count($temp_fields) > 1) {
|
||||
if(!$this->db->query("" .
|
||||
"CREATE TEMPORARY TABLE temp_tree2 " .
|
||||
"SELECT ".implode(", ", $temp_fields)." FROM ".$this->options['structure_table']." "
|
||||
)) { return false; }
|
||||
}
|
||||
if(!$this->db->query("TRUNCATE TABLE ".$this->options['structure_table']."")) {
|
||||
return false;
|
||||
}
|
||||
if(!$this->db->query("" .
|
||||
"INSERT INTO ".$this->options['structure_table']." (" .
|
||||
"".$this->options['structure']["id"].", " .
|
||||
"".$this->options['structure']["parent_id"].", " .
|
||||
"".$this->options['structure']["position"].", " .
|
||||
"".$this->options['structure']["left"].", " .
|
||||
"".$this->options['structure']["right"].", " .
|
||||
"".$this->options['structure']["level"]." " .
|
||||
") " .
|
||||
"SELECT " .
|
||||
"".$this->options['structure']["id"].", " .
|
||||
"".$this->options['structure']["parent_id"].", " .
|
||||
"".$this->options['structure']["position"].", " .
|
||||
"".$this->options['structure']["left"].", " .
|
||||
"".$this->options['structure']["right"].", " .
|
||||
"".$this->options['structure']["level"]." " .
|
||||
"FROM temp_stack " .
|
||||
"ORDER BY ".$this->options['structure']["id"].""
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
if(count($temp_fields) > 1) {
|
||||
$sql = "" .
|
||||
"UPDATE ".$this->options['structure_table']." v, temp_tree2 SET v.".$this->options['structure']["id"]." = v.".$this->options['structure']["id"]." ";
|
||||
foreach($temp_fields as $k => $v) {
|
||||
if($k == "id") continue;
|
||||
$sql .= ", v.".$v." = temp_tree2.".$v." ";
|
||||
}
|
||||
$sql .= " WHERE v.".$this->options['structure']["id"]." = temp_tree2.".$this->options['structure']["id"]." ";
|
||||
if(!$this->db->query($sql)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// fix positions
|
||||
$nodes = $this->db->get("SELECT ".$this->options['structure']['id'].", ".$this->options['structure']['parent_id']." FROM ".$this->options['structure_table']." ORDER BY ".$this->options['structure']['parent_id'].", ".$this->options['structure']['position']);
|
||||
$last_parent = false;
|
||||
$last_position = false;
|
||||
foreach($nodes as $node) {
|
||||
if((int)$node[$this->options['structure']['parent_id']] !== $last_parent) {
|
||||
$last_position = 0;
|
||||
$last_parent = (int)$node[$this->options['structure']['parent_id']];
|
||||
}
|
||||
$this->db->query("UPDATE ".$this->options['structure_table']." SET ".$this->options['structure']['position']." = ".$last_position." WHERE ".$this->options['structure']['id']." = ".(int)$node[$this->options['structure']['id']]);
|
||||
$last_position++;
|
||||
}
|
||||
if($this->options['data_table'] != $this->options['structure_table']) {
|
||||
// fix missing data records
|
||||
$this->db->query("
|
||||
INSERT INTO
|
||||
".$this->options['data_table']." (".implode(',',$this->options['data']).")
|
||||
SELECT ".$this->options['structure']['id']." ".str_repeat(", ".$this->options['structure']['id'], count($this->options['data']) - 1)."
|
||||
FROM ".$this->options['structure_table']." s
|
||||
WHERE (SELECT COUNT(".$this->options['data2structure'].") FROM ".$this->options['data_table']." WHERE ".$this->options['data2structure']." = s.".$this->options['structure']['id'].") = 0 "
|
||||
);
|
||||
// remove dangling data records
|
||||
$this->db->query("
|
||||
DELETE FROM
|
||||
".$this->options['data_table']."
|
||||
WHERE
|
||||
(SELECT COUNT(".$this->options['structure']['id'].") FROM ".$this->options['structure_table']." WHERE ".$this->options['structure']['id']." = ".$this->options['data_table'].".".$this->options['data2structure'].") = 0
|
||||
");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function res($data = array()) {
|
||||
if(!$this->db->query("TRUNCATE TABLE ".$this->options['structure_table'])) { return false; }
|
||||
if(!$this->db->query("TRUNCATE TABLE ".$this->options['data_table'])) { return false; }
|
||||
$sql = "INSERT INTO ".$this->options['structure_table']." (".implode(",", $this->options['structure']).") VALUES (?".str_repeat(',?', count($this->options['structure']) - 1).")";
|
||||
$par = array();
|
||||
foreach($this->options['structure'] as $k => $v) {
|
||||
switch($k) {
|
||||
case 'id':
|
||||
$par[] = null;
|
||||
break;
|
||||
case 'left':
|
||||
$par[] = 1;
|
||||
break;
|
||||
case 'right':
|
||||
$par[] = 2;
|
||||
break;
|
||||
case 'level':
|
||||
$par[] = 0;
|
||||
break;
|
||||
case 'parent_id':
|
||||
$par[] = 0;
|
||||
break;
|
||||
case 'position':
|
||||
$par[] = 0;
|
||||
break;
|
||||
default:
|
||||
$par[] = null;
|
||||
}
|
||||
}
|
||||
if(!$this->db->query($sql, $par)) { return false; }
|
||||
$id = $this->db->insert_id();
|
||||
foreach($this->options['structure'] as $k => $v) {
|
||||
if(!isset($data[$k])) { $data[$k] = null; }
|
||||
}
|
||||
return $this->rn($id, $data);
|
||||
}
|
||||
|
||||
public function dump() {
|
||||
$nodes = $this->db->get("
|
||||
SELECT
|
||||
s.".implode(", s.", $this->options['structure']).",
|
||||
d.".implode(", d.", $this->options['data'])."
|
||||
FROM
|
||||
".$this->options['structure_table']." s,
|
||||
".$this->options['data_table']." d
|
||||
WHERE
|
||||
s.".$this->options['structure']['id']." = d.".$this->options['data2structure']."
|
||||
ORDER BY ".$this->options['structure']["left"]
|
||||
);
|
||||
echo "\n\n";
|
||||
foreach($nodes as $node) {
|
||||
echo str_repeat(" ",(int)$node[$this->options['structure']["level"]] * 2);
|
||||
echo $node[$this->options['structure']["id"]]." ".$node["nm"]." (".$node[$this->options['structure']["left"]].",".$node[$this->options['structure']["right"]].",".$node[$this->options['structure']["level"]].",".$node[$this->options['structure']["parent_id"]].",".$node[$this->options['structure']["position"]].")" . "\n";
|
||||
}
|
||||
echo str_repeat("-",40);
|
||||
echo "\n\n";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 4.0.1
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Host: 127.0.0.1
|
||||
-- Generation Time: Apr 15, 2014 at 05:14 PM
|
||||
-- Server version: 5.5.27
|
||||
-- PHP Version: 5.4.7
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
--
|
||||
-- Database: `test`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tree_data`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tree_data` (
|
||||
`id` int(10) unsigned NOT NULL,
|
||||
`nm` varchar(255) CHARACTER SET utf8 NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `tree_data`
|
||||
--
|
||||
|
||||
INSERT INTO `tree_data` (`id`, `nm`) VALUES
|
||||
(1, 'root'),
|
||||
(1063, 'Node 12'),
|
||||
(1064, 'Node 2'),
|
||||
(1065, 'Node 3'),
|
||||
(1066, 'Node 4'),
|
||||
(1067, 'Node 5'),
|
||||
(1068, 'Node 6'),
|
||||
(1069, 'Node 7'),
|
||||
(1070, 'Node 8'),
|
||||
(1071, 'Node 9'),
|
||||
(1072, 'Node 9'),
|
||||
(1073, 'Node 9'),
|
||||
(1074, 'Node 9'),
|
||||
(1075, 'Node 7'),
|
||||
(1076, 'Node 8'),
|
||||
(1077, 'Node 9'),
|
||||
(1078, 'Node 9'),
|
||||
(1079, 'Node 9');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tree_struct`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tree_struct` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`lft` int(10) unsigned NOT NULL,
|
||||
`rgt` int(10) unsigned NOT NULL,
|
||||
`lvl` int(10) unsigned NOT NULL,
|
||||
`pid` int(10) unsigned NOT NULL,
|
||||
`pos` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1083 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `tree_struct`
|
||||
--
|
||||
|
||||
INSERT INTO `tree_struct` (`id`, `lft`, `rgt`, `lvl`, `pid`, `pos`) VALUES
|
||||
(1, 1, 36, 0, 0, 0),
|
||||
(1063, 2, 31, 1, 1, 0),
|
||||
(1064, 3, 30, 2, 1063, 0),
|
||||
(1065, 4, 29, 3, 1064, 0),
|
||||
(1066, 5, 28, 4, 1065, 0),
|
||||
(1067, 6, 19, 5, 1066, 0),
|
||||
(1068, 7, 18, 6, 1067, 0),
|
||||
(1069, 8, 17, 7, 1068, 0),
|
||||
(1070, 9, 16, 8, 1069, 0),
|
||||
(1071, 12, 13, 9, 1070, 1),
|
||||
(1072, 14, 15, 9, 1070, 2),
|
||||
(1073, 10, 11, 9, 1070, 0),
|
||||
(1074, 32, 35, 1, 1, 1),
|
||||
(1075, 20, 27, 5, 1066, 1),
|
||||
(1076, 21, 26, 6, 1075, 0),
|
||||
(1077, 24, 25, 7, 1076, 1),
|
||||
(1078, 33, 34, 2, 1074, 0),
|
||||
(1079, 22, 23, 7, 1076, 0);
|
||||